gzdoom/src/g_strife/a_oracle.cpp
Christoph Oelckers 760f70d3f1 - Changed compilation for g_doom, g_heretic, g_hexen and g_strife folders
so that all files are included by a central one instead of compiling 
  each one separately. This speeds up the compilation process by 25%
  when doing a complete rebuild in Visual C.
- Cleaned up more header dependencies.

SVN r1226 (trunk)
2008-09-15 14:11:05 +00:00

48 lines
1.2 KiB
C++

/*
#include "actor.h"
#include "a_action.h"
#include "a_strifeglobal.h"
#include "p_enemy.h"
#include "r_defs.h"
#include "thingdef/thingdef.h"
*/
class AOracle : public AActor
{
DECLARE_CLASS (AOracle, AActor)
public:
int TakeSpecialDamage (AActor *inflictor, AActor *source, int damage, FName damagetype);
};
IMPLEMENT_CLASS (AOracle)
DEFINE_ACTION_FUNCTION(AActor, A_WakeOracleSpectre)
{
TThinkerIterator<AActor> it(NAME_AlienSpectre3);
AActor *spectre = it.Next();
if (spectre != NULL)
{
spectre->Sector->SoundTarget = spectre->LastHeard = self->LastHeard;
spectre->target = self->target;
spectre->SetState (spectre->SeeState);
}
}
//============================================================================
//
// AOracle :: TakeSpecialDamage
//
// The Oracle is invulnerable to the first stage Sigil.
//
//============================================================================
int AOracle::TakeSpecialDamage (AActor *inflictor, AActor *source, int damage, FName damagetype)
{
if (inflictor != NULL && inflictor->GetClass()->TypeName == NAME_SpectralLightningV1)
return -1;
return Super::TakeSpecialDamage(inflictor, source, damage, damagetype);
}