2008-09-15 14:11:05 +00:00
|
|
|
/*
|
2006-02-24 04:48:15 +00:00
|
|
|
#include "actor.h"
|
|
|
|
#include "info.h"
|
|
|
|
#include "p_local.h"
|
|
|
|
#include "p_spec.h"
|
|
|
|
#include "p_enemy.h"
|
|
|
|
#include "a_action.h"
|
2008-08-10 20:48:55 +00:00
|
|
|
#include "thingdef/thingdef.h"
|
2008-09-15 14:11:05 +00:00
|
|
|
*/
|
2006-02-24 04:48:15 +00:00
|
|
|
|
|
|
|
//
|
|
|
|
// A_KeenDie
|
|
|
|
// DOOM II special, map 32.
|
2008-12-06 10:22:37 +00:00
|
|
|
// Uses special tag 666 by default.
|
2006-02-24 04:48:15 +00:00
|
|
|
//
|
2008-12-06 10:22:37 +00:00
|
|
|
DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_KeenDie)
|
2006-02-24 04:48:15 +00:00
|
|
|
{
|
2008-08-10 22:48:37 +00:00
|
|
|
CALL_ACTION(A_NoBlocking, self);
|
2006-02-24 04:48:15 +00:00
|
|
|
|
|
|
|
// scan the remaining thinkers to see if all Keens are dead
|
|
|
|
AActor *other;
|
|
|
|
TThinkerIterator<AActor> iterator;
|
2006-05-10 02:40:43 +00:00
|
|
|
const PClass *matchClass = self->GetClass ();
|
2006-02-24 04:48:15 +00:00
|
|
|
|
|
|
|
while ( (other = iterator.Next ()) )
|
|
|
|
{
|
|
|
|
if (other != self && other->health > 0 && other->IsA (matchClass))
|
|
|
|
{
|
|
|
|
// other Keen not dead
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2008-12-06 10:22:37 +00:00
|
|
|
ACTION_PARAM_START(1);
|
|
|
|
ACTION_PARAM_INT(doortag, 0);
|
|
|
|
|
|
|
|
EV_DoDoor (DDoor::doorOpen, NULL, NULL, doortag, 2*FRACUNIT, 0, 0, 0);
|
2006-02-24 04:48:15 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|