lets get scuffed
This commit is contained in:
parent
4697d30502
commit
c3e6fef7fe
1 changed files with 6 additions and 4 deletions
|
@ -300,11 +300,13 @@ void weapon_prepareattack_do(entity actor, .entity weaponentity, bool secondary,
|
||||||
{
|
{
|
||||||
entity this = actor.(weaponentity);
|
entity this = actor.(weaponentity);
|
||||||
if (this == NULL) return;
|
if (this == NULL) return;
|
||||||
this.state = WS_INUSE;
|
|
||||||
|
|
||||||
if(StatusEffects_active(STATUSEFFECT_SpawnShield, actor)) // given this is performed often, perform a lighter check first
|
if(StatusEffects_active(STATUSEFFECT_SpawnShield, actor)) // given this is performed often, perform a lighter check first
|
||||||
StatusEffects_remove(STATUSEFFECT_SpawnShield, actor, STATUSEFFECT_REMOVE_CLEAR); // kill spawn shield when you fire
|
{
|
||||||
|
if(autocvar_g_weapons_spawnshield_forbid_firing) return;
|
||||||
|
if(!autocvar_g_weapons_spawnshield_forbid_firing) StatusEffects_remove(STATUSEFFECT_SpawnShield, actor, STATUSEFFECT_REMOVE_CLEAR); // kill spawn shield when you fire
|
||||||
|
}
|
||||||
|
this.state = WS_INUSE;
|
||||||
// if the weapon hasn't been firing continuously, reset the timer
|
// if the weapon hasn't been firing continuously, reset the timer
|
||||||
if (attacktime >= 0)
|
if (attacktime >= 0)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue