mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-15 00:41:57 +00:00
bb617dfbfd
longer determined by game. Instead there's a new flag, MF5_BLOODSPLATTER which is deciding what to do. To keep backwards compatibility this flag is unset for projectiles in Doom and Strife and set for them in Heretic and Hexen. The same applies to DECORATE but of course the flag can be manipulated here. - BLODxx sprites are now globally renamed to BLUDxx when not playing Doom. This allows using the same states in every game, including the Raven-specific blood actors. - Gave the bullet puff and the axe blood masses of 5 so that the make small splashes. - Added A_Light(value) code pointer for DECORATE to generalize the weapon light effect. - Added 'noskillmenu' option to MAPINFO episode definitions. This is for WADs that want to implement a skill selection level. - Added APROP_ChaseGoal and APROP_Frightened actor properties for ACS. - Added MF5_CHASEGOAL flag that makes monsters to go after their goal even if they have a valid target. - Fixed some issues with the changes to P_NewChaseDir I made to include MBF's dropoff logic. - Added a PowerFrightener powerup class. It seemed like such a waste to have this cool feature but no means to use it in a decent fashion. - Fixed: S_Init and S_ParseSndInfo should call atterm only once but not each time they are called. SVN r112 (trunk)
146 lines
3.8 KiB
C++
146 lines
3.8 KiB
C++
#include "actor.h"
|
|
#include "info.h"
|
|
#include "gi.h"
|
|
#include "a_sharedglobal.h"
|
|
|
|
// Default actor for unregistered doomednums -------------------------------
|
|
|
|
FState AUnknown::States[] =
|
|
{
|
|
S_NORMAL (UNKN, 'A', -1, NULL , NULL)
|
|
};
|
|
|
|
IMPLEMENT_ACTOR (AUnknown, Any, -1, 0)
|
|
PROP_RadiusFixed (32)
|
|
PROP_HeightFixed (56)
|
|
PROP_Flags (MF_NOGRAVITY|MF_NOBLOCKMAP)
|
|
PROP_Flags3 (MF3_DONTSPLASH)
|
|
|
|
PROP_SpawnState (0)
|
|
END_DEFAULTS
|
|
|
|
// Route node for monster patrols -------------------------------------------
|
|
|
|
IMPLEMENT_STATELESS_ACTOR (APatrolPoint, Any, 9024, 0)
|
|
PROP_RadiusFixed (8)
|
|
PROP_HeightFixed (8)
|
|
PROP_Mass (10)
|
|
PROP_Flags (MF_NOBLOCKMAP|MF_NOGRAVITY)
|
|
PROP_Flags3 (MF3_DONTSPLASH)
|
|
PROP_RenderStyle (STYLE_None)
|
|
END_DEFAULTS
|
|
|
|
// A special to execute when a monster reaches a matching patrol point ------
|
|
|
|
IMPLEMENT_STATELESS_ACTOR (APatrolSpecial, Any, 9047, 0)
|
|
PROP_RadiusFixed (8)
|
|
PROP_HeightFixed (8)
|
|
PROP_Mass (10)
|
|
PROP_Flags (MF_NOBLOCKMAP|MF_NOGRAVITY)
|
|
PROP_Flags3 (MF3_DONTSPLASH)
|
|
PROP_RenderStyle (STYLE_None)
|
|
END_DEFAULTS
|
|
|
|
// Blood sprite - adjusts itself for each game -----------------------------
|
|
|
|
FState ABlood::States[] =
|
|
{
|
|
#define S_DBLOOD 0
|
|
S_NORMAL (BLUD, 'C', 8, NULL , &States[S_DBLOOD+1]),
|
|
S_NORMAL (BLUD, 'B', 8, NULL , &States[S_DBLOOD+2]),
|
|
S_NORMAL (BLUD, 'A', 8, NULL , NULL),
|
|
|
|
#define S_SBLOOD (S_DBLOOD+3)
|
|
S_NORMAL (SPRY, 'A', 3, NULL , &States[S_SBLOOD+1]),
|
|
S_NORMAL (SPRY, 'B', 3, NULL , &States[S_SBLOOD+2]),
|
|
S_NORMAL (SPRY, 'C', 3, NULL , &States[S_SBLOOD+3]),
|
|
S_NORMAL (SPRY, 'D', 3, NULL , &States[S_SBLOOD+4]),
|
|
S_NORMAL (SPRY, 'E', 3, NULL , &States[S_SBLOOD+5]),
|
|
S_NORMAL (SPRY, 'F', 3, NULL , &States[S_SBLOOD+6]),
|
|
S_NORMAL (SPRY, 'G', 2, NULL , NULL),
|
|
};
|
|
|
|
IMPLEMENT_ACTOR (ABlood, Any, -1, 130)
|
|
PROP_Flags (MF_NOBLOCKMAP)
|
|
PROP_Flags2 (MF2_NOTELEPORT)
|
|
PROP_SpawnState(S_DBLOOD)
|
|
PROP_Mass (5)
|
|
END_DEFAULTS
|
|
|
|
void ABlood::SetDamage (int damage)
|
|
{
|
|
if (gameinfo.gametype == GAME_Doom)
|
|
{
|
|
if (damage <= 12 && damage >= 9)
|
|
{
|
|
SetState (SpawnState + 1);
|
|
}
|
|
else if (damage < 9)
|
|
{
|
|
SetState (SpawnState + 2);
|
|
}
|
|
}
|
|
else if (gameinfo.gametype == GAME_Strife)
|
|
{
|
|
if (damage > 13)
|
|
{
|
|
SetState (&States[S_SBLOOD]);
|
|
}
|
|
else if (damage >= 10)
|
|
{
|
|
SetState (&States[S_DBLOOD]);
|
|
}
|
|
else if (damage >= 7)
|
|
{
|
|
SetState (&States[S_DBLOOD+1]);
|
|
}
|
|
else
|
|
{
|
|
SetState (&States[S_DBLOOD+2]);
|
|
}
|
|
}
|
|
}
|
|
|
|
// Map spot ----------------------------------------------------------------
|
|
|
|
IMPLEMENT_STATELESS_ACTOR (AMapSpot, Any, 9001, 0)
|
|
PROP_Flags (MF_NOBLOCKMAP|MF_NOSECTOR|MF_NOGRAVITY)
|
|
PROP_RenderStyle (STYLE_None)
|
|
PROP_Flags3 (MF3_DONTSPLASH)
|
|
END_DEFAULTS
|
|
|
|
// Map spot with gravity ---------------------------------------------------
|
|
|
|
IMPLEMENT_STATELESS_ACTOR (AMapSpotGravity, Any, 9013, 0)
|
|
PROP_Flags (0)
|
|
PROP_Flags3(MF3_DONTSPLASH)
|
|
END_DEFAULTS
|
|
|
|
// Bloody gibs -------------------------------------------------------------
|
|
|
|
FState ARealGibs::States[] =
|
|
{
|
|
S_NORMAL (POL5, 'A', -1, NULL, NULL)
|
|
};
|
|
|
|
IMPLEMENT_ACTOR (ARealGibs, Any, -1, 0)
|
|
PROP_SpawnState (0)
|
|
PROP_Flags (MF_DROPOFF|MF_CORPSE)
|
|
PROP_Flags2 (MF2_NOTELEPORT)
|
|
PROP_Flags3 (MF3_DONTGIB)
|
|
END_DEFAULTS
|
|
|
|
// Gibs that can be placed on a map. ---------------------------------------
|
|
//
|
|
// These need to be a separate class from the above, in case someone uses
|
|
// a deh patch to change the gibs, since ZDoom actually creates a gib actor
|
|
// for actors that get crushed instead of changing their state as Doom did.
|
|
|
|
class AGibs : public ARealGibs
|
|
{
|
|
DECLARE_STATELESS_ACTOR (AGibs, ARealGibs)
|
|
};
|
|
|
|
IMPLEMENT_STATELESS_ACTOR (AGibs, Doom, 24, 146)
|
|
PROP_SpawnState (0)
|
|
END_DEFAULTS
|