Skip to content

Commit

Permalink
Add "Don't delay first fire" spawnflag for env_blowercannon
Browse files Browse the repository at this point in the history
  • Loading branch information
FreeSlave committed Sep 21, 2024
1 parent 88e9fbb commit d5f679b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
5 changes: 4 additions & 1 deletion dlls/effects.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3657,6 +3657,8 @@ enum
BLOWERCANNON_FIRE,
};

#define SF_BLOWERCANNON_NO_FIRST_DELAY 32

class CBlowerCannon : public CBaseDelay
{
public:
Expand Down Expand Up @@ -3769,7 +3771,8 @@ void CBlowerCannon::BlowerCannonStart( CBaseEntity *pActivator, CBaseEntity *pCa
m_hActivator = pActivator;
SetUse( &CBlowerCannon::BlowerCannonStop );
SetThink( &CBlowerCannon::BlowerCannonThink );
pev->nextthink = gpGlobals->time + m_flDelay;
const float delay = FBitSet(pev->spawnflags, SF_BLOWERCANNON_NO_FIRST_DELAY) ? 0.0f : m_flDelay;
pev->nextthink = gpGlobals->time + delay;
}

void CBlowerCannon::BlowerCannonStop( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value )
Expand Down
4 changes: 4 additions & 0 deletions fgd/halflife.fgd
Original file line number Diff line number Diff line change
Expand Up @@ -1686,6 +1686,10 @@
1: "Toggle On/Off"
2: "Fire When Triggered"
]
spawnflags(flags) =
[
32: "Don't delay first fire" : 0
]
]

@SolidClass base(Targetname) = env_bubbles : "Bubble Volume"
Expand Down

0 comments on commit d5f679b

Please sign in to comment.