diff options
| author | Kiloku <mateus.sateles@protonmail.com> | 2025-01-19 09:27:50 -0300 |
|---|---|---|
| committer | Lywx <kiritodev01@gmail.com> | 2025-01-20 14:32:27 -0600 |
| commit | 6d9b263fc12e67142a453cd94a432e4ced3c877e (patch) | |
| tree | 240f972de1458d102203c229787610b0161091bd /src | |
| parent | 0169c08350eea79b54cdd108a8175abd7b69e31f (diff) | |
Add a shooting delay after firing a Charged Shot
Diffstat (limited to 'src')
| -rw-r--r-- | src/port/mods/PortEnhancements.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/port/mods/PortEnhancements.c b/src/port/mods/PortEnhancements.c index fc2c5ea7..33b6b27b 100644 --- a/src/port/mods/PortEnhancements.c +++ b/src/port/mods/PortEnhancements.c @@ -305,6 +305,13 @@ void OnLivesCounterDraw(IEvent* ev){ HUD_LivesCount2_Draw(258.0f, SCREEN_HEIGHT - 20, gLifeCount[gPlayerNum]); } +void OnPlayerShootChargedPre(PlayerActionPreShootChargedEvent* ev){ + if (CVarGetInteger("gRapidFire", 0) == 1) { + ev->player->shotTimer = 4; + } + +} + void PortEnhancements_Init() { PortEnhancements_Register(); @@ -323,6 +330,7 @@ void PortEnhancements_Init() { REGISTER_LISTENER(PlayerActionBoostEvent, OnPlayerBoost, EVENT_PRIORITY_NORMAL); REGISTER_LISTENER(PlayerActionBrakeEvent, OnPlayerBrake, EVENT_PRIORITY_NORMAL); REGISTER_LISTENER(PlayerActionPostShootEvent, OnPlayerShootPost, EVENT_PRIORITY_NORMAL); + REGISTER_LISTENER(PlayerActionPreShootChargedEvent, OnPlayerShootChargedPre, EVENT_PRIORITY_NORMAL); } void PortEnhancements_Register() { |
