mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-22 20:21:26 +00:00
- Converted the Heretic sound sequences and the particle fountains to DECORATE.
- Added DECORATE support for setting an actor's args. If this is done it will also disable the actor's special that can be set in a map. This is for actors that want to use A_CountdownArg or similar functions that use the args for something different than the special's parameters. - Converted a_sharedmisc.cpp to DECORATE. - Added a new NActorIterator that can search for classes specified by name. - Added a new constructor to TThinkerIterator that can search for DECORATE defined subclasses that are not represented by a real C++ class. - Fixed: BuildInfoDefaults must set the parent symbol table so that all actors can get to the global symbols stored in AActor. - Fixed some minor inconsistencies in the Arch-Vile's DECORATE definition. - Fixed: A_VileAttack moved the flame without relinking it into the sector lists. It also forgot to set the z-position correctly. (original Doom bug.) - Fixed: The Doom 2 cast finale didn't work with the dynamic state name handling. SVN r401 (trunk)
This commit is contained in:
parent
ca8765ed79
commit
c7644ca34e
26 changed files with 304 additions and 328 deletions
|
@ -1,3 +1,20 @@
|
|||
December 2, 2006 (Changes by Graf Zahl)
|
||||
- Converted the Heretic sound sequences and the particle fountains to DECORATE.
|
||||
- Added DECORATE support for setting an actor's args. If this is done
|
||||
it will also disable the actor's special that can be set in a map. This
|
||||
is for actors that want to use A_CountdownArg or similar functions
|
||||
that use the args for something different than the special's parameters.
|
||||
- Converted a_sharedmisc.cpp to DECORATE.
|
||||
- Added a new NActorIterator that can search for classes specified by name.
|
||||
- Added a new constructor to TThinkerIterator that can search
|
||||
for DECORATE defined subclasses that are not represented by a real C++ class.
|
||||
- Fixed: BuildInfoDefaults must set the parent symbol table so that
|
||||
all actors can get to the global symbols stored in AActor.
|
||||
- Fixed some minor inconsistencies in the Arch-Vile's DECORATE definition.
|
||||
- Fixed: A_VileAttack moved the flame without relinking it into the sector
|
||||
lists. It also forgot to set the z-position correctly. (original Doom bug.)
|
||||
- Fixed: The Doom 2 cast finale didn't work with the dynamic state name handling.
|
||||
|
||||
November 30, 2006
|
||||
- Removed all the "fast" and unused code from FColorMatcher. Today's
|
||||
computers are fast enough that the difference isn't even noticeable
|
||||
|
|
22
src/actor.h
22
src/actor.h
|
@ -187,7 +187,8 @@ enum
|
|||
// but still considered solid
|
||||
MF2_INVULNERABLE = 0x08000000, // mobj is invulnerable
|
||||
MF2_DORMANT = 0x10000000, // thing is dormant
|
||||
|
||||
MF2_ARGSDEFINED = 0x20000000, // Internal flag used by DECORATE to signal that the
|
||||
// args should not be taken from the mapthing definition
|
||||
MF2_SEEKERMISSILE = 0x40000000, // is a seeker (for reflection)
|
||||
MF2_REFLECTIVE = 0x80000000, // reflects missiles
|
||||
|
||||
|
@ -801,6 +802,25 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
class NActorIterator : public FActorIterator
|
||||
{
|
||||
const PClass *type;
|
||||
public:
|
||||
NActorIterator (const PClass *cls, int id) : FActorIterator (id) { type = cls; }
|
||||
NActorIterator (FName cls, int id) : FActorIterator (id) { type = PClass::FindClass(cls); }
|
||||
NActorIterator (const char *cls, int id) : FActorIterator (id) { type = PClass::FindClass(cls); }
|
||||
AActor *Next ()
|
||||
{
|
||||
AActor *actor;
|
||||
if (type == NULL) return NULL;
|
||||
do
|
||||
{
|
||||
actor = FActorIterator::Next ();
|
||||
} while (actor && !actor->IsKindOf (type));
|
||||
return actor;
|
||||
}
|
||||
};
|
||||
|
||||
inline AActor *Spawn (const PClass *type, fixed_t x, fixed_t y, fixed_t z, replace_t allowreplacement)
|
||||
{
|
||||
return AActor::StaticSpawn (type, x, y, z, allowreplacement);
|
||||
|
|
|
@ -385,6 +385,7 @@ void FThinkerIterator::Reinit ()
|
|||
|
||||
DThinker *FThinkerIterator::Next ()
|
||||
{
|
||||
if (m_ParentType == NULL) return NULL;
|
||||
do
|
||||
{
|
||||
do
|
||||
|
|
|
@ -86,8 +86,9 @@ private:
|
|||
|
||||
class FThinkerIterator
|
||||
{
|
||||
private:
|
||||
protected:
|
||||
const PClass *m_ParentType;
|
||||
private:
|
||||
Node *m_CurrThinker;
|
||||
BYTE m_Stat;
|
||||
bool m_SearchStats;
|
||||
|
@ -109,6 +110,15 @@ public:
|
|||
TThinkerIterator (int statnum, DThinker *prev) : FThinkerIterator (RUNTIME_CLASS(T), statnum, prev)
|
||||
{
|
||||
}
|
||||
TThinkerIterator (const PClass *subclass, int statnum=MAX_STATNUM+1) : FThinkerIterator(subclass, statnum)
|
||||
{
|
||||
}
|
||||
TThinkerIterator (FName subclass, int statnum=MAX_STATNUM+1) : FThinkerIterator(PClass::FindClass(subclass), statnum)
|
||||
{
|
||||
}
|
||||
TThinkerIterator (const char *subclass, int statnum=MAX_STATNUM+1) : FThinkerIterator(PClass::FindClass(subclass), statnum)
|
||||
{
|
||||
}
|
||||
T *Next ()
|
||||
{
|
||||
return static_cast<T *>(FThinkerIterator::Next ());
|
||||
|
|
|
@ -453,6 +453,7 @@ typedef struct
|
|||
const char *name;
|
||||
const char *type;
|
||||
const AActor *info;
|
||||
const PClass *Class;
|
||||
} castinfo_t;
|
||||
|
||||
castinfo_t castorder[] =
|
||||
|
@ -544,9 +545,15 @@ void F_StartCast (void)
|
|||
{
|
||||
type = PClass::FindClass (castorder[i].type);
|
||||
if (type == NULL)
|
||||
{
|
||||
castorder[i].info = GetDefault<AActor>();
|
||||
castorder[i].Class= RUNTIME_CLASS(AActor);
|
||||
}
|
||||
else
|
||||
{
|
||||
castorder[i].info = GetDefaultByType (type);
|
||||
castorder[i].Class= type;
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0; atkstates[i].type; i++)
|
||||
|
@ -708,7 +715,7 @@ bool F_CastResponder (event_t* ev)
|
|||
|
||||
// go into death frame
|
||||
castdeath = true;
|
||||
caststate = castorder[castnum].info->FindState(NAME_Death);
|
||||
caststate = castorder[castnum].Class->ActorInfo->FindState(1, NAME_Death);
|
||||
if (caststate != NULL)
|
||||
{
|
||||
casttics = caststate->GetTics();
|
||||
|
|
|
@ -275,7 +275,9 @@ void A_VileAttack (AActor *actor)
|
|||
return;
|
||||
|
||||
// move the fire between the vile and the player
|
||||
fire->x = actor->target->x - FixedMul (24*FRACUNIT, finecosine[an]);
|
||||
fire->y = actor->target->y - FixedMul (24*FRACUNIT, finesine[an]);
|
||||
fire->SetOrigin (actor->target->x + FixedMul (24*FRACUNIT, finecosine[an]),
|
||||
actor->target->y + FixedMul (24*FRACUNIT, finesine[an]),
|
||||
actor->target->z);
|
||||
|
||||
P_RadiusAttack (fire, actor, 70, 70, NAME_Fire, false);
|
||||
}
|
||||
|
|
|
@ -51,20 +51,6 @@ IMPLEMENT_STATELESS_ACTOR (AParticleFountain, Any, -1, 0)
|
|||
PROP_RenderFlags (RF_INVISIBLE)
|
||||
END_DEFAULTS
|
||||
|
||||
#define FOUNTAIN(color,ednum) \
|
||||
class A##color##ParticleFountain : public AParticleFountain { \
|
||||
DECLARE_STATELESS_ACTOR (A##color##ParticleFountain, AParticleFountain) }; \
|
||||
IMPLEMENT_STATELESS_ACTOR (A##color##ParticleFountain, Any, ednum, 0) \
|
||||
PROP_SpawnHealth (ednum-9026) \
|
||||
END_DEFAULTS
|
||||
|
||||
FOUNTAIN (Red, 9027);
|
||||
FOUNTAIN (Green, 9028);
|
||||
FOUNTAIN (Blue, 9029);
|
||||
FOUNTAIN (Yellow, 9030);
|
||||
FOUNTAIN (Purple, 9031);
|
||||
FOUNTAIN (Black, 9032);
|
||||
FOUNTAIN (White, 9033);
|
||||
|
||||
void AParticleFountain::PostBeginPlay ()
|
||||
{
|
||||
|
|
|
@ -18,36 +18,6 @@ bool P_MorphMonster (AActor *actor, const PClass *morphClass);
|
|||
bool P_UpdateMorphedMonster (AActor *actor);
|
||||
|
||||
|
||||
class AUnknown : public AActor
|
||||
{
|
||||
DECLARE_ACTOR (AUnknown, AActor)
|
||||
};
|
||||
|
||||
class APatrolPoint : public AActor
|
||||
{
|
||||
DECLARE_STATELESS_ACTOR (APatrolPoint, AActor)
|
||||
};
|
||||
|
||||
class APatrolSpecial : public AActor
|
||||
{
|
||||
DECLARE_STATELESS_ACTOR (APatrolSpecial, AActor)
|
||||
};
|
||||
|
||||
class AMapSpot : public AActor
|
||||
{
|
||||
DECLARE_STATELESS_ACTOR (AMapSpot, AActor)
|
||||
};
|
||||
|
||||
class AMapSpotGravity : public AMapSpot
|
||||
{
|
||||
DECLARE_STATELESS_ACTOR (AMapSpotGravity, AMapSpot)
|
||||
};
|
||||
|
||||
class ARealGibs : public AActor
|
||||
{
|
||||
DECLARE_ACTOR (ARealGibs, AActor)
|
||||
};
|
||||
|
||||
struct side_s;
|
||||
|
||||
class DBaseDecal : public DThinker
|
||||
|
|
|
@ -1,86 +0,0 @@
|
|||
#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
|
||||
|
||||
// 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
|
|
@ -177,141 +177,3 @@ void ASoundSequence::Deactivate (AActor *activator)
|
|||
SN_StopSequence (this);
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
// Predefined sound sequence actors for Heretic. These use health as the
|
||||
// sequence ID rather than args[0].
|
||||
//
|
||||
//==========================================================================
|
||||
|
||||
class AHereticSoundSequence : public ASoundSequence
|
||||
{
|
||||
DECLARE_STATELESS_ACTOR (AHereticSoundSequence, ASoundSequence)
|
||||
public:
|
||||
void PostBeginPlay ();
|
||||
};
|
||||
|
||||
IMPLEMENT_STATELESS_ACTOR (AHereticSoundSequence, Heretic, -1, 0)
|
||||
END_DEFAULTS
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
// AHereticSoundSequence :: PostBeginPlay
|
||||
//
|
||||
//==========================================================================
|
||||
|
||||
void AHereticSoundSequence::PostBeginPlay ()
|
||||
{
|
||||
args[0] = health - 1200;
|
||||
Super::PostBeginPlay();
|
||||
}
|
||||
|
||||
// SoundSequence1 -----------------------------------------------------------
|
||||
|
||||
class AHereticSoundSequence1 : public AHereticSoundSequence
|
||||
{
|
||||
DECLARE_STATELESS_ACTOR (AHereticSoundSequence1, AHereticSoundSequence)
|
||||
};
|
||||
|
||||
IMPLEMENT_STATELESS_ACTOR (AHereticSoundSequence1, Heretic, 1200, 0)
|
||||
PROP_SpawnHealth (1200)
|
||||
END_DEFAULTS
|
||||
|
||||
// SoundSequence2 -----------------------------------------------------------
|
||||
|
||||
class AHereticSoundSequence2 : public AHereticSoundSequence
|
||||
{
|
||||
DECLARE_STATELESS_ACTOR (AHereticSoundSequence2, AHereticSoundSequence)
|
||||
};
|
||||
|
||||
IMPLEMENT_STATELESS_ACTOR (AHereticSoundSequence2, Heretic, 1201, 0)
|
||||
PROP_SpawnHealth (1201)
|
||||
END_DEFAULTS
|
||||
|
||||
// SoundSequence3 -----------------------------------------------------------
|
||||
|
||||
class AHereticSoundSequence3 : public AHereticSoundSequence
|
||||
{
|
||||
DECLARE_STATELESS_ACTOR (AHereticSoundSequence3, AHereticSoundSequence)
|
||||
};
|
||||
|
||||
IMPLEMENT_STATELESS_ACTOR (AHereticSoundSequence3, Heretic, 1202, 0)
|
||||
PROP_SpawnHealth (1202)
|
||||
END_DEFAULTS
|
||||
|
||||
// SoundSequence4 -----------------------------------------------------------
|
||||
|
||||
class AHereticSoundSequence4 : public AHereticSoundSequence
|
||||
{
|
||||
DECLARE_STATELESS_ACTOR (AHereticSoundSequence4, AHereticSoundSequence)
|
||||
};
|
||||
|
||||
IMPLEMENT_STATELESS_ACTOR (AHereticSoundSequence4, Heretic, 1203, 0)
|
||||
PROP_SpawnHealth (1203)
|
||||
END_DEFAULTS
|
||||
|
||||
// SoundSequence5 -----------------------------------------------------------
|
||||
|
||||
class AHereticSoundSequence5 : public AHereticSoundSequence
|
||||
{
|
||||
DECLARE_STATELESS_ACTOR (AHereticSoundSequence5, AHereticSoundSequence)
|
||||
};
|
||||
|
||||
IMPLEMENT_STATELESS_ACTOR (AHereticSoundSequence5, Heretic, 1204, 0)
|
||||
PROP_SpawnHealth (1204)
|
||||
END_DEFAULTS
|
||||
|
||||
// SoundSequence6 -----------------------------------------------------------
|
||||
|
||||
class AHereticSoundSequence6 : public AHereticSoundSequence
|
||||
{
|
||||
DECLARE_STATELESS_ACTOR (AHereticSoundSequence6, AHereticSoundSequence)
|
||||
};
|
||||
|
||||
IMPLEMENT_STATELESS_ACTOR (AHereticSoundSequence6, Heretic, 1205, 0)
|
||||
PROP_SpawnHealth (1205)
|
||||
END_DEFAULTS
|
||||
|
||||
// SoundSequence7 -----------------------------------------------------------
|
||||
|
||||
class AHereticSoundSequence7 : public AHereticSoundSequence
|
||||
{
|
||||
DECLARE_STATELESS_ACTOR (AHereticSoundSequence7, AHereticSoundSequence)
|
||||
};
|
||||
|
||||
IMPLEMENT_STATELESS_ACTOR (AHereticSoundSequence7, Heretic, 1206, 0)
|
||||
PROP_SpawnHealth (1206)
|
||||
END_DEFAULTS
|
||||
|
||||
// SoundSequence8 -----------------------------------------------------------
|
||||
|
||||
class AHereticSoundSequence8 : public AHereticSoundSequence
|
||||
{
|
||||
DECLARE_STATELESS_ACTOR (AHereticSoundSequence8, AHereticSoundSequence)
|
||||
};
|
||||
|
||||
IMPLEMENT_STATELESS_ACTOR (AHereticSoundSequence8, Heretic, 1207, 0)
|
||||
PROP_SpawnHealth (1207)
|
||||
END_DEFAULTS
|
||||
|
||||
// SoundSequence9 -----------------------------------------------------------
|
||||
|
||||
class AHereticSoundSequence9 : public AHereticSoundSequence
|
||||
{
|
||||
DECLARE_STATELESS_ACTOR (AHereticSoundSequence9, AHereticSoundSequence)
|
||||
};
|
||||
|
||||
IMPLEMENT_STATELESS_ACTOR (AHereticSoundSequence9, Heretic, 1208, 0)
|
||||
PROP_SpawnHealth (1208)
|
||||
END_DEFAULTS
|
||||
|
||||
// SoundSequence10 ----------------------------------------------------------
|
||||
|
||||
class AHereticSoundSequence10 : public AHereticSoundSequence
|
||||
{
|
||||
DECLARE_STATELESS_ACTOR (AHereticSoundSequence10, AHereticSoundSequence)
|
||||
};
|
||||
|
||||
IMPLEMENT_STATELESS_ACTOR (AHereticSoundSequence10, Heretic, 1209, 0)
|
||||
PROP_SpawnHealth (1209)
|
||||
END_DEFAULTS
|
||||
|
|
|
@ -63,6 +63,8 @@ void FActorInfo::BuildDefaults ()
|
|||
parent = Class->ParentClass;
|
||||
parent->ActorInfo->BuildDefaults ();
|
||||
Class->Meta = parent->Meta;
|
||||
Class->Symbols.SetParentTable (&parent->Symbols);
|
||||
|
||||
assert (Class->Size >= parent->Size);
|
||||
memcpy (Class->Defaults, parent->Defaults, parent->Size);
|
||||
if (Class->Size > parent->Size)
|
||||
|
|
|
@ -209,3 +209,8 @@ xx(WaterLevel)
|
|||
xx(X)
|
||||
xx(Y)
|
||||
xx(Z)
|
||||
|
||||
// Various actor names which are used internally
|
||||
xx(MapSpot)
|
||||
xx(PatrolPoint)
|
||||
xx(PatrolSpecial)
|
||||
|
|
|
@ -1542,7 +1542,7 @@ void A_Look (AActor *actor)
|
|||
// [RH] Set goal now if appropriate
|
||||
if (actor->special == Thing_SetGoal && actor->args[0] == 0)
|
||||
{
|
||||
TActorIterator<APatrolPoint> iterator (actor->args[1]);
|
||||
NActorIterator iterator (NAME_PatrolPoint, actor->args[1]);
|
||||
actor->special = 0;
|
||||
actor->goal = iterator.Next ();
|
||||
actor->reactiontime = actor->args[2] * TICRATE + level.maptime;
|
||||
|
@ -1907,8 +1907,8 @@ void A_DoChase (AActor *actor, bool fastchase, FState *meleestate, FState *missi
|
|||
if (result)
|
||||
{
|
||||
// reached the goal
|
||||
TActorIterator<APatrolPoint> iterator (actor->goal->args[0]);
|
||||
TActorIterator<APatrolSpecial> specit (actor->goal->tid);
|
||||
NActorIterator iterator (NAME_PatrolPoint, actor->goal->args[0]);
|
||||
NActorIterator specit (NAME_PatrolSpecial, actor->goal->tid);
|
||||
AActor *spec;
|
||||
|
||||
// Execute the specials of any PatrolSpecials with the same TID
|
||||
|
|
|
@ -1447,9 +1447,9 @@ FUNC(LS_Thing_SetGoal)
|
|||
// Thing_SetGoal (tid, goal, delay, chasegoal)
|
||||
{
|
||||
TActorIterator<AActor> selfiterator (arg0);
|
||||
TActorIterator<APatrolPoint> goaliterator (arg1);
|
||||
NActorIterator goaliterator (NAME_PatrolPoint, arg1);
|
||||
AActor *self;
|
||||
APatrolPoint *goal = goaliterator.Next ();
|
||||
AActor *goal = goaliterator.Next ();
|
||||
bool ok = false;
|
||||
|
||||
while ( (self = selfiterator.Next ()) )
|
||||
|
|
|
@ -3884,7 +3884,7 @@ void P_DoCrunch (AActor *thing)
|
|||
}
|
||||
if (!(thing->flags & MF_NOBLOOD))
|
||||
{
|
||||
AActor *gib = Spawn<ARealGibs> (thing->x, thing->y, thing->z, ALLOW_REPLACE);
|
||||
AActor *gib = Spawn ("RealGibs", thing->x, thing->y, thing->z, ALLOW_REPLACE);
|
||||
gib->RenderStyle = thing->RenderStyle;
|
||||
gib->alpha = thing->alpha;
|
||||
gib->height = 0;
|
||||
|
|
|
@ -3760,7 +3760,7 @@ void P_SpawnMapThing (mapthing2_t *mthing, int position)
|
|||
Printf ("Unknown type %i at (%i, %i)\n",
|
||||
mthing->type,
|
||||
mthing->x, mthing->y);
|
||||
i = RUNTIME_CLASS(AUnknown);
|
||||
i = PClass::FindClass("Unknown");
|
||||
}
|
||||
// [RH] If the thing's corresponding sprite has no frames, also map
|
||||
// it to the unknown thing.
|
||||
|
@ -3776,7 +3776,7 @@ void P_SpawnMapThing (mapthing2_t *mthing, int position)
|
|||
{
|
||||
Printf ("%s at (%i, %i) has no frames\n",
|
||||
i->TypeName.GetChars(), mthing->x, mthing->y);
|
||||
i = RUNTIME_CLASS(AUnknown);
|
||||
i = PClass::FindClass("Unknown");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3856,9 +3856,12 @@ void P_SpawnMapThing (mapthing2_t *mthing, int position)
|
|||
mobj->SpawnAngle = mthing->angle;
|
||||
mobj->SpawnFlags = mthing->flags;
|
||||
|
||||
// [RH] Set the thing's special
|
||||
mobj->special = mthing->special;
|
||||
for(int j=0;j<5;j++) mobj->args[j]=mthing->args[j];
|
||||
if (!(mobj->flags2 & MF2_ARGSDEFINED))
|
||||
{
|
||||
// [RH] Set the thing's special
|
||||
mobj->special = mthing->special;
|
||||
for(int j=0;j<5;j++) mobj->args[j]=mthing->args[j];
|
||||
}
|
||||
|
||||
// [RH] Add ThingID to mobj and link it in with the others
|
||||
mobj->tid = mthing->thingid;
|
||||
|
|
|
@ -352,7 +352,7 @@ static AActor *SelectTeleDest (int tid, int tag)
|
|||
if (count == 0)
|
||||
{
|
||||
// Try to find a matching map spot (fixes Hexen MAP10)
|
||||
TActorIterator<AMapSpot> it2 (tid);
|
||||
NActorIterator it2 (NAME_MapSpot, tid);
|
||||
searcher = it2.Next ();
|
||||
if (searcher == NULL)
|
||||
{
|
||||
|
|
|
@ -2933,6 +2933,20 @@ static void ActorScale (AActor *defaults, Baggage &bag)
|
|||
defaults->scaleX= defaults->scaleY = FLOAT2FIXED(sc_Float);
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
//==========================================================================
|
||||
static void ActorArgs (AActor *defaults, Baggage &bag)
|
||||
{
|
||||
for (int i=0;i<5;i++)
|
||||
{
|
||||
SC_MustGetNumber();
|
||||
defaults->args[i] = sc_Number;
|
||||
if (i < 4 && !SC_CheckToken(',')) break;
|
||||
}
|
||||
defaults->flags2|=MF2_ARGSDEFINED;
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
//==========================================================================
|
||||
|
@ -3508,7 +3522,8 @@ static void ActorVSpeed (AActor *defaults, Baggage &bag)
|
|||
//==========================================================================
|
||||
static void ActorClearFlags (AActor *defaults, Baggage &bag)
|
||||
{
|
||||
defaults->flags=defaults->flags2=defaults->flags3=defaults->flags4=defaults->flags5=0;
|
||||
defaults->flags=defaults->flags3=defaults->flags4=defaults->flags5=0;
|
||||
defaults->flags2&=MF2_ARGSDEFINED; // this flag must not be cleared
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
|
@ -4300,6 +4315,7 @@ static const ActorProps props[] =
|
|||
{ "ammo.backpackamount", (apf)AmmoBackpackAmount, RUNTIME_CLASS(AAmmo) },
|
||||
{ "ammo.backpackmaxamount", (apf)AmmoBackpackMaxAmount, RUNTIME_CLASS(AAmmo) },
|
||||
{ "ammo.dropamount", (apf)AmmoDropAmount, RUNTIME_CLASS(AAmmo) },
|
||||
{ "args", ActorArgs, RUNTIME_CLASS(AActor) },
|
||||
{ "armor.maxsaveamount", (apf)ArmorMaxSaveAmount, RUNTIME_CLASS(ABasicArmorBonus) },
|
||||
{ "armor.saveamount", (apf)ArmorSaveAmount, RUNTIME_CLASS(AActor) },
|
||||
{ "armor.savepercent", (apf)ArmorSavePercent, RUNTIME_CLASS(AActor) },
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
|
||||
// Flags for A_CustomMissile
|
||||
const int CMF_AIMOFFSET = 1;
|
||||
const int CMF_AIMDIRECTION = 2;
|
||||
|
|
|
@ -1,10 +1,13 @@
|
|||
#include "actors/constants.txt"
|
||||
|
||||
#include "actors/shared/botstuff.txt"
|
||||
#include "actors/shared/sharedmisc.txt"
|
||||
#include "actors/shared/blood.txt"
|
||||
#include "actors/shared/debris.txt"
|
||||
#include "actors/shared/splashes.txt"
|
||||
#include "actors/shared/pickups.txt"
|
||||
#include "actors/shared/fountain.txt"
|
||||
#include "actors/shared/soundsequence.txt"
|
||||
|
||||
#include "actors/doom/doomplayer.txt"
|
||||
#include "actors/doom/possessed.txt"
|
||||
|
|
|
@ -34,8 +34,8 @@ ACTOR Archvile 64
|
|||
VILE AABBCCDDEEFF 2 A_VileChase
|
||||
Loop
|
||||
Missile:
|
||||
VILE G 1 BRIGHT A_VileStart
|
||||
VILE G 9 BRIGHT A_FaceTarget
|
||||
VILE G 0 BRIGHT A_VileStart
|
||||
VILE G 10 BRIGHT A_FaceTarget
|
||||
VILE H 8 BRIGHT A_VileTarget
|
||||
VILE IJKLMN 8 BRIGHT A_FaceTarget
|
||||
VILE O 8 BRIGHT A_VileAttack
|
||||
|
@ -75,10 +75,10 @@ ACTOR ArchvileFire
|
|||
Spawn:
|
||||
FIRE A 2 BRIGHT A_StartFire
|
||||
FIRE BAB 2 BRIGHT A_Fire
|
||||
FIRE C 0 BRIGHT A_FireCrackle
|
||||
FIRE CBCBCDCDCDEDED 2 BRIGHT A_Fire
|
||||
FIRE E 0 BRIGHT A_FireCrackle
|
||||
FIRE EFEFEFGHGHGH 2 BRIGHT A_Fire
|
||||
FIRE C 2 BRIGHT A_FireCrackle
|
||||
FIRE BCBCDCDCDEDED 2 BRIGHT A_Fire
|
||||
FIRE E 2 BRIGHT A_FireCrackle
|
||||
FIRE FEFEFGHGHGH 2 BRIGHT A_Fire
|
||||
Stop
|
||||
}
|
||||
}
|
||||
|
|
35
wadsrc/decorate/shared/fountain.txt
Normal file
35
wadsrc/decorate/shared/fountain.txt
Normal file
|
@ -0,0 +1,35 @@
|
|||
|
||||
ACTOR ParticleFountainRed : ParticleFountain 9027
|
||||
{
|
||||
Health 1
|
||||
}
|
||||
|
||||
ACTOR ParticleFountainGreen : ParticleFountain 9028
|
||||
{
|
||||
Health 2
|
||||
}
|
||||
|
||||
ACTOR ParticleFountainBlue : ParticleFountain 9029
|
||||
{
|
||||
Health 3
|
||||
}
|
||||
|
||||
ACTOR ParticleFountainYellow : ParticleFountain 9030
|
||||
{
|
||||
Health 4
|
||||
}
|
||||
|
||||
ACTOR ParticleFountainPurple : ParticleFountain 9031
|
||||
{
|
||||
Health 5
|
||||
}
|
||||
|
||||
ACTOR ParticleFountainBlack : ParticleFountain 9032
|
||||
{
|
||||
Health 6
|
||||
}
|
||||
|
||||
ACTOR ParticleFountainWhite : ParticleFountain 9033
|
||||
{
|
||||
Health 7
|
||||
}
|
92
wadsrc/decorate/shared/sharedmisc.txt
Normal file
92
wadsrc/decorate/shared/sharedmisc.txt
Normal file
|
@ -0,0 +1,92 @@
|
|||
|
||||
// Default actor for unregistered doomednums -------------------------------
|
||||
|
||||
ACTOR Unknown
|
||||
{
|
||||
Radius 32
|
||||
Height 56
|
||||
+NOGRAVITY
|
||||
+NOBLOCKMAP
|
||||
+DONTSPLASH
|
||||
States
|
||||
{
|
||||
Spawn:
|
||||
UNKN A -1
|
||||
Stop
|
||||
}
|
||||
}
|
||||
|
||||
// Route node for monster patrols -------------------------------------------
|
||||
|
||||
ACTOR PatrolPoint 9024
|
||||
{
|
||||
Radius 8
|
||||
Height 8
|
||||
Mass 10
|
||||
+NOGRAVITY
|
||||
+NOBLOCKMAP
|
||||
+DONTSPLASH
|
||||
RenderStyle None
|
||||
}
|
||||
|
||||
// A special to execute when a monster reaches a matching patrol point ------
|
||||
|
||||
ACTOR PatrolSpecial 9047
|
||||
{
|
||||
Radius 8
|
||||
Height 8
|
||||
Mass 10
|
||||
+NOGRAVITY
|
||||
+NOBLOCKMAP
|
||||
+DONTSPLASH
|
||||
RenderStyle None
|
||||
}
|
||||
|
||||
// Map spot ----------------------------------------------------------------
|
||||
|
||||
ACTOR MapSpot 9001
|
||||
{
|
||||
+NOBLOCKMAP
|
||||
+NOSECTOR
|
||||
+NOGRAVITY
|
||||
+DONTSPLASH
|
||||
RenderStyle None
|
||||
}
|
||||
|
||||
// Map spot with gravity ---------------------------------------------------
|
||||
|
||||
ACTOR MapSpotGravity : MapSpot 9013
|
||||
{
|
||||
-NOBLOCKMAP
|
||||
-NOSECTOR
|
||||
-NOGRAVITY
|
||||
}
|
||||
|
||||
// Bloody gibs -------------------------------------------------------------
|
||||
|
||||
ACTOR RealGibs
|
||||
{
|
||||
+DROPOFF
|
||||
+CORPSE
|
||||
+NOTELEPORT
|
||||
+DONTGIB
|
||||
States
|
||||
{
|
||||
Spawn:
|
||||
POL5 A -1
|
||||
Stop
|
||||
}
|
||||
}
|
||||
|
||||
// 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.
|
||||
|
||||
ACTOR Gibs : RealGibs 24
|
||||
{
|
||||
Game Doom
|
||||
SpawnID 146
|
||||
ClearFlags
|
||||
}
|
63
wadsrc/decorate/shared/soundsequence.txt
Normal file
63
wadsrc/decorate/shared/soundsequence.txt
Normal file
|
@ -0,0 +1,63 @@
|
|||
|
||||
// Heretic Sound sequences -----------------------------------------------------------
|
||||
|
||||
ACTOR HereticSoundSequence1 : SoundSequence 1200
|
||||
{
|
||||
Game Heretic
|
||||
Args 0
|
||||
}
|
||||
|
||||
ACTOR HereticSoundSequence2 : SoundSequence 1201
|
||||
{
|
||||
Game Heretic
|
||||
Args 1
|
||||
}
|
||||
|
||||
ACTOR HereticSoundSequence3 : SoundSequence 1202
|
||||
{
|
||||
Game Heretic
|
||||
Args 2
|
||||
}
|
||||
|
||||
ACTOR HereticSoundSequence4 : SoundSequence 1203
|
||||
{
|
||||
Game Heretic
|
||||
Args 3
|
||||
}
|
||||
|
||||
ACTOR HereticSoundSequence5 : SoundSequence 1204
|
||||
{
|
||||
Game Heretic
|
||||
Args 4
|
||||
}
|
||||
|
||||
ACTOR HereticSoundSequence6 : SoundSequence 1205
|
||||
{
|
||||
Game Heretic
|
||||
Args 5
|
||||
}
|
||||
|
||||
ACTOR HereticSoundSequence7 : SoundSequence 1206
|
||||
{
|
||||
Game Heretic
|
||||
Args 6
|
||||
}
|
||||
|
||||
ACTOR HereticSoundSequence8 : SoundSequence 1207
|
||||
{
|
||||
Game Heretic
|
||||
Args 7
|
||||
}
|
||||
|
||||
ACTOR HereticSoundSequence9 : SoundSequence 1208
|
||||
{
|
||||
Game Heretic
|
||||
Args 8
|
||||
}
|
||||
|
||||
ACTOR HereticSoundSequence10 : SoundSequence 1209
|
||||
{
|
||||
Game Heretic
|
||||
Args 9
|
||||
}
|
||||
|
|
@ -243,10 +243,13 @@ decorate.txt decorate/decorate.txt
|
|||
actors/constants.txt decorate/constants.txt
|
||||
|
||||
actors/shared/botstuff.txt decorate/shared/botstuff.txt
|
||||
actors/shared/sharedmisc.txt decorate/shared/sharedmisc.txt
|
||||
actors/shared/blood.txt decorate/shared/blood.txt
|
||||
actors/shared/debris.txt decorate/shared/debris.txt
|
||||
actors/shared/splashes.txt decorate/shared/splashes.txt
|
||||
actors/shared/pickups.txt decorate/shared/pickups.txt
|
||||
actors/shared/fountain.txt decorate/shared/fountain.txt
|
||||
actors/shared/soundsequence.txt decorate/shared/soundsequence.txt
|
||||
|
||||
actors/doom/doomplayer.txt decorate/doom/doomplayer.txt
|
||||
actors/doom/possessed.txt decorate/doom/possessed.txt
|
||||
|
|
36
zdoom.vcproj
36
zdoom.vcproj
|
@ -5964,42 +5964,6 @@
|
|||
RelativePath=".\src\g_shared\a_sharedglobal.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\g_shared\a_sharedmisc.cpp"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalOptions="" /I /fmod/api/inc" " /I /fmod/api/inc" " /I /fmod/api/inc" " /I /fmod/api/inc" " /I /fmod/api/inc" " /I /fmod/api/inc" " /I /fmod/api/inc" " /I /fmod/api/inc" "
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalOptions="" /I /fmod/api/inc" " /I /fmod/api/inc" " /I /fmod/api/inc" " /I /fmod/api/inc" " /I /fmod/api/inc" " /I /fmod/api/inc" " /I /fmod/api/inc" " /I /fmod/api/inc" "
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|x64"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalOptions="" /I /fmod/api/inc" " /I /fmod/api/inc" " /I /fmod/api/inc" " /I /fmod/api/inc" " /I /fmod/api/inc" " /I /fmod/api/inc" " /I /fmod/api/inc" " /I /fmod/api/inc" "
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug|x64"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalOptions="" /I /fmod/api/inc" " /I /fmod/api/inc" " /I /fmod/api/inc" " /I /fmod/api/inc" " /I /fmod/api/inc" " /I /fmod/api/inc" " /I /fmod/api/inc" " /I /fmod/api/inc" "
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\g_shared\a_skies.cpp"
|
||||
>
|
||||
|
|
Loading…
Reference in a new issue