diff --git a/src/g_doom/a_scriptedmarine.cpp b/src/g_doom/a_scriptedmarine.cpp index 3d994f5027..be39b545bf 100644 --- a/src/g_doom/a_scriptedmarine.cpp +++ b/src/g_doom/a_scriptedmarine.cpp @@ -153,8 +153,11 @@ void AScriptedMarine::Tick () // //============================================================================ -DEFINE_ACTION_FUNCTION(AActor, A_M_Refire) +DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_M_Refire) { + ACTION_PARAM_START(1); + ACTION_PARAM_BOOL(ignoremissile, 0); + if (self->target == NULL || self->target->health <= 0) { if (self->MissileState && pr_m_refire() < 160) @@ -167,7 +170,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_M_Refire) self->SetState (self->state + 1); return; } - if ((self->MissileState == NULL && !self->CheckMeleeRange ()) || + if (((ignoremissile || self->MissileState == NULL) && !self->CheckMeleeRange ()) || !P_CheckSight (self, self->target) || pr_m_refire() < 4) // Small chance of stopping even when target not dead { diff --git a/wadsrc/static/actors/doom/scriptedmarine.txt b/wadsrc/static/actors/doom/scriptedmarine.txt index f855fcc521..7602405c71 100644 --- a/wadsrc/static/actors/doom/scriptedmarine.txt +++ b/wadsrc/static/actors/doom/scriptedmarine.txt @@ -18,7 +18,7 @@ ACTOR ScriptedMarine 9100 native DeathSound "*death" PainSound "*pain50" - action native A_M_Refire (); + action native A_M_Refire (bool ignoremissile=false); action native A_M_CheckAttack (); action native A_MarineChase (); action native A_MarineLook (); @@ -57,7 +57,7 @@ ACTOR ScriptedMarine 9100 native PLAY E 4 A_FaceTarget PLAY F 4 A_M_Punch(1) PLAY A 9 - PLAY A 0 A_M_Refire + PLAY A 0 A_M_Refire(1) Loop PLAY A 5 A_FaceTarget Goto See @@ -65,7 +65,7 @@ ACTOR ScriptedMarine 9100 native PLAY E 4 A_FaceTarget PLAY F 4 A_M_Punch(10) PLAY A 9 - PLAY A 0 A_M_Refire + PLAY A 0 A_M_Refire(1) Loop PLAY A 5 A_FaceTarget Goto See