- Added a flag to A_M_Refire to ignore the actor's missile state, so the rocket marine will
not continue to punch air if it starts attacking while its target is in melee range and then moves out of it. SVN r4021 (trunk)
This commit is contained in:
parent
0d47c6cbc8
commit
7fb0d37d99
2 changed files with 8 additions and 5 deletions
|
|
@ -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
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue