This commit is contained in:
Alex 2023-08-20 16:25:45 +02:00
parent 7abe5d0193
commit 3f33ca3dfa

View file

@ -302,7 +302,7 @@ void weapon_prepareattack_do(entity actor, .entity weaponentity, bool secondary,
if (this == NULL) return; if (this == NULL) return;
this.state = WS_INUSE; 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 StatusEffects_remove(STATUSEFFECT_SpawnShield, actor, STATUSEFFECT_REMOVE_CLEAR); // kill spawn shield when you fire
// if the weapon hasn't been firing continuously, reset the timer // if the weapon hasn't been firing continuously, reset the timer