- Replaced the static string buffer in ProcessStates with an FString.

- After doing some tests with state label scopes I had to conclude that
  using '.' both for separating sub-state-labels and scope resolution 
  identifiers does not work reliably unless all actor class names were
  prohibited from being used as state labels.  Since that is undesirable
  the only solution is to change the scope resolution operator. Fortunately 
  no WADs so far have used it so implementing such a breaking change isn't 
  a major issue. Now it uses '::', like C++ for this purpose.
- Converted Revenant, Mancubus and Pain Elemental to DECORATE.


SVN r375 (trunk)
This commit is contained in:
Christoph Oelckers 2006-11-04 22:26:04 +00:00
parent 5e8323b426
commit 8c2f651bdb
27 changed files with 498 additions and 549 deletions

View file

@ -1,4 +1,13 @@
November 4, 2006 (Changes by Graf Zahl) November 4, 2006 (Changes by Graf Zahl)
- Replaced the static string buffer in ProcessStates with an FString.
- After doing some tests with state label scopes I had to conclude that
using '.' both for separating sub-state-labels and scope resolution
identifiers does not work reliably unless all actor class names were
prohibited from being used as state labels. Since that is undesirable
the only solution is to change the scope resolution operator. Fortunately
no WADs so far have used it so implementing such a breaking change isn't
a major issue. Now it uses '::', like C++ for this purpose.
- Converted Revenant, Mancubus and Pain Elemental to DECORATE.
- Converted Arachnotron, Archvile, Cyberdemon, Spidermastermind and - Converted Arachnotron, Archvile, Cyberdemon, Spidermastermind and
CommanderKeen to DECORATE. CommanderKeen to DECORATE.
- Converted ExplosiveBarrel, BulletPuff and DoomUnusedStates to DECORATE. - Converted ExplosiveBarrel, BulletPuff and DoomUnusedStates to DECORATE.

View file

@ -8,134 +8,6 @@
#include "a_action.h" #include "a_action.h"
#include "thingdef.h" #include "thingdef.h"
void A_FatRaise (AActor *);
void A_FatAttack1 (AActor *);
void A_FatAttack2 (AActor *);
void A_FatAttack3 (AActor *);
class AFatso : public AActor
{
DECLARE_ACTOR (AFatso, AActor)
};
FState AFatso::States[] =
{
#define S_FATT_STND 0
S_NORMAL (FATT, 'A', 15, A_Look , &States[S_FATT_STND+1]),
S_NORMAL (FATT, 'B', 15, A_Look , &States[S_FATT_STND]),
#define S_FATT_RUN (S_FATT_STND+2)
S_NORMAL (FATT, 'A', 4, A_Chase , &States[S_FATT_RUN+1]),
S_NORMAL (FATT, 'A', 4, A_Chase , &States[S_FATT_RUN+2]),
S_NORMAL (FATT, 'B', 4, A_Chase , &States[S_FATT_RUN+3]),
S_NORMAL (FATT, 'B', 4, A_Chase , &States[S_FATT_RUN+4]),
S_NORMAL (FATT, 'C', 4, A_Chase , &States[S_FATT_RUN+5]),
S_NORMAL (FATT, 'C', 4, A_Chase , &States[S_FATT_RUN+6]),
S_NORMAL (FATT, 'D', 4, A_Chase , &States[S_FATT_RUN+7]),
S_NORMAL (FATT, 'D', 4, A_Chase , &States[S_FATT_RUN+8]),
S_NORMAL (FATT, 'E', 4, A_Chase , &States[S_FATT_RUN+9]),
S_NORMAL (FATT, 'E', 4, A_Chase , &States[S_FATT_RUN+10]),
S_NORMAL (FATT, 'F', 4, A_Chase , &States[S_FATT_RUN+11]),
S_NORMAL (FATT, 'F', 4, A_Chase , &States[S_FATT_RUN+0]),
#define S_FATT_ATK (S_FATT_RUN+12)
S_NORMAL (FATT, 'G', 20, A_FatRaise , &States[S_FATT_ATK+1]),
S_BRIGHT (FATT, 'H', 10, A_FatAttack1 , &States[S_FATT_ATK+2]),
S_NORMAL (FATT, 'I', 5, A_FaceTarget , &States[S_FATT_ATK+3]),
S_NORMAL (FATT, 'G', 5, A_FaceTarget , &States[S_FATT_ATK+4]),
S_BRIGHT (FATT, 'H', 10, A_FatAttack2 , &States[S_FATT_ATK+5]),
S_NORMAL (FATT, 'I', 5, A_FaceTarget , &States[S_FATT_ATK+6]),
S_NORMAL (FATT, 'G', 5, A_FaceTarget , &States[S_FATT_ATK+7]),
S_BRIGHT (FATT, 'H', 10, A_FatAttack3 , &States[S_FATT_ATK+8]),
S_NORMAL (FATT, 'I', 5, A_FaceTarget , &States[S_FATT_ATK+9]),
S_NORMAL (FATT, 'G', 5, A_FaceTarget , &States[S_FATT_RUN+0]),
#define S_FATT_PAIN (S_FATT_ATK+10)
S_NORMAL (FATT, 'J', 3, NULL , &States[S_FATT_PAIN+1]),
S_NORMAL (FATT, 'J', 3, A_Pain , &States[S_FATT_RUN+0]),
#define S_FATT_DIE (S_FATT_PAIN+2)
S_NORMAL (FATT, 'K', 6, NULL , &States[S_FATT_DIE+1]),
S_NORMAL (FATT, 'L', 6, A_Scream , &States[S_FATT_DIE+2]),
S_NORMAL (FATT, 'M', 6, A_NoBlocking , &States[S_FATT_DIE+3]),
S_NORMAL (FATT, 'N', 6, NULL , &States[S_FATT_DIE+4]),
S_NORMAL (FATT, 'O', 6, NULL , &States[S_FATT_DIE+5]),
S_NORMAL (FATT, 'P', 6, NULL , &States[S_FATT_DIE+6]),
S_NORMAL (FATT, 'Q', 6, NULL , &States[S_FATT_DIE+7]),
S_NORMAL (FATT, 'R', 6, NULL , &States[S_FATT_DIE+8]),
S_NORMAL (FATT, 'S', 6, NULL , &States[S_FATT_DIE+9]),
S_NORMAL (FATT, 'T', -1, A_BossDeath , NULL),
#define S_FATT_RAISE (S_FATT_DIE+10)
S_NORMAL (FATT, 'R', 5, NULL , &States[S_FATT_RAISE+1]),
S_NORMAL (FATT, 'Q', 5, NULL , &States[S_FATT_RAISE+2]),
S_NORMAL (FATT, 'P', 5, NULL , &States[S_FATT_RAISE+3]),
S_NORMAL (FATT, 'O', 5, NULL , &States[S_FATT_RAISE+4]),
S_NORMAL (FATT, 'N', 5, NULL , &States[S_FATT_RAISE+5]),
S_NORMAL (FATT, 'M', 5, NULL , &States[S_FATT_RAISE+6]),
S_NORMAL (FATT, 'L', 5, NULL , &States[S_FATT_RAISE+7]),
S_NORMAL (FATT, 'K', 5, NULL , &States[S_FATT_RUN+0])
};
IMPLEMENT_ACTOR (AFatso, Doom, 67, 112)
PROP_SpawnHealth (600)
PROP_RadiusFixed (48)
PROP_HeightFixed (64)
PROP_Mass (1000)
PROP_SpeedFixed (8)
PROP_PainChance (80)
PROP_Flags (MF_SOLID|MF_SHOOTABLE|MF_COUNTKILL)
PROP_Flags2 (MF2_MCROSS|MF2_PASSMOBJ|MF2_PUSHWALL|MF2_FLOORCLIP)
PROP_Flags4 (MF4_BOSSDEATH)
PROP_SpawnState (S_FATT_STND)
PROP_SeeState (S_FATT_RUN)
PROP_PainState (S_FATT_PAIN)
PROP_MissileState (S_FATT_ATK)
PROP_DeathState (S_FATT_DIE)
PROP_RaiseState (S_FATT_RAISE)
PROP_SeeSound ("fatso/sight")
PROP_PainSound ("fatso/pain")
PROP_DeathSound ("fatso/death")
PROP_ActiveSound ("fatso/active")
PROP_Obituary("$OB_FATSO")
END_DEFAULTS
class AFatShot : public AActor
{
DECLARE_ACTOR (AFatShot, AActor)
};
FState AFatShot::States[] =
{
#define S_FATSHOT 0
S_BRIGHT (MANF, 'A', 4, NULL , &States[S_FATSHOT+1]),
S_BRIGHT (MANF, 'B', 4, NULL , &States[S_FATSHOT+0]),
#define S_FATSHOTX (S_FATSHOT+2)
S_BRIGHT (MISL, 'B', 8, NULL , &States[S_FATSHOTX+1]),
S_BRIGHT (MISL, 'C', 6, NULL , &States[S_FATSHOTX+2]),
S_BRIGHT (MISL, 'D', 4, NULL , NULL)
};
IMPLEMENT_ACTOR (AFatShot, Doom, -1, 153)
PROP_RadiusFixed (6)
PROP_HeightFixed (8)
PROP_SpeedFixed (20)
PROP_Damage (8)
PROP_Flags (MF_NOBLOCKMAP|MF_MISSILE|MF_DROPOFF|MF_NOGRAVITY)
PROP_Flags2 (MF2_PCROSS|MF2_IMPACT|MF2_NOTELEPORT)
PROP_Flags4 (MF4_RANDOMIZE)
PROP_RenderStyle (STYLE_Add)
PROP_SpawnState (S_FATSHOT)
PROP_DeathState (S_FATSHOTX)
PROP_SeeSound ("fatso/attack")
PROP_DeathSound ("fatso/shotx")
END_DEFAULTS
// //
// Mancubus attack, // Mancubus attack,
// firing three missiles in three different directions? // firing three missiles in three different directions?
@ -160,7 +32,7 @@ void A_FatAttack1 (AActor *self)
const PClass *spawntype = NULL; const PClass *spawntype = NULL;
int index = CheckIndex (1, NULL); int index = CheckIndex (1, NULL);
if (index >= 0) spawntype = PClass::FindClass ((ENamedName)StateParameters[index]); if (index >= 0) spawntype = PClass::FindClass ((ENamedName)StateParameters[index]);
if (spawntype == NULL) spawntype = RUNTIME_CLASS(AFatShot); if (spawntype == NULL) spawntype = PClass::FindClass("FatShot");
A_FaceTarget (self); A_FaceTarget (self);
// Change direction to ... // Change direction to ...
@ -188,7 +60,7 @@ void A_FatAttack2 (AActor *self)
const PClass *spawntype = NULL; const PClass *spawntype = NULL;
int index = CheckIndex (1, NULL); int index = CheckIndex (1, NULL);
if (index >= 0) spawntype = PClass::FindClass ((ENamedName)StateParameters[index]); if (index >= 0) spawntype = PClass::FindClass ((ENamedName)StateParameters[index]);
if (spawntype == NULL) spawntype = RUNTIME_CLASS(AFatShot); if (spawntype == NULL) spawntype = PClass::FindClass("FatShot");
A_FaceTarget (self); A_FaceTarget (self);
// Now here choose opposite deviation. // Now here choose opposite deviation.
@ -216,7 +88,7 @@ void A_FatAttack3 (AActor *self)
const PClass *spawntype = NULL; const PClass *spawntype = NULL;
int index = CheckIndex (1, NULL); int index = CheckIndex (1, NULL);
if (index >= 0) spawntype = PClass::FindClass ((ENamedName)StateParameters[index]); if (index >= 0) spawntype = PClass::FindClass ((ENamedName)StateParameters[index]);
if (spawntype == NULL) spawntype = RUNTIME_CLASS(AFatShot); if (spawntype == NULL) spawntype = PClass::FindClass("FatShot");
A_FaceTarget (self); A_FaceTarget (self);
@ -257,7 +129,7 @@ void A_Mushroom (AActor *actor)
if (n == 0) if (n == 0)
n = actor->GetMissileDamage (0, 1); n = actor->GetMissileDamage (0, 1);
} }
if (spawntype == NULL) spawntype = RUNTIME_CLASS(AFatShot); if (spawntype == NULL) spawntype = PClass::FindClass("FatShot");
A_Explode (actor); // First make normal explosion A_Explode (actor); // First make normal explosion

