gzdoom/src/g_doom/a_doommisc.cpp
Christoph Oelckers 29195a913c - Converted ExplosiveBarrel, BulletPuff and DoomUnusedStates to DECORATE.
- Added VSpeed DECORATE property so that an actor can be given an initial
  vertical speed.
- Removed the barrel check in P_DamageMobj. AActor::Die is doing the same
  operation unconditionally so this is redundant.
- Added A_BarrelDestroy to the list of DECORATE code pointers so that
  the same effect can be recreated for other items as well.
- Renamed A_BarrelRespawn to A_Respawn, changed it so that it works for
  monsters and added it to the list of DECORATE code pointers. Now Quake-style
  zombies should be possible. ;)
- Changed handling of MF4_RANDOMIZE so that it applies to all actors being
  spawned and not just projectiles.
- Converted Berserk and Megasphere to DECORATE.
- Fixed: HealThing should respect the stamina a player has and the Dehacked
  health compatibility flag if max is 0. To do that it calls P_GiveBody now.


SVN r373 (trunk)
2006-11-04 13:06:42 +00:00

28 lines
596 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"
// The barrel of green goop ------------------------------------------------
void A_BarrelDestroy (AActor *actor)
{
if ((dmflags2 & DF2_BARRELS_RESPAWN) &&
(deathmatch || alwaysapplydmflags))
{
actor->height = actor->GetDefault()->height;
actor->renderflags |= RF_INVISIBLE;
actor->flags &= ~MF_SOLID;
}
else
{
actor->Destroy ();
}
}