mirror of
https://github.com/ZDoom/qzdoom.git
synced 2025-05-30 00:21:33 +00:00
* everything related to scripting is now placed in a subdirectory 'scripting', which itself is separated into DECORATE, ZSCRIPT, the VM and code generation. * a few items have been moved to different headers so that the DECORATE parser definitions can mostly be kept local. The only exception at the moment is the flags interface on which 3 source files depend.
42 lines
776 B
C++
42 lines
776 B
C++
/*
|
|
#include "actor.h"
|
|
#include "info.h"
|
|
#include "p_local.h"
|
|
#include "p_spec.h"
|
|
#include "p_enemy.h"
|
|
#include "a_action.h"
|
|
#include "vm.h"
|
|
*/
|
|
|
|
//
|
|
// A_KeenDie
|
|
// DOOM II special, map 32.
|
|
// Uses special tag 666 by default.
|
|
//
|
|
|
|
DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_KeenDie)
|
|
{
|
|
PARAM_ACTION_PROLOGUE;
|
|
PARAM_INT_OPT(doortag) { doortag = 666; }
|
|
|
|
A_Unblock(self, false);
|
|
|
|
// 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 0;
|
|
}
|
|
}
|
|
|
|
EV_DoDoor (DDoor::doorOpen, NULL, NULL, doortag, 2., 0, 0, 0);
|
|
return 0;
|
|
}
|
|
|
|
|