View file

@ -11,74 +11,6 @@ void A_PainDie (AActor *);
void A_SkullAttack (AActor *self); void A_SkullAttack (AActor *self);
class APainElemental : public AActor
{
DECLARE_ACTOR (APainElemental, AActor)
};
FState APainElemental::States[] =
{
#define S_PAIN_STND 0
S_NORMAL (PAIN, 'A', 10, A_Look , &States[S_PAIN_STND]),
#define S_PAIN_RUN (S_PAIN_STND+1)
S_NORMAL (PAIN, 'A', 3, A_Chase , &States[S_PAIN_RUN+1]),
S_NORMAL (PAIN, 'A', 3, A_Chase , &States[S_PAIN_RUN+2]),
S_NORMAL (PAIN, 'B', 3, A_Chase , &States[S_PAIN_RUN+3]),
S_NORMAL (PAIN, 'B', 3, A_Chase , &States[S_PAIN_RUN+4]),
S_NORMAL (PAIN, 'C', 3, A_Chase , &States[S_PAIN_RUN+5]),
S_NORMAL (PAIN, 'C', 3, A_Chase , &States[S_PAIN_RUN+0]),
#define S_PAIN_ATK (S_PAIN_RUN+6)
S_NORMAL (PAIN, 'D', 5, A_FaceTarget , &States[S_PAIN_ATK+1]),
S_NORMAL (PAIN, 'E', 5, A_FaceTarget , &States[S_PAIN_ATK+2]),
S_BRIGHT (PAIN, 'F', 5, A_FaceTarget , &States[S_PAIN_ATK+3]),
S_BRIGHT (PAIN, 'F', 0, A_PainAttack , &States[S_PAIN_RUN+0]),
#define S_PAIN_PAIN (S_PAIN_ATK+4)
S_NORMAL (PAIN, 'G', 6, NULL , &States[S_PAIN_PAIN+1]),
S_NORMAL (PAIN, 'G', 6, A_Pain , &States[S_PAIN_RUN+0]),
#define S_PAIN_DIE (S_PAIN_PAIN+2)
S_BRIGHT (PAIN, 'H', 8, NULL , &States[S_PAIN_DIE+1]),
S_BRIGHT (PAIN, 'I', 8, A_Scream , &States[S_PAIN_DIE+2]),
S_BRIGHT (PAIN, 'J', 8, NULL , &States[S_PAIN_DIE+3]),
S_BRIGHT (PAIN, 'K', 8, NULL , &States[S_PAIN_DIE+4]),
S_BRIGHT (PAIN, 'L', 8, A_PainDie , &States[S_PAIN_DIE+5]),
S_BRIGHT (PAIN, 'M', 8, NULL , NULL),
#define S_PAIN_RAISE (S_PAIN_DIE+6)
S_NORMAL (PAIN, 'M', 8, NULL , &States[S_PAIN_RAISE+1]),
S_NORMAL (PAIN, 'L', 8, NULL , &States[S_PAIN_RAISE+2]),
S_NORMAL (PAIN, 'K', 8, NULL , &States[S_PAIN_RAISE+3]),
S_NORMAL (PAIN, 'J', 8, NULL , &States[S_PAIN_RAISE+4]),
S_NORMAL (PAIN, 'I', 8, NULL , &States[S_PAIN_RAISE+5]),
S_NORMAL (PAIN, 'H', 8, NULL , &States[S_PAIN_RUN+0])
};
IMPLEMENT_ACTOR (APainElemental, Doom, 71, 115)
PROP_SpawnHealth (400)
PROP_RadiusFixed (31)
PROP_HeightFixed (56)
PROP_Mass (400)
PROP_SpeedFixed (8)
PROP_PainChance (128)
PROP_Flags (MF_SOLID|MF_SHOOTABLE|MF_FLOAT|MF_NOGRAVITY|MF_COUNTKILL)
PROP_Flags2 (MF2_MCROSS|MF2_PASSMOBJ|MF2_PUSHWALL)
PROP_SpawnState (S_PAIN_STND)
PROP_SeeState (S_PAIN_RUN)
PROP_PainState (S_PAIN_PAIN)
PROP_MissileState (S_PAIN_ATK)
PROP_DeathState (S_PAIN_DIE)
PROP_RaiseState (S_PAIN_RAISE)
PROP_SeeSound ("pain/sight")
PROP_PainSound ("pain/pain")
PROP_DeathSound ("pain/death")
PROP_ActiveSound ("pain/active")
END_DEFAULTS
// //
// A_PainShootSkull // A_PainShootSkull
// Spawn a lost soul and launch it at the target // Spawn a lost soul and launch it at the target

View file

