qzdoom/src/g_strife/a_oracle.cpp
Randy Heit ca2d75307c - Do not "wake" Oracle spectres that killed an Oracle. (Because if they killed it, they're
obviously already awake. Also, we don't want them to end up targeting themselves.)

SVN r4009 (trunk)
2013-01-02 03:35:08 +00:00

23 lines
534 B
C++

/*
#include "actor.h"
#include "a_action.h"
#include "a_strifeglobal.h"
#include "p_enemy.h"
#include "r_defs.h"
#include "thingdef/thingdef.h"
*/
DEFINE_ACTION_FUNCTION(AActor, A_WakeOracleSpectre)
{
TThinkerIterator<AActor> it(NAME_AlienSpectre3);
AActor *spectre = it.Next();
if (spectre != NULL && spectre->health > 0 && self->target != spectre)
{
spectre->Sector->SoundTarget = spectre->LastHeard = self->LastHeard;
spectre->target = self->target;
spectre->SetState (spectre->SeeState);
}
}