mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-08 05:51:09 +00:00
1983b5c586
DEFINE_ACTION_FUNCTION macro. This should make it easier to improve the whole system. SVN r1148 (trunk)
29 lines
634 B
C++
29 lines
634 B
C++
#include "actor.h"
|
|
#include "info.h"
|
|
#include "p_enemy.h"
|
|
#include "p_local.h"
|
|
#include "a_doomglobal.h"
|
|
#include "a_sharedglobal.h"
|
|
#include "m_random.h"
|
|
#include "gi.h"
|
|
#include "doomstat.h"
|
|
#include "gstrings.h"
|
|
#include "thingdef/thingdef.h"
|
|
|
|
// The barrel of green goop ------------------------------------------------
|
|
|
|
DEFINE_ACTION_FUNCTION(AActor, A_BarrelDestroy)
|
|
{
|
|
if ((dmflags2 & DF2_BARRELS_RESPAWN) &&
|
|
(deathmatch || alwaysapplydmflags))
|
|
{
|
|
self->height = self->GetDefault()->height;
|
|
self->renderflags |= RF_INVISIBLE;
|
|
self->flags &= ~MF_SOLID;
|
|
}
|
|
else
|
|
{
|
|
self->Destroy ();
|
|
}
|
|
}
|
|
|