@ -12,153 +12,6 @@
static FRandom pr_tracer ("Tracer"); static FRandom pr_tracer ("Tracer");
static FRandom pr_skelfist ("SkelFist"); static FRandom pr_skelfist ("SkelFist");
void A_SkelMissile (AActor *);
void A_Tracer (AActor *);
void A_SkelWhoosh (AActor *);
void A_SkelFist (AActor *);
class ARevenant : public AActor
{
DECLARE_ACTOR (ARevenant, AActor)
};
FState ARevenant::States[] =
{
#define S_SKEL_STND 0
S_NORMAL (SKEL, 'A', 10, A_Look , &States[S_SKEL_STND+1]),
S_NORMAL (SKEL, 'B', 10, A_Look , &States[S_SKEL_STND]),
#define S_SKEL_RUN (S_SKEL_STND+2)
S_NORMAL (SKEL, 'A', 2, A_Chase , &States[S_SKEL_RUN+1]),
S_NORMAL (SKEL, 'A', 2, A_Chase , &States[S_SKEL_RUN+2]),
S_NORMAL (SKEL, 'B', 2, A_Chase , &States[S_SKEL_RUN+3]),
S_NORMAL (SKEL, 'B', 2, A_Chase , &States[S_SKEL_RUN+4]),
S_NORMAL (SKEL, 'C', 2, A_Chase , &States[S_SKEL_RUN+5]),
S_NORMAL (SKEL, 'C', 2, A_Chase , &States[S_SKEL_RUN+6]),
S_NORMAL (SKEL, 'D', 2, A_Chase , &States[S_SKEL_RUN+7]),
S_NORMAL (SKEL, 'D', 2, A_Chase , &States[S_SKEL_RUN+8]),
S_NORMAL (SKEL, 'E', 2, A_Chase , &States[S_SKEL_RUN+9]),
S_NORMAL (SKEL, 'E', 2, A_Chase , &States[S_SKEL_RUN+10]),
S_NORMAL (SKEL, 'F', 2, A_Chase , &States[S_SKEL_RUN+11]),
S_NORMAL (SKEL, 'F', 2, A_Chase , &States[S_SKEL_RUN+0]),
#define S_SKEL_FIST (S_SKEL_RUN+12)
S_NORMAL (SKEL, 'G', 0, A_FaceTarget , &States[S_SKEL_FIST+1]),
S_NORMAL (SKEL, 'G', 6, A_SkelWhoosh , &States[S_SKEL_FIST+2]),
S_NORMAL (SKEL, 'H', 6, A_FaceTarget , &States[S_SKEL_FIST+3]),
S_NORMAL (SKEL, 'I', 6, A_SkelFist , &States[S_SKEL_RUN+0]),
#define S_SKEL_MISS (S_SKEL_FIST+4)
S_BRIGHT (SKEL, 'J', 0, A_FaceTarget , &States[S_SKEL_MISS+1]),
S_BRIGHT (SKEL, 'J', 10, A_FaceTarget , &States[S_SKEL_MISS+2]),
S_NORMAL (SKEL, 'K', 10, A_SkelMissile , &States[S_SKEL_MISS+3]),
S_NORMAL (SKEL, 'K', 10, A_FaceTarget , &States[S_SKEL_RUN+0]),
#define S_SKEL_PAIN (S_SKEL_MISS+4)
S_NORMAL (SKEL, 'L', 5, NULL , &States[S_SKEL_PAIN+1]),
S_NORMAL (SKEL, 'L', 5, A_Pain , &States[S_SKEL_RUN+0]),
#define S_SKEL_DIE (S_SKEL_PAIN+2)
S_NORMAL (SKEL, 'L', 7, NULL , &States[S_SKEL_DIE+1]),
S_NORMAL (SKEL, 'M', 7, NULL , &States[S_SKEL_DIE+2]),
S_NORMAL (SKEL, 'N', 7, A_Scream , &States[S_SKEL_DIE+3]),
S_NORMAL (SKEL, 'O', 7, A_NoBlocking , &States[S_SKEL_DIE+4]),
S_NORMAL (SKEL, 'P', 7, NULL , &States[S_SKEL_DIE+5]),
S_NORMAL (SKEL, 'Q', -1, NULL , NULL),
#define S_SKEL_RAISE (S_SKEL_DIE+6)
S_NORMAL (SKEL, 'Q', 5, NULL , &States[S_SKEL_RAISE+1]),
S_NORMAL (SKEL, 'P', 5, NULL , &States[S_SKEL_RAISE+2]),
S_NORMAL (SKEL, 'O', 5, NULL , &States[S_SKEL_RAISE+3]),
S_NORMAL (SKEL, 'N', 5, NULL , &States[S_SKEL_RAISE+4]),
S_NORMAL (SKEL, 'M', 5, NULL , &States[S_SKEL_RAISE+5]),
S_NORMAL (SKEL, 'L', 5, NULL , &States[S_SKEL_RUN+0])
};
IMPLEMENT_ACTOR (ARevenant, Doom, 66, 20)
PROP_SpawnHealth (300)
PROP_RadiusFixed (20)
PROP_HeightFixed (56)
PROP_Mass (500)
PROP_SpeedFixed (10)
PROP_PainChance (100)
PROP_Flags (MF_SOLID|MF_SHOOTABLE|MF_COUNTKILL)
PROP_Flags2 (MF2_MCROSS|MF2_PASSMOBJ|MF2_PUSHWALL|MF2_FLOORCLIP)
PROP_Flags4 (MF4_LONGMELEERANGE|MF4_MISSILEMORE)
PROP_SpawnState (S_SKEL_STND)
PROP_SeeState (S_SKEL_RUN)
PROP_PainState (S_SKEL_PAIN)
PROP_MeleeState (S_SKEL_FIST)
PROP_MissileState (S_SKEL_MISS)
PROP_DeathState (S_SKEL_DIE)
PROP_RaiseState (S_SKEL_RAISE)
PROP_SeeSound ("skeleton/sight")
PROP_PainSound ("skeleton/pain")
PROP_DeathSound ("skeleton/death")
PROP_ActiveSound ("skeleton/active")
PROP_Obituary("$OB_UNDEAD")
PROP_HitObituary("$OB_UNDEADHIT")
END_DEFAULTS
class ARevenantTracer : public AActor
{
DECLARE_ACTOR (ARevenantTracer, AActor)
};
FState ARevenantTracer::States[] =
{
#define S_TRACER 0
S_BRIGHT (FATB, 'A', 2, A_Tracer , &States[S_TRACER+1]),
S_BRIGHT (FATB, 'B', 2, A_Tracer , &States[S_TRACER]),
#define S_TRACEEXP (S_TRACER+2)
S_BRIGHT (FBXP, 'A', 8, NULL , &States[S_TRACEEXP+1]),
S_BRIGHT (FBXP, 'B', 6, NULL , &States[S_TRACEEXP+2]),
S_BRIGHT (FBXP, 'C', 4, NULL , NULL)
};
IMPLEMENT_ACTOR (ARevenantTracer, Doom, -1, 53)
PROP_RadiusFixed (11)
PROP_HeightFixed (8)
PROP_SpeedFixed (10)
PROP_Damage (10)
PROP_Flags (MF_NOBLOCKMAP|MF_MISSILE|MF_DROPOFF|MF_NOGRAVITY)
PROP_Flags2 (MF2_PCROSS|MF2_IMPACT|MF2_NOTELEPORT|MF2_SEEKERMISSILE)
PROP_Flags4 (MF4_RANDOMIZE)
PROP_RenderStyle (STYLE_Add)
PROP_SpawnState (S_TRACER)
PROP_DeathState (S_TRACEEXP)
PROP_SeeSound ("skeleton/attack")
PROP_DeathSound ("skeleton/tracex")
END_DEFAULTS
class ARevenantTracerSmoke : public AActor
{
DECLARE_ACTOR (ARevenantTracerSmoke, AActor)
};
FState ARevenantTracerSmoke::States[] =
{
S_NORMAL (PUFF, 'B', 4, NULL , &States[1]),
S_NORMAL (PUFF, 'C', 4, NULL , &States[2]),
S_NORMAL (PUFF, 'B', 4, NULL , &States[3]),
S_NORMAL (PUFF, 'C', 4, NULL , &States[4]),
S_NORMAL (PUFF, 'D', 4, NULL , NULL)
};
IMPLEMENT_ACTOR (ARevenantTracerSmoke, Doom, -1, 0)
PROP_Flags (MF_NOBLOCKMAP|MF_NOGRAVITY)
PROP_RenderStyle (STYLE_Translucent)
PROP_Alpha (TRANSLUC50)
PROP_SpawnState (0)
END_DEFAULTS
// //
// A_SkelMissile // A_SkelMissile
// //
@ -171,7 +24,7 @@ void A_SkelMissile (AActor *self)
A_FaceTarget (self); A_FaceTarget (self);
missile = P_SpawnMissileZ (self, self->z + 48*FRACUNIT, missile = P_SpawnMissileZ (self, self->z + 48*FRACUNIT,
self->target, RUNTIME_CLASS(ARevenantTracer)); self->target, PClass::FindClass("RevenantTracer"));
if (missile != NULL) if (missile != NULL)
{ {
@ -206,7 +59,7 @@ void A_Tracer (AActor *self)
// spawn a puff of smoke behind the rocket // spawn a puff of smoke behind the rocket
P_SpawnPuff (PClass::FindClass(NAME_BulletPuff), self->x, self->y, self->z, 0, 3); P_SpawnPuff (PClass::FindClass(NAME_BulletPuff), self->x, self->y, self->z, 0, 3);
smoke = Spawn<ARevenantTracerSmoke> (self->x - self->momx, smoke = Spawn ("RevenantTracerSmoke", self->x - self->momx,
self->y - self->momy, self->z, ALLOW_REPLACE); self->y - self->momy, self->z, ALLOW_REPLACE);
smoke->momz = FRACUNIT; smoke->momz = FRACUNIT;

View file

@ -271,30 +271,6 @@ void A_RestoreSpecialThing2 (AActor *thing)
thing->SetState (thing->SpawnState); thing->SetState (thing->SpawnState);
} }
/***************************************************************************/
/* AItemFog, shown for respawning Doom and Strife items */
/***************************************************************************/
class AItemFog : public AActor
{
DECLARE_ACTOR (AItemFog, AActor)
};
FState AItemFog::States[] =
{
S_BRIGHT (IFOG, 'A', 6, NULL , &States[1]),
S_BRIGHT (IFOG, 'B', 6, NULL , &States[2]),
S_BRIGHT (IFOG, 'A', 6, NULL , &States[3]),
S_BRIGHT (IFOG, 'B', 6, NULL , &States[4]),
S_BRIGHT (IFOG, 'C', 6, NULL , &States[5]),
S_BRIGHT (IFOG, 'D', 6, NULL , &States[6]),
S_BRIGHT (IFOG, 'E', 6, NULL , NULL)
};
IMPLEMENT_ACTOR (AItemFog, Doom, -1, 0)
PROP_Flags (MF_NOBLOCKMAP|MF_NOGRAVITY)
PROP_SpawnState (0)
END_DEFAULTS
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// //
@ -314,7 +290,7 @@ void A_RestoreSpecialDoomThing (AActor *self)
{ {
self->SetState (self->SpawnState); self->SetState (self->SpawnState);
S_Sound (self, CHAN_VOICE, "misc/spawn", 1, ATTN_IDLE); S_Sound (self, CHAN_VOICE, "misc/spawn", 1, ATTN_IDLE);
Spawn<AItemFog> (self->x, self->y, self->z, ALLOW_REPLACE); Spawn ("ItemFog", self->x, self->y, self->z, ALLOW_REPLACE);
} }
} }

View file

@ -227,238 +227,250 @@ yy27:
YYCTYPE yych; YYCTYPE yych;
if((YYLIMIT - YYCURSOR) < 2) YYFILL(2); if((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
yych = *YYCURSOR; yych = *YYCURSOR;
if(yych <= '9') { if(yych <= ':') {
if(yych <= '%') { if(yych <= '&') {
if(yych <= ' ') { if(yych <= ' ') {
if(yych == 0x0A) goto yy35; if(yych == 0x0A) goto yy35;
goto yy33; goto yy33;
} else { } else {
if(yych == '"') goto yy37; if(yych == '"') goto yy37;
goto yy49; if(yych <= '%') goto yy50;
goto yy45;
} }
} else { } else {
if(yych <= ',') { if(yych <= '-') {
if(yych <= '&') goto yy44; if(yych <= '\'') goto yy51;
if(yych <= '\'') goto yy50; if(yych <= ',') goto yy50;
goto yy49; goto yy39;
} else { } else {
if(yych <= '-') goto yy39;
if(yych <= '.') goto yy43; if(yych <= '.') goto yy43;
if(yych >= '0') goto yy41; if(yych <= '/') goto yy31;
if(yych <= '9') goto yy41;
goto yy44;
} }
} }
} else { } else {
if(yych <= '^') { if(yych <= '^') {
if(yych <= '=') { if(yych <= '=') {
if(yych <= ';') goto yy49; if(yych <= ';') goto yy50;
if(yych <= '<') goto yy47; if(yych <= '<') goto yy48;
goto yy45; goto yy46;
} else { } else {
if(yych <= '>') goto yy48; if(yych <= '>') goto yy49;
if(yych <= '@') goto yy49; if(yych <= '@') goto yy50;
if(yych <= 'Z') goto yy50; if(yych <= 'Z') goto yy51;
goto yy49; goto yy50;
} }
} else { } else {
if(yych <= 'z') { if(yych <= 'z') {
if(yych == '`') goto yy49; if(yych == '`') goto yy50;
goto yy50; goto yy51;
} else { } else {
if(yych == '|') goto yy46; if(yych == '|') goto yy47;
if(yych <= '~') goto yy49; if(yych <= '~') goto yy50;
goto yy50; goto yy51;
} }
} }
} }
yy31:
yych = *(YYMARKER = ++YYCURSOR); yych = *(YYMARKER = ++YYCURSOR);
if(yych == '*') goto yy74; if(yych == '*') goto yy77;
if(yych == '/') goto yy72; if(yych == '/') goto yy75;
yy32: yy32:
#line 79 "src/sc_man_scanner.re" #line 80 "src/sc_man_scanner.re"
{ goto normal_token; } { goto normal_token; }
#line 280 "src/sc_man_scanner.h" #line 283 "src/sc_man_scanner.h"
yy33: yy33:
++YYCURSOR; ++YYCURSOR;
yych = *YYCURSOR; yych = *YYCURSOR;
goto yy71; goto yy74;
yy34: yy34:
#line 68 "src/sc_man_scanner.re" #line 68 "src/sc_man_scanner.re"
{ goto std1; } { goto std1; }
#line 288 "src/sc_man_scanner.h" #line 291 "src/sc_man_scanner.h"
yy35: yy35:
++YYCURSOR; ++YYCURSOR;
#line 69 "src/sc_man_scanner.re" #line 69 "src/sc_man_scanner.re"
{ goto newline; } { goto newline; }
#line 293 "src/sc_man_scanner.h" #line 296 "src/sc_man_scanner.h"
yy37: yy37:
++YYCURSOR; ++YYCURSOR;
#line 70 "src/sc_man_scanner.re" #line 70 "src/sc_man_scanner.re"
{ goto string; } { goto string; }
#line 298 "src/sc_man_scanner.h" #line 301 "src/sc_man_scanner.h"
yy39: yy39:
++YYCURSOR; ++YYCURSOR;
#line 72 "src/sc_man_scanner.re" #line 72 "src/sc_man_scanner.re"
{ goto negative_check; } { goto negative_check; }
#line 303 "src/sc_man_scanner.h" #line 306 "src/sc_man_scanner.h"
yy41: yy41:
++YYCURSOR; ++YYCURSOR;
if((yych = *YYCURSOR) == '.') goto yy68; if((yych = *YYCURSOR) == '.') goto yy71;
if(yych <= '/') goto yy52; if(yych <= '/') goto yy53;
if(yych <= '9') goto yy66; if(yych <= '9') goto yy69;
goto yy52; goto yy53;
yy42: yy42:
#line 80 "src/sc_man_scanner.re" #line 81 "src/sc_man_scanner.re"
{ goto normal_token; } { goto normal_token; }
#line 313 "src/sc_man_scanner.h" #line 316 "src/sc_man_scanner.h"
yy43: yy43:
yych = *++YYCURSOR; yych = *++YYCURSOR;
if(yych <= '/') goto yy32; if(yych <= '/') goto yy32;
if(yych <= '9') goto yy63; if(yych <= '9') goto yy66;
goto yy32; goto yy32;
yy44: yy44:
yych = *++YYCURSOR; yych = *++YYCURSOR;
if(yych == '&') goto yy61; if(yych == ':') goto yy64;
goto yy32; goto yy32;
yy45: yy45:
yych = *++YYCURSOR; yych = *++YYCURSOR;
if(yych == '=') goto yy59; if(yych == '&') goto yy62;
goto yy32; goto yy32;
yy46: yy46:
yych = *++YYCURSOR; yych = *++YYCURSOR;
if(yych == '|') goto yy57; if(yych == '=') goto yy60;
goto yy32; goto yy32;
yy47: yy47:
yych = *++YYCURSOR; yych = *++YYCURSOR;
if(yych == '<') goto yy55; if(yych == '|') goto yy58;
goto yy32; goto yy32;
yy48: yy48:
yych = *++YYCURSOR; yych = *++YYCURSOR;
if(yych == '>') goto yy53; if(yych == '<') goto yy56;
goto yy32; goto yy32;
yy49: yy49:
yych = *++YYCURSOR; yych = *++YYCURSOR;
if(yych == '>') goto yy54;
goto yy32; goto yy32;
yy50: yy50:
yych = *++YYCURSOR; yych = *++YYCURSOR;
goto yy52; goto yy32;
yy51: yy51:
yych = *++YYCURSOR;
goto yy53;
yy52:
++YYCURSOR; ++YYCURSOR;
if(YYLIMIT == YYCURSOR) YYFILL(1); if(YYLIMIT == YYCURSOR) YYFILL(1);
yych = *YYCURSOR; yych = *YYCURSOR;
yy52: yy53:
if(yych <= 'Z') { if(yych <= 'Z') {
if(yych <= '/') { if(yych <= '/') {
if(yych == '\'') goto yy51; if(yych == '\'') goto yy52;
goto yy42; goto yy42;
} else { } else {
if(yych <= '9') goto yy51; if(yych <= '9') goto yy52;
if(yych <= '@') goto yy42; if(yych <= '@') goto yy42;
goto yy51; goto yy52;
} }
} else { } else {
if(yych <= '`') { if(yych <= '`') {
if(yych == '_') goto yy51; if(yych == '_') goto yy52;
goto yy42; goto yy42;
} else { } else {
if(yych <= 'z') goto yy51; if(yych <= 'z') goto yy52;
if(yych <= '~') goto yy42; if(yych <= '~') goto yy42;
goto yy51; goto yy52;
} }
} }
yy53: yy54:
++YYCURSOR;
#line 79 "src/sc_man_scanner.re"
{ goto normal_token; }
#line 380 "src/sc_man_scanner.h"
yy56:
++YYCURSOR; ++YYCURSOR;
#line 78 "src/sc_man_scanner.re" #line 78 "src/sc_man_scanner.re"
{ goto normal_token; } { goto normal_token; }
#line 373 "src/sc_man_scanner.h" #line 385 "src/sc_man_scanner.h"
yy55: yy58:
++YYCURSOR; ++YYCURSOR;
#line 77 "src/sc_man_scanner.re" #line 77 "src/sc_man_scanner.re"
{ goto normal_token; } { goto normal_token; }
#line 378 "src/sc_man_scanner.h" #line 390 "src/sc_man_scanner.h"
yy57: yy60:
++YYCURSOR; ++YYCURSOR;
#line 76 "src/sc_man_scanner.re" #line 76 "src/sc_man_scanner.re"
{ goto normal_token; } { goto normal_token; }
#line 383 "src/sc_man_scanner.h" #line 395 "src/sc_man_scanner.h"
yy59: yy62:
++YYCURSOR; ++YYCURSOR;
#line 75 "src/sc_man_scanner.re" #line 75 "src/sc_man_scanner.re"
{ goto normal_token; } { goto normal_token; }
#line 388 "src/sc_man_scanner.h" #line 400 "src/sc_man_scanner.h"
yy61: yy64:
++YYCURSOR; ++YYCURSOR;
#line 74 "src/sc_man_scanner.re" #line 74 "src/sc_man_scanner.re"
{ goto normal_token; } { goto normal_token; }
#line 393 "src/sc_man_scanner.h" #line 405 "src/sc_man_scanner.h"
yy63: yy66:
++YYCURSOR; ++YYCURSOR;
if(YYLIMIT == YYCURSOR) YYFILL(1); if(YYLIMIT == YYCURSOR) YYFILL(1);
yych = *YYCURSOR; yych = *YYCURSOR;
if(yych <= '/') goto yy65; if(yych <= '/') goto yy68;
if(yych <= '9') goto yy63; if(yych <= '9') goto yy66;
yy65: yy68:
#line 73 "src/sc_man_scanner.re" #line 73 "src/sc_man_scanner.re"
{ goto normal_token; } { goto normal_token; }
#line 403 "src/sc_man_scanner.h" #line 415 "src/sc_man_scanner.h"
yy66: yy69:
++YYCURSOR; ++YYCURSOR;
if(YYLIMIT == YYCURSOR) YYFILL(1); if(YYLIMIT == YYCURSOR) YYFILL(1);
yych = *YYCURSOR; yych = *YYCURSOR;
if(yych <= '@') { if(yych <= '@') {
if(yych <= '-') { if(yych <= '-') {
if(yych == '\'') goto yy51; if(yych == '\'') goto yy52;
goto yy42; goto yy42;
} else { } else {
if(yych <= '.') goto yy68; if(yych <= '.') goto yy71;
if(yych <= '/') goto yy42; if(yych <= '/') goto yy42;
if(yych <= '9') goto yy66; if(yych <= '9') goto yy69;
goto yy42; goto yy42;
} }
} else { } else {
if(yych <= '_') { if(yych <= '_') {
if(yych <= 'Z') goto yy51; if(yych <= 'Z') goto yy52;
if(yych <= '^') goto yy42; if(yych <= '^') goto yy42;
goto yy51; goto yy52;
} else { } else {
if(yych <= '`') goto yy42; if(yych <= '`') goto yy42;
if(yych <= 'z') goto yy51; if(yych <= 'z') goto yy52;
if(yych <= '~') goto yy42; if(yych <= '~') goto yy42;
goto yy51; goto yy52;
} }
} }
yy68:
++YYCURSOR;
if(YYLIMIT == YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
if(yych <= '/') goto yy65;
if(yych <= '9') goto yy68;
goto yy65;
yy70:
++YYCURSOR;
if(YYLIMIT == YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
yy71: yy71:
if(yych == 0x0A) goto yy34;
if(yych <= ' ') goto yy70;
goto yy34;
yy72:
++YYCURSOR; ++YYCURSOR;
if(YYLIMIT == YYCURSOR) YYFILL(1); if(YYLIMIT == YYCURSOR) YYFILL(1);
yych = *YYCURSOR; yych = *YYCURSOR;
if(yych == 0x0A) goto yy76; if(yych <= '/') goto yy68;
goto yy72; if(yych <= '9') goto yy71;
goto yy68;
yy73:
++YYCURSOR;
if(YYLIMIT == YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
yy74: yy74:
if(yych == 0x0A) goto yy34;
if(yych <= ' ') goto yy73;
goto yy34;
yy75:
++YYCURSOR;
if(YYLIMIT == YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
if(yych == 0x0A) goto yy79;
goto yy75;
yy77:
++YYCURSOR; ++YYCURSOR;
#line 65 "src/sc_man_scanner.re" #line 65 "src/sc_man_scanner.re"
{ goto comment; } { goto comment; }
#line 455 "src/sc_man_scanner.h" #line 467 "src/sc_man_scanner.h"
yy76: yy79:
++YYCURSOR; ++YYCURSOR;
#line 66 "src/sc_man_scanner.re" #line 66 "src/sc_man_scanner.re"
{ goto newline; } { goto newline; }
#line 460 "src/sc_man_scanner.h" #line 472 "src/sc_man_scanner.h"
} }
#line 83 "src/sc_man_scanner.re" #line 84 "src/sc_man_scanner.re"
} }
@ -485,22 +497,22 @@ negative_check:
comment: comment:
#line 489 "src/sc_man_scanner.h" #line 501 "src/sc_man_scanner.h"
{ {
YYCTYPE yych; YYCTYPE yych;
if((YYLIMIT - YYCURSOR) < 2) YYFILL(2); if((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
yych = *YYCURSOR; yych = *YYCURSOR;
if(yych == 0x0A) goto yy82; if(yych == 0x0A) goto yy85;
if(yych != '*') goto yy84; if(yych != '*') goto yy87;
++YYCURSOR; ++YYCURSOR;
if((yych = *YYCURSOR) == '/') goto yy85; if((yych = *YYCURSOR) == '/') goto yy88;
yy81: yy84:
#line 129 "src/sc_man_scanner.re" #line 130 "src/sc_man_scanner.re"
{ goto comment; } { goto comment; }
#line 501 "src/sc_man_scanner.h" #line 513 "src/sc_man_scanner.h"
yy82: yy85:
++YYCURSOR; ++YYCURSOR;
#line 119 "src/sc_man_scanner.re" #line 120 "src/sc_man_scanner.re"
{ {
if (YYCURSOR >= YYLIMIT) if (YYCURSOR >= YYLIMIT)
{ {
@ -511,13 +523,13 @@ yy82:
sc_Crossed = true; sc_Crossed = true;
goto comment; goto comment;
} }
#line 515 "src/sc_man_scanner.h" #line 527 "src/sc_man_scanner.h"
yy84: yy87:
yych = *++YYCURSOR; yych = *++YYCURSOR;
goto yy81; goto yy84;
yy85: yy88:
++YYCURSOR; ++YYCURSOR;
#line 110 "src/sc_man_scanner.re" #line 111 "src/sc_man_scanner.re"
{ {
if (YYCURSOR >= YYLIMIT) if (YYCURSOR >= YYLIMIT)
{ {
@ -526,9 +538,9 @@ yy85:
} }
goto std1; goto std1;
} }
#line 530 "src/sc_man_scanner.h" #line 542 "src/sc_man_scanner.h"
} }
#line 130 "src/sc_man_scanner.re" #line 131 "src/sc_man_scanner.re"
newline: newline:

View file

@ -71,6 +71,7 @@ std2:
[-] { goto negative_check; } [-] { goto negative_check; }
((D* [.] D+) | (D+ [.] D*)) { goto normal_token; } /* decimal number */ ((D* [.] D+) | (D+ [.] D*)) { goto normal_token; } /* decimal number */
"::" { goto normal_token; }
"&&" { goto normal_token; } "&&" { goto normal_token; }
"==" { goto normal_token; } "==" { goto normal_token; }
"||" { goto normal_token; } "||" { goto normal_token; }

View file

@ -514,6 +514,7 @@ ACTOR(Stop)
ACTOR(SPosAttackUseAtkSound) ACTOR(SPosAttackUseAtkSound)
ACTOR(Respawn) ACTOR(Respawn)
ACTOR(BarrelDestroy) ACTOR(BarrelDestroy)
ACTOR(PlayerSkinCheck)
#include "d_dehackedactions.h" #include "d_dehackedactions.h"
@ -710,6 +711,7 @@ AFuncDesc AFTable[]=
FUNC(A_KillMaster, NULL) FUNC(A_KillMaster, NULL)
FUNC(A_KillChildren, NULL) FUNC(A_KillChildren, NULL)
FUNC(A_CheckFloor, "L") FUNC(A_CheckFloor, "L")
FUNC(A_PlayerSkinCheck, "L")
{"A_BasicAttack", A_ComboAttack, "ISMF" }, {"A_BasicAttack", A_ComboAttack, "ISMF" },
// Weapon only functions // Weapon only functions
@ -1679,16 +1681,25 @@ static void RetargetStates (intptr_t count, const char *target)
// processes a state block // processes a state block
// //
//========================================================================== //==========================================================================
static void ParseStateString(char * statestring) static FString ParseStateString()
{ {
FString statestring;
SC_MustGetString(); SC_MustGetString();
strncpy (statestring, sc_String, 255); statestring = sc_String;
if (SC_CheckString("::"))
{
SC_MustGetString ();
statestring += "::";
statestring += sc_String;
}
while (SC_CheckString (".")) while (SC_CheckString ("."))
{ {
SC_MustGetString (); SC_MustGetString ();
strcat (statestring, "."); statestring += ".";
strcat (statestring, sc_String); statestring += sc_String;
} }
return statestring;
} }
//========================================================================== //==========================================================================
@ -1699,30 +1710,28 @@ static void ParseStateString(char * statestring)
//========================================================================== //==========================================================================
static int ProcessStates(FActorInfo * actor, AActor * defaults, Baggage &bag) static int ProcessStates(FActorInfo * actor, AActor * defaults, Baggage &bag)
{ {
char statestring[256]; FString statestring;
intptr_t count = 0; intptr_t count = 0;
FState state; FState state;
FState * laststate = NULL; FState * laststate = NULL;
intptr_t lastlabel = -1; intptr_t lastlabel = -1;
int minrequiredstate = -1; int minrequiredstate = -1;
statestring[255] = 0;
ChkBraceOpn(); ChkBraceOpn();
SC_SetEscape(false); // disable escape sequences in the state parser SC_SetEscape(false); // disable escape sequences in the state parser
while (!TestBraceCls() && !sc_End) while (!TestBraceCls() && !sc_End)
{ {
memset(&state,0,sizeof(state)); memset(&state,0,sizeof(state));
ParseStateString(statestring); statestring = ParseStateString();
if (!stricmp(statestring, "GOTO")) if (!statestring.CompareNoCase("GOTO"))
{ {
do_goto: do_goto:
ParseStateString(statestring); statestring = ParseStateString();
if (SC_CheckString ("+")) if (SC_CheckString ("+"))
{ {
SC_MustGetNumber (); SC_MustGetNumber ();
strcat (statestring, "+"); statestring += '+';
strcat (statestring, sc_String); statestring += sc_String;
} }
// copy the text - this must be resolved later! // copy the text - this must be resolved later!
if (laststate != NULL) if (laststate != NULL)
@ -1738,7 +1747,7 @@ do_goto:
SC_ScriptError("GOTO before first state"); SC_ScriptError("GOTO before first state");
} }
} }
else if (!stricmp(statestring, "STOP")) else if (!statestring.CompareNoCase("STOP"))
{ {
do_stop: do_stop:
if (laststate!=NULL) if (laststate!=NULL)
@ -1755,7 +1764,7 @@ do_stop:
continue; continue;
} }
} }
else if (!stricmp(statestring, "WAIT") || !stricmp(statestring, "FAIL")) else if (!statestring.CompareNoCase("WAIT") || !statestring.CompareNoCase("FAIL"))
{ {
if (!laststate) if (!laststate)
{ {
@ -1764,7 +1773,7 @@ do_stop:
} }
laststate->NextState=(FState*)-2; laststate->NextState=(FState*)-2;
} }
else if (!stricmp(statestring, "LOOP")) else if (!statestring.CompareNoCase("LOOP"))
{ {
if (!laststate) if (!laststate)
{ {
@ -1775,7 +1784,7 @@ do_stop:
} }
else else
{ {
char * statestrp; const char * statestrp;
SC_MustGetString(); SC_MustGetString();
if (SC_Compare (":")) if (SC_Compare (":"))
@ -1785,12 +1794,12 @@ do_stop:
{ {
lastlabel = count; lastlabel = count;
AddState(statestring, (FState *) (count+1)); AddState(statestring, (FState *) (count+1));
ParseStateString(statestring); statestring = ParseStateString();
if (!stricmp(statestring, "GOTO")) if (!statestring.CompareNoCase("GOTO"))
{ {
goto do_goto; goto do_goto;
} }
else if (!stricmp(statestring, "STOP")) else if (!statestring.CompareNoCase("STOP"))
{ {
goto do_stop; goto do_stop;
} }
@ -1801,7 +1810,7 @@ do_stop:
SC_UnGet (); SC_UnGet ();
if (strlen (statestring) != 4) if (statestring.Len() != 4)
{ {
SC_ScriptError ("Sprite names must be exactly 4 characters\n"); SC_ScriptError ("Sprite names must be exactly 4 characters\n");
} }
@ -1810,7 +1819,7 @@ do_stop:
state.Misc1=state.Misc2=0; state.Misc1=state.Misc2=0;
state.ParameterIndex=0; state.ParameterIndex=0;
SC_MustGetString(); SC_MustGetString();
strncpy(statestring, sc_String + 1, 255); statestring = (sc_String+1);
statestrp = statestring; statestrp = statestring;
state.Frame=(*sc_String&223)-'A'; state.Frame=(*sc_String&223)-'A';
if ((*sc_String&223)<'A' || (*sc_String&223)>']') if ((*sc_String&223)<'A' || (*sc_String&223)>']')
@ -1853,7 +1862,7 @@ do_stop:
strlwr (sc_String); strlwr (sc_String);
int minreq=count; int minreq=count;
if (DoSpecialFunctions(state,strlen(statestring)>0, &minreq, bag)) if (DoSpecialFunctions(state, !statestring.IsEmpty(), &minreq, bag))
{ {
if (minreq>minrequiredstate) minrequiredstate=minreq; if (minreq>minrequiredstate) minrequiredstate=minreq;
goto endofstate; goto endofstate;
@ -2081,11 +2090,11 @@ static FState *ResolveGotoLabel (AActor *actor, const PClass *mytype, char *name
int v; int v;
// Check for classname // Check for classname
if ((pt = strchr (name, '.')) != NULL) if ((pt = strstr (name, "::")) != NULL)
{ {
const char *classname = name; const char *classname = name;
*pt = '\0'; *pt = '\0';
name = pt + 1; name = pt + 2;
// The classname may either be "Super" to identify this class's immediate // The classname may either be "Super" to identify this class's immediate
// superclass, or it may be the name of any class that this one derives from. // superclass, or it may be the name of any class that this one derives from.
@ -2094,7 +2103,7 @@ static FState *ResolveGotoLabel (AActor *actor, const PClass *mytype, char *name
type = type->ParentClass; type = type->ParentClass;
actor = GetDefaultByType (type); actor = GetDefaultByType (type);
} }
else if (!FindState(actor, type, classname)) else
{ {
// first check whether a state of the desired name exists // first check whether a state of the desired name exists
const PClass *stype = PClass::FindClass (classname); const PClass *stype = PClass::FindClass (classname);
@ -2117,12 +2126,6 @@ static FState *ResolveGotoLabel (AActor *actor, const PClass *mytype, char *name
actor = GetDefaultByType (type); actor = GetDefaultByType (type);
} }
} }
else
{
// Restore the period in the name
*pt='.';
name = (char*)classname;
}
} }
label = name; label = name;
// Check for offset // Check for offset

View file

@ -1824,3 +1824,23 @@ void A_Respawn (AActor *actor)
} }
} }
//==========================================================================
//
// A_PlayerSkinCheck
//
//==========================================================================
void A_PlayerSkinCheck (AActor *actor)
{
if (actor->player != NULL &&
skins[actor->player->userinfo.skin].othergame)
{
int index = CheckIndex(1, &CallingState);
if (index >= 0)
{
DoJump(actor, CallingState, StateParameters[index]);
}
}
}

View file

@ -1,6 +1,7 @@
#include "actors/shared/blood.txt" #include "actors/shared/blood.txt"
#include "actors/shared/debris.txt" #include "actors/shared/debris.txt"
#include "actors/shared/splashes.txt" #include "actors/shared/splashes.txt"
#include "actors/shared/pickups.txt"
#include "actors/doom/possessed.txt" #include "actors/doom/possessed.txt"
#include "actors/doom/doomimp.txt" #include "actors/doom/doomimp.txt"
@ -8,7 +9,10 @@
#include "actors/doom/lostsoul.txt" #include "actors/doom/lostsoul.txt"
#include "actors/doom/cacodemon.txt" #include "actors/doom/cacodemon.txt"
#include "actors/doom/bruiser.txt" #include "actors/doom/bruiser.txt"
#include "actors/doom/revenant.txt"
#include "actors/doom/arachnotron.txt" #include "actors/doom/arachnotron.txt"
#include "actors/doom/fatso.txt"
#include "actors/doom/painelemental.txt"
#include "actors/doom/archvile.txt" #include "actors/doom/archvile.txt"
#include "actors/doom/cyberdemon.txt" #include "actors/doom/cyberdemon.txt"
#include "actors/doom/spidermaster.txt" #include "actors/doom/spidermaster.txt"

View file

@ -45,7 +45,7 @@ ACTOR Arachnotron 68
Goto See+1 Goto See+1
Death: Death:
BSPI J 20 A_Scream BSPI J 20 A_Scream
BSPI K 7 A_Fall BSPI K 7 A_NoBlocking
BSPI LMNO 7 BSPI LMNO 7
BSPI P -1 A_BossDeath BSPI P -1 A_BossDeath
Stop Stop

View file

@ -51,7 +51,7 @@ ACTOR Archvile 64
Death: Death:
VILE Q 7 VILE Q 7
VILE R 7 A_Scream VILE R 7 A_Scream
VILE S 7 A_Fall VILE S 7 A_NoBlocking
VILE TUVWXY 7 VILE TUVWXY 7
VILE Z -1 VILE Z -1
Stop Stop

View file

@ -42,7 +42,7 @@ ACTOR BaronOfHell 3003
BOSS I 8 BOSS I 8
BOSS J 8 A_Scream BOSS J 8 A_Scream
BOSS K 8 BOSS K 8
BOSS L 8 A_Fall BOSS L 8 A_NoBlocking
BOSS MN 8 BOSS MN 8
BOSS O -1 A_BossDeath BOSS O -1 A_BossDeath
Stop Stop
@ -90,7 +90,7 @@ ACTOR HellKnight : BaronOfHell 69
BOS2 I 8 BOS2 I 8
BOS2 J 8 A_Scream BOS2 J 8 A_Scream
BOS2 K 8 BOS2 K 8
BOS2 L 8 A_Fall BOS2 L 8 A_NoBlocking
BOS2 MN 8 BOS2 MN 8
BOS2 O -1 BOS2 O -1
Stop Stop

View file

@ -45,7 +45,7 @@ ACTOR Cacodemon 3005
HEAD H 8 A_Scream HEAD H 8 A_Scream
HEAD I 8 HEAD I 8
HEAD J 8 HEAD J 8
HEAD K 8 A_Fall HEAD K 8 A_NoBlocking
HEAD L -1 A_SetFloorClip HEAD L -1 A_SetFloorClip
Stop Stop
Raise: Raise:

View file

@ -53,7 +53,7 @@ ACTOR Cyberdemon 16
CYBR H 10 CYBR H 10
CYBR I 10 A_Scream CYBR I 10 A_Scream
CYBR JKL 10 CYBR JKL 10
CYBR M 10 A_Fall CYBR M 10 A_NoBlocking
CYBR NO 10 CYBR NO 10
CYBR P 30 CYBR P 30
CYBR P -1 A_BossDeath CYBR P -1 A_BossDeath

View file

@ -46,7 +46,7 @@ actor DeadZombieMan : ZombieMan 18
States States
{ {
Spawn: Spawn:
Goto Super.Death+4 Goto Super::Death+4
} }
} }
@ -60,7 +60,7 @@ actor DeadShotgunGuy : ShotgunGuy 19
States States
{ {
Spawn: Spawn:
Goto Super.Death+4 Goto Super::Death+4
} }
}; };
@ -73,7 +73,7 @@ actor DeadDoomImp : DoomImp 20
States States
{ {
Spawn: Spawn:
Goto Super.Death+4 Goto Super::Death+4
} }
} }
@ -86,7 +86,7 @@ actor DeadDemon : Demon 21
States States
{ {
Spawn: Spawn:
Goto Super.Death+5 Goto Super::Death+5
} }
} }
@ -99,7 +99,7 @@ actor DeadCacodemon : Cacodemon 22
States States
{ {
Spawn: Spawn:
Goto Super.Death+5 Goto Super::Death+5
} }
} }
@ -118,6 +118,6 @@ actor DeadLostSoul : LostSoul 23
States States
{ {
Spawn: Spawn:
Goto Super.Death+5 Goto Super::Death+5
} }
} }

View file

@ -41,7 +41,7 @@ ACTOR Demon 3002
SARG I 8 SARG I 8
SARG J 8 A_Scream SARG J 8 A_Scream
SARG K 4 SARG K 4
SARG L 4 A_Fall SARG L 4 A_NoBlocking
SARG M 4 SARG M 4
SARG N -1 SARG N -1
Stop Stop

View file

@ -42,14 +42,14 @@ ACTOR DoomImp 3001
TROO I 8 TROO I 8
TROO J 8 A_Scream TROO J 8 A_Scream
TROO K 6 TROO K 6
TROO L 6 A_Fall TROO L 6 A_NoBlocking
TROO M -1 TROO M -1
Stop Stop
XDeath: XDeath:
TROO N 5 TROO N 5
TROO O 5 A_XScream TROO O 5 A_XScream
TROO P 5 TROO P 5
TROO Q 5 A_Fall TROO Q 5 A_NoBlocking
TROO RST 5 TROO RST 5
TROO U -1 TROO U -1
Stop Stop

View file

@ -0,0 +1,94 @@
//===========================================================================
//
// Mancubus
//
//===========================================================================
ACTOR Fatso 67
{
Game Doom
SpawnID 112
Health 600
Radius 48
Height 64
Mass 1000
Speed 8
PainChance 80
Monster
+FLOORCLIP
+BOSSDEATH
SeeSound "fatso/sight"
PainSound "fatso/pain"
DeathSound "fatso/death"
ActiveSound "fatso/active"
AttackSound "fatso/raiseguns"
Obituary "$OB_FATSO"
States
{
Spawn:
FATT AB 15 A_Look
Loop
See:
FATT AABBCCDDEEFF 4 A_Chase
Loop
Missile:
FATT G 20 A_FatRaise
FATT H 10 BRIGHT A_FatAttack1
FATT IG 5
FATT H 10 BRIGHT A_FatAttack2
FATT IG 5
FATT H 10 BRIGHT A_FatAttack3
FATT IG 5
Goto See
Pain:
FATT J 3
FATT J 3 A_Pain
Goto See
Death:
FATT K 6
FATT L 6 A_Scream
FATT M 6 A_NoBlocking
FATT NOPQRS 6
FATT T -1 A_BossDeath
Stop
Raise:
FATT R 5
FATT QPONMLK 5
Goto See
}
}
//===========================================================================
//
// Mancubus fireball
//
//===========================================================================
ACTOR FatShot
{
Game Doom
SpawnID 153
Radius 6
Height 8
Speed 20
Damage 8
Projectile
+RANDOMIZE
RenderStyle Add
Alpha 1
SeeSound "fatso/attack"
DeathSound "fatso/shotx"
States
{
Spawn:
MANF AB 4 BRIGHT
Loop
Death:
MISL B 8 BRIGHT
MISL C 6 BRIGHT
MISL D 4 BRIGHT
Stop
}
}

View file

@ -29,7 +29,7 @@ ACTOR CommanderKeen 72
KEEN B 6 KEEN B 6
KEEN C 6 A_Scream KEEN C 6 A_Scream
KEEN DEFGH 6 KEEN DEFGH 6
KEEN I 6 A_Fall KEEN I 6 A_NoBlocking
KEEN J 6 KEEN J 6
KEEN K 6 A_KeenDie KEEN K 6 A_KeenDie
KEEN L -1 KEEN L -1

View file

@ -43,7 +43,7 @@ ACTOR LostSoul 3006
SKUL F 6 BRIGHT SKUL F 6 BRIGHT
SKUL G 6 BRIGHT A_Scream SKUL G 6 BRIGHT A_Scream
SKUL H 6 BRIGHT SKUL H 6 BRIGHT
SKUL I 6 BRIGHT A_Fall SKUL I 6 BRIGHT A_NoBlocking
SKUL J 6 SKUL J 6
SKUL K 6 SKUL K 6
Stop Stop

View file

@ -0,0 +1,52 @@
//===========================================================================
//
// Pain Elemental
//
//===========================================================================
ACTOR PainElemental 71
{
Game Doom
SpawnID 115
Health 400
Radius 31
Height 56
Mass 400
Speed 8
PainChance 128
Monster
+FLOAT
+NOGRAVITY
SeeSound "pain/sight"
PainSound "pain/pain"
DeathSound "pain/death"
ActiveSound "pain/active"
States
{
Spawn:
PAIN A 10 A_Look
Loop
See:
PAIN AABBCC 3 A_Chase
Loop
Missile:
PAIN D 5 A_FaceTarget
PAIN E 5 A_FaceTarget
PAIN F 4 BRIGHT A_FaceTarget
PAIN F 1 BRIGHT A_PainAttack
Goto See
Pain:
PAIN G 6
PAIN G 6 A_Pain
Goto See
Death:
PAIN H 8
PAIN I 8 A_Scream
PAIN JK 8
PAIN L 8 A_PainDie
PAIN M 8
Stop
Raise:
PAIN MLKJIH 8
Goto See
}
}

View file

@ -42,14 +42,14 @@ ACTOR ZombieMan 3004
Death: Death:
POSS H 5 POSS H 5
POSS I 5 A_Scream POSS I 5 A_Scream
POSS J 5 A_Fall POSS J 5 A_NoBlocking
POSS K 5 POSS K 5
POSS L -1 POSS L -1
Stop Stop
XDeath: XDeath:
POSS M 5 POSS M 5
POSS N 5 A_XScream POSS N 5 A_XScream
POSS O 5 A_Fall POSS O 5 A_NoBlocking
POSS PQRST 5 POSS PQRST 5
POSS U -1 POSS U -1
Stop Stop
@ -104,14 +104,14 @@ ACTOR ShotgunGuy 9
Death: Death:
SPOS H 5 SPOS H 5
SPOS I 5 A_Scream SPOS I 5 A_Scream
SPOS J 5 A_Fall SPOS J 5 A_NoBlocking
SPOS K 5 SPOS K 5
SPOS L -1 SPOS L -1
Stop Stop
XDeath: XDeath:
SPOS M 5 SPOS M 5
SPOS N 5 A_XScream SPOS N 5 A_XScream
SPOS O 5 A_Fall SPOS O 5 A_NoBlocking
SPOS PQRST 5 SPOS PQRST 5
SPOS U -1 SPOS U -1
Stop Stop
@ -166,14 +166,14 @@ ACTOR ChaingunGuy 65
Death: Death:
CPOS H 5 CPOS H 5
CPOS I 5 A_Scream CPOS I 5 A_Scream
CPOS J 5 A_Fall CPOS J 5 A_NoBlocking
CPOS KLM 5 CPOS KLM 5
CPOS N -1 CPOS N -1
Stop Stop
XDeath: XDeath:
CPOS O 5 CPOS O 5
CPOS P 5 A_XScream CPOS P 5 A_XScream
CPOS Q 5 A_Fall CPOS Q 5 A_NoBlocking
CPOS RS 5 CPOS RS 5
CPOS T -1 CPOS T -1
Stop Stop
@ -229,14 +229,14 @@ ACTOR WolfensteinSS 84
Death: Death:
SSWV I 5 SSWV I 5
SSWV J 5 A_Scream SSWV J 5 A_Scream
SSWV K 5 A_Fall SSWV K 5 A_NoBlocking
SSWV L 5 SSWV L 5
SSWV M -1 SSWV M -1
Stop Stop
XDeath: XDeath:
SSWV N 5 SSWV N 5
SSWV O 5 A_XScream SSWV O 5 A_XScream
SSWV P 5 A_Fall SSWV P 5 A_NoBlocking
SSWV QRSTU 5 SSWV QRSTU 5
SSWV V -1 SSWV V -1
Stop Stop

