gzdoom-gles/src/g_hexen/a_centaur.cpp
Christoph Oelckers a90ba9deb6 - Converted Ettin and Centaur to DECORATE.
- Made the Ettin's and Centaur's howling sound an actor property.
- Added A_CustomComboAttack function to finally have something that can
  replace the old A_ComboAttack function.
- Added A_SpawnItemEx function that removes the problems with A_SpawnItem
  and which also should make most of the A_CustomMissile abuse unnecessary.
- Added A_QueueCorpse to the list of DECORATE code pointers.
- Made the size of Hexen's corpse queue configurable by CVAR
  (sv_corpsequeuesize.) Setting this CVAR to -1 will disable corpse 
  queuing completely so that even in Hexen all corpses will stay forever.


SVN r392 (trunk)
2006-11-27 00:01:30 +00:00

24 lines
662 B
C++

#include "actor.h"
#include "p_enemy.h"
#include "a_action.h"
#include "m_random.h"
static FRandom pr_centaurdefend ("CentaurDefend");
//============================================================================
//
// A_CentaurDefend
//
//============================================================================
void A_CentaurDefend (AActor *actor)
{
A_FaceTarget (actor);
if (actor->CheckMeleeRange() && pr_centaurdefend() < 32)
{
// This should unset REFLECTIVE as well
// (unless you want the Centaur to reflect projectiles forever!)
A_UnSetReflectiveInvulnerable (actor);
actor->SetState (actor->MeleeState);
}
}