gzdoom/src/g_doom/a_keen.cpp
Christoph Oelckers 5e8323b426 - Converted Arachnotron, Archvile, Cyberdemon, Spidermastermind and
CommanderKeen to DECORATE.


SVN r374 (trunk)
2006-11-04 16:19:50 +00:00

34 lines
676 B
C++

#include "actor.h"
#include "info.h"
#include "p_local.h"
#include "p_spec.h"
#include "p_enemy.h"
#include "a_action.h"
//
// A_KeenDie
// DOOM II special, map 32.
// Uses special tag 666.
//
void A_KeenDie (AActor *self)
{
A_NoBlocking (self);
// scan the remaining thinkers to see if all Keens are dead
AActor *other;
TThinkerIterator<AActor> iterator;
const PClass *matchClass = self->GetClass ();
while ( (other = iterator.Next ()) )
{
if (other != self && other->health > 0 && other->IsA (matchClass))
{
// other Keen not dead
return;
}
}
EV_DoDoor (DDoor::doorOpen, NULL, NULL, 666, 2*FRACUNIT, 0, 0, 0);
}