View file

@ -0,0 +1,117 @@
//===========================================================================
//
// Revenant
//
//===========================================================================
ACTOR Revenant 66
{
Game Doom
SpawnID 20
Health 300
Radius 20
Height 56
Mass 500
Speed 10
PainChance 100
Monster
+LONGMELEERANGE
+MISSILEMORE
+FLOORCLIP
SeeSound "skeleton/sight"
PainSound "skeleton/pain"
DeathSound "skeleton/death"
ActiveSound "skeleton/active"
MeleeSound "skeleton/melee"
HitObituary "$OB_UNDEADHIT"
Obituary "$OB_UNDEAD"
States
{
Spawn:
SKEL AB 10 A_Look
Loop
See:
SKEL AABBCCDDEEFF 2 A_Chase
Loop
Melee:
SKEL G 1 A_FaceTarget
SKEL G 6 A_SkelWhoosh
SKEL H 6 A_FaceTarget
SKEL I 6 A_SkelFist
Goto See
Missile:
SKEL J 1 BRIGHT A_FaceTarget
SKEL J 9 BRIGHT A_FaceTarget
SKEL K 10 A_SkelMissile
SKEL K 10 A_FaceTarget
Goto See
Pain:
SKEL L 5
SKEL L 5 A_Pain
Goto See
Death:
SKEL LM 7
SKEL N 7 A_Scream
SKEL O 7 A_NoBlocking
SKEL P 7
SKEL Q -1
Stop
Raise:
SKEL Q 5
SKEL PONML 5
Goto See
}
}
//===========================================================================
//
// Revenant Tracer
//
//===========================================================================
ACTOR RevenantTracer
{
Game Doom
SpawnID 53
Radius 11
Height 8
Speed 10
Damage 10
Projectile
+SEEKERMISSILE
+RANDOMIZE
SeeSound "skeleton/attack"
DeathSound "skeleton/tracex"
RenderStyle Add
States
{
Spawn:
FATB AB 2 BRIGHT A_Tracer
Loop
Death:
FBXP A 8 BRIGHT
FBXP B 6 BRIGHT
FBXP C 4 BRIGHT
Stop
}
}
//===========================================================================
//
// Revenant Tracer Smoke
//
//===========================================================================
ACTOR RevenantTracerSmoke
{
+NOBLOCKMAP
+NOGRAVITY
+NOTELEPORT
RenderStyle Translucent
Alpha 0.5
States
{
Spawn:
PUFF ABABC 4
Stop
}
}

View file

@ -41,10 +41,10 @@ ACTOR SpiderMastermind 7
SPID EFF 3 A_Chase SPID EFF 3 A_Chase
Loop Loop
Missile: Missile:
SPID A BRIGHT 20 A_FaceTarget SPID A 20 BRIGHT A_FaceTarget
SPID G BRIGHT 4 A_SPosAttack SPID G 4 BRIGHT A_SPosAttackUseAtkSound
SPID H BRIGHT 4 A_SposAttack SPID H 4 BRIGHT A_SposAttackUseAtkSound
SPID H BRIGHT 1 A_SpidRefire SPID H 1 BRIGHT A_SpidRefire
Goto Missile+1 Goto Missile+1
Pain: Pain:
SPID I 3 SPID I 3
@ -52,7 +52,7 @@ ACTOR SpiderMastermind 7
Goto See Goto See
Death: Death:
SPID J 20 A_Scream SPID J 20 A_Scream
SPID K 10 A_Fall SPID K 10 A_NoBlocking
SPID LMNOPQR 10 SPID LMNOPQR 10
SPID S 30 SPID S 30
SPID S -1 A_BossDeath SPID S -1 A_BossDeath

View file

@ -102,7 +102,7 @@ ACTOR ZTwinedTorchUnlit : ZTwinedTorch 117
States States
{ {
Spawn: Spawn:
Goto Super.Inactive Goto Super::Inactive
} }
} }
@ -134,7 +134,7 @@ ACTOR ZWallTorchUnlit : ZWallTorch 55
States States
{ {
Spawn: Spawn:
Goto Super.Inactive Goto Super::Inactive
} }
} }
@ -219,7 +219,7 @@ ACTOR ZFireBullUnlit : ZFireBull 8043
States States
{ {
Spawn: Spawn:
Goto Super.Inactive+2 Goto Super::Inactive+2
} }
} }
@ -282,7 +282,7 @@ ACTOR ZCauldronUnlit : ZCauldron 8070
States States
{ {
Spawn: Spawn:
Goto Super.Inactive Goto Super::Inactive
} }
} }

View file

@ -244,6 +244,7 @@ decorate.txt decorate/decorate.txt
actors/shared/blood.txt decorate/shared/blood.txt actors/shared/blood.txt decorate/shared/blood.txt
actors/shared/debris.txt decorate/shared/debris.txt actors/shared/debris.txt decorate/shared/debris.txt
actors/shared/splashes.txt decorate/shared/splashes.txt actors/shared/splashes.txt decorate/shared/splashes.txt
actors/shared/pickups.txt decorate/shared/pickups.txt
actors/doom/possessed.txt decorate/doom/possessed.txt actors/doom/possessed.txt decorate/doom/possessed.txt
actors/doom/doomimp.txt decorate/doom/doomimp.txt actors/doom/doomimp.txt decorate/doom/doomimp.txt
@ -252,6 +253,9 @@ actors/doom/lostsoul.txt decorate/doom/lostsoul.txt
actors/doom/cacodemon.txt decorate/doom/cacodemon.txt actors/doom/cacodemon.txt decorate/doom/cacodemon.txt
actors/doom/bruiser.txt decorate/doom/bruiser.txt actors/doom/bruiser.txt decorate/doom/bruiser.txt
actors/doom/arachnotron.txt decorate/doom/arachnotron.txt actors/doom/arachnotron.txt decorate/doom/arachnotron.txt
actors/doom/fatso.txt decorate/doom/fatso.txt
actors/doom/revenant.txt decorate/doom/revenant.txt
actors/doom/painelemental.txt decorate/doom/painelemental.txt
actors/doom/archvile.txt decorate/doom/archvile.txt actors/doom/archvile.txt decorate/doom/archvile.txt
actors/doom/cyberdemon.txt decorate/doom/cyberdemon.txt actors/doom/cyberdemon.txt decorate/doom/cyberdemon.txt
actors/doom/spidermaster.txt decorate/doom/spidermaster.txt actors/doom/spidermaster.txt decorate/doom/spidermaster.txt