mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-24 13:11:33 +00:00
SVN r258 (trunk)
This commit is contained in:
parent
1391b28643
commit
ecce60e8f9
90 changed files with 326 additions and 309 deletions
|
@ -1,3 +1,16 @@
|
|||
July 16, 2006 (Changes by Graf Zahl)
|
||||
- Fixed: PlayerStartItem created a duplicate of the item's class name before
|
||||
converting it into an FName.
|
||||
- Removed game check for Doom from P_BloodSplatter. The BloodSplatter actor
|
||||
is compatible with all games now so the explicit handling is no longer needed.
|
||||
- Moved replacement handling back into AActor::StaticSpawn but controlled
|
||||
by a (mandatory) parameter. Also added replacement to most other
|
||||
instances in the game where non-inventory items are spawned. Replacement is safe
|
||||
nearly everywhere except for inventory related spawns.
|
||||
- Fixed: Due to the player class inclusion A_NoBlocking never called
|
||||
NoBlockingSet for monsters.
|
||||
- Changed: Sounds can be specified by full path now in SNDINFO and S_SKIN.
|
||||
|
||||
July 15, 2006
|
||||
- Fixed: Makefile.mgw was mysteriously missing some targets. After fixing that,
|
||||
I also removed some of GCC's warnings.
|
||||
|
|
21
src/actor.h
21
src/actor.h
|
@ -352,6 +352,13 @@ enum ERenderStyle
|
|||
#define HX_SHADOW (0x9800)
|
||||
#define HX_ALTSHADOW (0x6800)
|
||||
|
||||
// This could easily be a bool but then it'd be much harder to find later. ;)
|
||||
enum replace_t
|
||||
{
|
||||
NO_REPLACE = 0,
|
||||
ALLOW_REPLACE = 1
|
||||
};
|
||||
|
||||
// [RH] Like msecnode_t, but for the blockmap
|
||||
struct FBlockNode
|
||||
{
|
||||
|
@ -421,7 +428,7 @@ public:
|
|||
|
||||
void Serialize (FArchive &arc);
|
||||
|
||||
static AActor *StaticSpawn (const PClass *type, fixed_t x, fixed_t y, fixed_t z);
|
||||
static AActor *StaticSpawn (const PClass *type, fixed_t x, fixed_t y, fixed_t z, replace_t allowreplacement);
|
||||
|
||||
inline AActor *GetDefault () const
|
||||
{
|
||||
|
@ -788,20 +795,20 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
inline AActor *Spawn (const PClass *type, fixed_t x, fixed_t y, fixed_t z)
|
||||
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);
|
||||
return AActor::StaticSpawn (type, x, y, z, allowreplacement);
|
||||
}
|
||||
|
||||
inline AActor *Spawn (const char *type, fixed_t x, fixed_t y, fixed_t z)
|
||||
inline AActor *Spawn (const char *type, fixed_t x, fixed_t y, fixed_t z, replace_t allowreplacement)
|
||||
{
|
||||
return AActor::StaticSpawn (PClass::FindClass(type), x, y, z);
|
||||
return AActor::StaticSpawn (PClass::FindClass(type), x, y, z, allowreplacement);
|
||||
}
|
||||
|
||||
template<class T>
|
||||
inline T *Spawn (fixed_t x, fixed_t y, fixed_t z)
|
||||
inline T *Spawn (fixed_t x, fixed_t y, fixed_t z, replace_t allowreplacement)
|
||||
{
|
||||
return static_cast<T *>(AActor::StaticSpawn (RUNTIME_CLASS(T), x, y, z));
|
||||
return static_cast<T *>(AActor::StaticSpawn (RUNTIME_CLASS(T), x, y, z, allowreplacement));
|
||||
}
|
||||
|
||||
#define S_FREETARGMOBJ 1
|
||||
|
|
|
@ -464,14 +464,14 @@ void DCajunMaster::SetBodyAt (fixed_t x, fixed_t y, fixed_t z, int hostnum)
|
|||
if (body1)
|
||||
body1->SetOrigin (x, y, z);
|
||||
else
|
||||
body1 = Spawn<ACajunBodyNode> (x, y, z);
|
||||
body1 = Spawn<ACajunBodyNode> (x, y, z, NO_REPLACE);
|
||||
}
|
||||
else if (hostnum == 2)
|
||||
{
|
||||
if (body2)
|
||||
body2->SetOrigin (x, y, z);
|
||||
else
|
||||
body2 = Spawn<ACajunBodyNode> (x, y, z);
|
||||
body2 = Spawn<ACajunBodyNode> (x, y, z, NO_REPLACE);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -499,7 +499,7 @@ END_DEFAULTS
|
|||
//Emulates missile travel. Returns distance travelled.
|
||||
fixed_t DCajunMaster::FakeFire (AActor *source, AActor *dest, ticcmd_t *cmd)
|
||||
{
|
||||
AActor *th = Spawn<ACajunTrace> (source->x, source->y, source->z + 4*8*FRACUNIT);
|
||||
AActor *th = Spawn<ACajunTrace> (source->x, source->y, source->z + 4*8*FRACUNIT, NO_REPLACE);
|
||||
|
||||
th->target = source; // where it came from
|
||||
|
||||
|
|
|
@ -2595,7 +2595,7 @@ void A_SpawnDehackedPickup (AActor *actor)
|
|||
{
|
||||
if ((size_t)actor->health < DehackedPickups.Size())
|
||||
{
|
||||
AActor *real = Spawn (DehackedPickups[actor->health], actor->x, actor->y, actor->z);
|
||||
AActor *real = Spawn (DehackedPickups[actor->health], actor->x, actor->y, actor->z, NO_REPLACE);
|
||||
if (real != NULL)
|
||||
{
|
||||
// Copy properties from the original item to the dehacked pickup it spawns
|
||||
|
@ -2621,7 +2621,7 @@ bool ADehackedPickup::TryPickup (AActor *toucher)
|
|||
{
|
||||
return false;
|
||||
}
|
||||
RealPickup = static_cast<AInventory *>(Spawn (type, x, y, z));
|
||||
RealPickup = static_cast<AInventory *>(Spawn (type, x, y, z, NO_REPLACE));
|
||||
if (RealPickup != NULL)
|
||||
{
|
||||
if (!(flags & MF_DROPPED))
|
||||
|
|
|
@ -2112,9 +2112,6 @@ void Net_DoCommand (int type, byte **stream, int player)
|
|||
typeinfo = PClass::FindClass (s);
|
||||
if (typeinfo != NULL && typeinfo->ActorInfo != NULL)
|
||||
{
|
||||
// Handle decorate replacements.
|
||||
typeinfo = typeinfo->ActorInfo->GetReplacement()->Class;
|
||||
|
||||
AActor *source = players[player].mo;
|
||||
if (source != NULL)
|
||||
{
|
||||
|
@ -2128,7 +2125,7 @@ void Net_DoCommand (int type, byte **stream, int player)
|
|||
AActor *spawned = Spawn (typeinfo,
|
||||
source->x + FixedMul (def->radius * 2 + source->radius, finecosine[source->angle>>ANGLETOFINESHIFT]),
|
||||
source->y + FixedMul (def->radius * 2 + source->radius, finesine[source->angle>>ANGLETOFINESHIFT]),
|
||||
source->z + 8 * FRACUNIT);
|
||||
source->z + 8 * FRACUNIT, ALLOW_REPLACE);
|
||||
if (spawned != NULL && type == DEM_SUMMONFRIEND)
|
||||
{
|
||||
spawned->FriendPlayer = player + 1;
|
||||
|
|
|
@ -354,7 +354,7 @@ void A_VileTarget (AActor *actor)
|
|||
A_FaceTarget (actor);
|
||||
|
||||
fog = Spawn<AArchvileFire> (actor->target->x, actor->target->x,
|
||||
actor->target->z);
|
||||
actor->target->z, ALLOW_REPLACE);
|
||||
|
||||
actor->tracer = fog;
|
||||
fog->target = actor;
|
||||
|
|
|
@ -184,7 +184,7 @@ void A_BrainPain (AActor *self)
|
|||
|
||||
static void BrainishExplosion (fixed_t x, fixed_t y, fixed_t z)
|
||||
{
|
||||
AActor *boom = Spawn<ARocket> (x, y, z);
|
||||
AActor *boom = Spawn<ARocket> (x, y, z, NO_REPLACE);
|
||||
if (boom != NULL)
|
||||
{
|
||||
boom->momz = pr_brainscream() << 9;
|
||||
|
@ -281,7 +281,7 @@ void A_SpawnFly (AActor *self)
|
|||
targ = self->target;
|
||||
|
||||
// First spawn teleport fire.
|
||||
fog = Spawn<ASpawnFire> (targ->x, targ->y, targ->z);
|
||||
fog = Spawn<ASpawnFire> (targ->x, targ->y, targ->z, ALLOW_REPLACE);
|
||||
S_Sound (fog, CHAN_BODY, "brain/spawn", 1, ATTN_NORM);
|
||||
|
||||
// Randomly select monster to spawn.
|
||||
|
@ -301,7 +301,7 @@ void A_SpawnFly (AActor *self)
|
|||
else if (r < 246) type = "HellKnight";
|
||||
else type = "BaronOfHell";
|
||||
|
||||
newmobj = Spawn (type, targ->x, targ->y, targ->z);
|
||||
newmobj = Spawn (type, targ->x, targ->y, targ->z, ALLOW_REPLACE);
|
||||
if (newmobj != NULL)
|
||||
{
|
||||
// Make the new monster hate what the boss eye hates
|
||||
|
|
|
@ -22,7 +22,7 @@ public:
|
|||
{
|
||||
player_t *player = Owner->player;
|
||||
|
||||
ABasicArmorPickup *armor = static_cast<ABasicArmorPickup *> (Spawn ("BlueArmor", 0,0,0));
|
||||
ABasicArmorPickup *armor = static_cast<ABasicArmorPickup *> (Spawn ("BlueArmor", 0,0,0, NO_REPLACE));
|
||||
if (!armor->TryPickup (Owner))
|
||||
{
|
||||
armor->Destroy ();
|
||||
|
|
|
@ -81,7 +81,7 @@ void A_BarrelRespawn (AActor *actor)
|
|||
actor->flags2 = defs->flags2;
|
||||
actor->SetState (actor->SpawnState);
|
||||
actor->renderflags &= ~RF_INVISIBLE;
|
||||
Spawn<ATeleportFog> (x, y, actor->z + TELEFOGHEIGHT);
|
||||
Spawn<ATeleportFog> (x, y, actor->z + TELEFOGHEIGHT, ALLOW_REPLACE);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -1080,7 +1080,7 @@ void A_BFGSpray (AActor *mo)
|
|||
continue;
|
||||
|
||||
Spawn (spraytype, linetarget->x, linetarget->y,
|
||||
linetarget->z + (linetarget->height>>2));
|
||||
linetarget->z + (linetarget->height>>2), ALLOW_REPLACE);
|
||||
|
||||
damage = 0;
|
||||
for (j = 0; j < damagecnt; ++j)
|
||||
|
|
|
@ -167,7 +167,7 @@ void A_PainShootSkull (AActor *self, angle_t angle)
|
|||
return;
|
||||
}
|
||||
|
||||
other = Spawn (spawntype, x, y, z);
|
||||
other = Spawn (spawntype, x, y, z, ALLOW_REPLACE);
|
||||
|
||||
|
||||
// Check to see if the new Lost Soul's z value is above the
|
||||
|
|
|
@ -207,7 +207,7 @@ void A_Tracer (AActor *self)
|
|||
P_SpawnPuff (RUNTIME_CLASS(ABulletPuff), self->x, self->y, self->z, 0, 3);
|
||||
|
||||
smoke = Spawn<ARevenantTracerSmoke> (self->x - self->momx,
|
||||
self->y - self->momy, self->z);
|
||||
self->y - self->momy, self->z, ALLOW_REPLACE);
|
||||
|
||||
smoke->momz = FRACUNIT;
|
||||
smoke->tics -= pr_tracer()&3;
|
||||
|
|
|
@ -211,6 +211,6 @@ void A_BeastPuff (AActor *actor)
|
|||
x = actor->x + (pr_beastpuff.Random2 () << 10);
|
||||
y = actor->y + (pr_beastpuff.Random2 () << 10);
|
||||
z = actor->z + (pr_beastpuff.Random2 () << 10);
|
||||
Spawn<APuffy> (x, y, z);
|
||||
Spawn<APuffy> (x, y, z, ALLOW_REPLACE);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -420,7 +420,7 @@ void A_Feathers (AActor *actor)
|
|||
}
|
||||
for (i = 0; i < count; i++)
|
||||
{
|
||||
mo = Spawn<AFeather> (actor->x, actor->y, actor->z+20*FRACUNIT);
|
||||
mo = Spawn<AFeather> (actor->x, actor->y, actor->z+20*FRACUNIT, NO_REPLACE);
|
||||
mo->target = actor;
|
||||
mo->momx = pr_feathers.Random2() << 8;
|
||||
mo->momy = pr_feathers.Random2() << 8;
|
||||
|
|
|
@ -511,7 +511,7 @@ void A_SorcererRise (AActor *actor)
|
|||
AActor *mo;
|
||||
|
||||
actor->flags &= ~MF_SOLID;
|
||||
mo = Spawn<ASorcerer2> (actor->x, actor->y, actor->z);
|
||||
mo = Spawn<ASorcerer2> (actor->x, actor->y, actor->z, ALLOW_REPLACE);
|
||||
mo->SetState (&ASorcerer2::States[S_SOR2_RISE]);
|
||||
mo->angle = actor->angle;
|
||||
mo->CopyFriendliness (actor, true);
|
||||
|
@ -563,7 +563,7 @@ void P_DSparilTeleport (AActor *actor)
|
|||
prevZ = actor->z;
|
||||
if (P_TeleportMove (actor, spot->x, spot->y, spot->z, false))
|
||||
{
|
||||
mo = Spawn<ASorcerer2Telefade> (prevX, prevY, prevZ);
|
||||
mo = Spawn<ASorcerer2Telefade> (prevX, prevY, prevZ, ALLOW_REPLACE);
|
||||
S_Sound (mo, CHAN_BODY, "misc/teleport", 1, ATTN_NORM);
|
||||
actor->SetState (&ASorcerer2::States[S_SOR2_TELE]);
|
||||
S_Sound (actor, CHAN_BODY, "misc/teleport", 1, ATTN_NORM);
|
||||
|
@ -648,7 +648,7 @@ void A_BlueSpark (AActor *actor)
|
|||
|
||||
for (i = 0; i < 2; i++)
|
||||
{
|
||||
mo = Spawn<ASorcerer2FXSpark> (actor->x, actor->y, actor->z);
|
||||
mo = Spawn<ASorcerer2FXSpark> (actor->x, actor->y, actor->z, ALLOW_REPLACE);
|
||||
mo->momx = pr_bluespark.Random2() << 9;
|
||||
mo->momy = pr_bluespark.Random2() << 9;
|
||||
mo->momz = FRACUNIT + (pr_bluespark()<<8);
|
||||
|
@ -665,7 +665,7 @@ void A_GenWizard (AActor *actor)
|
|||
{
|
||||
AActor *mo;
|
||||
|
||||
mo = Spawn<AWizard> (actor->x, actor->y, actor->z - GetDefault<AWizard>()->height/2);
|
||||
mo = Spawn<AWizard> (actor->x, actor->y, actor->z - GetDefault<AWizard>()->height/2, ALLOW_REPLACE);
|
||||
if (mo != NULL)
|
||||
{
|
||||
if (!P_TestMobjLocation (mo))
|
||||
|
@ -682,7 +682,7 @@ void A_GenWizard (AActor *actor)
|
|||
actor->flags &= ~MF_MISSILE;
|
||||
mo->master = actor->target;
|
||||
// Heretic did not offset it by TELEFOGHEIGHT, so I won't either.
|
||||
Spawn<ATeleportFog> (actor->x, actor->y, actor->z);
|
||||
Spawn<ATeleportFog> (actor->x, actor->y, actor->z, ALLOW_REPLACE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -118,7 +118,7 @@ bool AArtiTimeBomb::Use (bool pickup)
|
|||
AActor *mo = Spawn<AActivatedTimeBomb> (
|
||||
Owner->x + 24*finecosine[angle],
|
||||
Owner->y + 24*finesine[angle],
|
||||
Owner->z - Owner->floorclip);
|
||||
Owner->z - Owner->floorclip, ALLOW_REPLACE);
|
||||
mo->target = Owner;
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -233,12 +233,12 @@ void A_ImpExplode (AActor *self)
|
|||
|
||||
self->flags &= ~MF_NOGRAVITY;
|
||||
|
||||
chunk = Spawn<AHereticImpChunk1> (self->x, self->y, self->z);
|
||||
chunk = Spawn<AHereticImpChunk1> (self->x, self->y, self->z, ALLOW_REPLACE);
|
||||
chunk->momx = pr_imp.Random2 () << 10;
|
||||
chunk->momy = pr_imp.Random2 () << 10;
|
||||
chunk->momz = 9*FRACUNIT;
|
||||
|
||||
chunk = Spawn<AHereticImpChunk2> (self->x, self->y, self->z);
|
||||
chunk = Spawn<AHereticImpChunk2> (self->x, self->y, self->z, ALLOW_REPLACE);
|
||||
chunk->momx = pr_imp.Random2 () << 10;
|
||||
chunk->momy = pr_imp.Random2 () << 10;
|
||||
chunk->momz = 9*FRACUNIT;
|
||||
|
|
|
@ -103,7 +103,7 @@ void A_InitKeyGizmo (AActor *gizmo)
|
|||
{
|
||||
AActor *floater;
|
||||
|
||||
floater = Spawn<AKeyGizmoFloat> (gizmo->x, gizmo->y, gizmo->z+60*FRACUNIT);
|
||||
floater = Spawn<AKeyGizmoFloat> (gizmo->x, gizmo->y, gizmo->z+60*FRACUNIT, NO_REPLACE);
|
||||
floater->SetState (&AKeyGizmoFloat::
|
||||
States[static_cast<AKeyGizmo *>(gizmo)->GetFloatState ()]);
|
||||
}
|
||||
|
|
|
@ -158,7 +158,7 @@ void A_PodPain (AActor *actor)
|
|||
}
|
||||
for (count = chance > 240 ? 2 : 1; count; count--)
|
||||
{
|
||||
goo = Spawn<APodGoo> (actor->x, actor->y, actor->z + 48*FRACUNIT);
|
||||
goo = Spawn<APodGoo> (actor->x, actor->y, actor->z + 48*FRACUNIT, ALLOW_REPLACE);
|
||||
goo->target = actor;
|
||||
goo->momx = pr_podpain.Random2() << 9;
|
||||
goo->momy = pr_podpain.Random2() << 9;
|
||||
|
@ -207,7 +207,7 @@ void A_MakePod (AActor *actor)
|
|||
x = actor->x;
|
||||
y = actor->y;
|
||||
z = actor->z;
|
||||
mo = Spawn<APod> (x, y, ONFLOORZ);
|
||||
mo = Spawn<APod> (x, y, ONFLOORZ, ALLOW_REPLACE);
|
||||
if (P_CheckPosition (mo, x, y) == false)
|
||||
{ // Didn't fit
|
||||
mo->Destroy ();
|
||||
|
@ -322,7 +322,7 @@ void A_SpawnTeleGlitter (AActor *actor)
|
|||
fixed_t y = actor->y+((pr_teleg()&31)-16)*FRACUNIT;
|
||||
|
||||
mo = Spawn<ATeleGlitter1> (x, y,
|
||||
actor->Sector->floorplane.ZatPoint (actor->x, actor->y));
|
||||
actor->Sector->floorplane.ZatPoint (actor->x, actor->y), ALLOW_REPLACE);
|
||||
mo->momz = FRACUNIT/4;
|
||||
}
|
||||
|
||||
|
@ -339,7 +339,7 @@ void A_SpawnTeleGlitter2 (AActor *actor)
|
|||
fixed_t y = actor->y+((pr_teleg2()&31)-16)*FRACUNIT;
|
||||
|
||||
mo = Spawn<ATeleGlitter2> (x, y,
|
||||
actor->Sector->floorplane.ZatPoint (actor->x, actor->y));
|
||||
actor->Sector->floorplane.ZatPoint (actor->x, actor->y), ALLOW_REPLACE);
|
||||
mo->momz = FRACUNIT/4;
|
||||
}
|
||||
|
||||
|
@ -493,7 +493,7 @@ void A_VolcanoBlast (AActor *volcano)
|
|||
for (i = 0; i < count; i++)
|
||||
{
|
||||
blast = Spawn<AVolcanoBlast> (volcano->x, volcano->y,
|
||||
volcano->z + 44*FRACUNIT);
|
||||
volcano->z + 44*FRACUNIT, ALLOW_REPLACE);
|
||||
blast->target = volcano;
|
||||
angle = pr_blast () << 24;
|
||||
blast->angle = angle;
|
||||
|
@ -528,7 +528,7 @@ void A_VolcBallImpact (AActor *ball)
|
|||
P_RadiusAttack (ball, ball->target, 25, 25, MOD_FIRE, true);
|
||||
for (i = 0; i < 4; i++)
|
||||
{
|
||||
tiny = Spawn<AVolcanoTBlast> (ball->x, ball->y, ball->z);
|
||||
tiny = Spawn<AVolcanoTBlast> (ball->x, ball->y, ball->z, ALLOW_REPLACE);
|
||||
tiny->target = ball;
|
||||
angle = i*ANG90;
|
||||
tiny->angle = angle;
|
||||
|
|
|
@ -203,7 +203,7 @@ void A_SkullPop (AActor *actor)
|
|||
spawntype = RUNTIME_CLASS (ABloodySkull);
|
||||
|
||||
actor->flags &= ~MF_SOLID;
|
||||
mo = (APlayerPawn *)Spawn (spawntype, actor->x, actor->y, actor->z + 48*FRACUNIT);
|
||||
mo = (APlayerPawn *)Spawn (spawntype, actor->x, actor->y, actor->z + 48*FRACUNIT, NO_REPLACE);
|
||||
//mo->target = actor;
|
||||
mo->momx = pr_skullpop.Random2() << 9;
|
||||
mo->momy = pr_skullpop.Random2() << 9;
|
||||
|
|
|
@ -779,7 +779,7 @@ void A_BoltSpark (AActor *bolt)
|
|||
|
||||
if (pr_boltspark() > 50)
|
||||
{
|
||||
spark = Spawn<ACrossbowFX4> (bolt->x, bolt->y, bolt->z);
|
||||
spark = Spawn<ACrossbowFX4> (bolt->x, bolt->y, bolt->z, ALLOW_REPLACE);
|
||||
spark->x += pr_boltspark.Random2() << 10;
|
||||
spark->y += pr_boltspark.Random2() << 10;
|
||||
}
|
||||
|
@ -1093,7 +1093,7 @@ void A_SpawnMace (AActor *self)
|
|||
{ // Sometimes doesn't show up if not in deathmatch
|
||||
return;
|
||||
}
|
||||
mace = Spawn<AMace> (self->x, self->y, self->z);
|
||||
mace = Spawn<AMace> (self->x, self->y, self->z, ALLOW_REPLACE);
|
||||
if (mace)
|
||||
{
|
||||
mace->FirstSpot = firstSpot;
|
||||
|
@ -1150,7 +1150,7 @@ void A_FireMacePL1B (AActor *actor)
|
|||
}
|
||||
pmo = player->mo;
|
||||
ball = Spawn<AMaceFX2> (pmo->x, pmo->y, pmo->z + 28*FRACUNIT
|
||||
- pmo->floorclip);
|
||||
- pmo->floorclip, ALLOW_REPLACE);
|
||||
ball->momz = 2*FRACUNIT+/*((player->lookdir)<<(FRACBITS-5))*/
|
||||
finetangent[FINEANGLES/4-(pmo->pitch>>ANGLETOFINESHIFT)];
|
||||
angle = pmo->angle;
|
||||
|
@ -1295,7 +1295,7 @@ void A_MaceBallImpact2 (AActor *ball)
|
|||
ball->momz = (ball->momz * 192) >> 8;
|
||||
ball->SetState (ball->SpawnState);
|
||||
|
||||
tiny = Spawn<AMaceFX3> (ball->x, ball->y, ball->z);
|
||||
tiny = Spawn<AMaceFX3> (ball->x, ball->y, ball->z, ALLOW_REPLACE);
|
||||
angle = ball->angle+ANG90;
|
||||
tiny->target = ball->target;
|
||||
tiny->angle = angle;
|
||||
|
@ -1307,7 +1307,7 @@ void A_MaceBallImpact2 (AActor *ball)
|
|||
tiny->momz = ball->momz;
|
||||
P_CheckMissileSpawn (tiny);
|
||||
|
||||
tiny = Spawn<AMaceFX3> (ball->x, ball->y, ball->z);
|
||||
tiny = Spawn<AMaceFX3> (ball->x, ball->y, ball->z, ALLOW_REPLACE);
|
||||
angle = ball->angle-ANG90;
|
||||
tiny->target = ball->target;
|
||||
tiny->angle = angle;
|
||||
|
@ -2020,7 +2020,7 @@ void A_SpawnRippers (AActor *actor)
|
|||
|
||||
for(i = 0; i < 8; i++)
|
||||
{
|
||||
ripper = Spawn<ARipper> (actor->x, actor->y, actor->z);
|
||||
ripper = Spawn<ARipper> (actor->x, actor->y, actor->z, ALLOW_REPLACE);
|
||||
angle = i*ANG45;
|
||||
ripper->target = actor->target;
|
||||
ripper->angle = angle;
|
||||
|
@ -2084,7 +2084,7 @@ void ABlasterFX1::Tick ()
|
|||
}
|
||||
if (changexy && (pr_bfx1t() < 64))
|
||||
{
|
||||
Spawn<ABlasterSmoke> (x, y, MAX<fixed_t> (z - 8 * FRACUNIT, floorz));
|
||||
Spawn<ABlasterSmoke> (x, y, MAX<fixed_t> (z - 8 * FRACUNIT, floorz), ALLOW_REPLACE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -2526,7 +2526,7 @@ void A_SkullRodStorm (AActor *actor)
|
|||
}
|
||||
x = actor->x + ((pr_storm()&127) - 64) * FRACUNIT;
|
||||
y = actor->y + ((pr_storm()&127) - 64) * FRACUNIT;
|
||||
mo = Spawn<ARainPillar> (x, y, ONCEILINGZ);
|
||||
mo = Spawn<ARainPillar> (x, y, ONCEILINGZ, ALLOW_REPLACE);
|
||||
mo->Translation = multiplayer ?
|
||||
TRANSLATION(TRANSLATION_PlayersExtra,actor->special2) : 0;
|
||||
mo->target = actor->target;
|
||||
|
@ -2830,13 +2830,13 @@ void A_PhoenixPuff (AActor *actor)
|
|||
|
||||
//[RH] Heretic never sets the target for seeking
|
||||
//P_SeekerMissile (actor, ANGLE_1*5, ANGLE_1*10);
|
||||
puff = Spawn<APhoenixPuff> (actor->x, actor->y, actor->z);
|
||||
puff = Spawn<APhoenixPuff> (actor->x, actor->y, actor->z, ALLOW_REPLACE);
|
||||
angle = actor->angle + ANG90;
|
||||
angle >>= ANGLETOFINESHIFT;
|
||||
puff->momx = FixedMul (FRACUNIT*13/10, finecosine[angle]);
|
||||
puff->momy = FixedMul (FRACUNIT*13/10, finesine[angle]);
|
||||
puff->momz = 0;
|
||||
puff = Spawn<APhoenixPuff> (actor->x, actor->y, actor->z);
|
||||
puff = Spawn<APhoenixPuff> (actor->x, actor->y, actor->z, ALLOW_REPLACE);
|
||||
angle = actor->angle - ANG90;
|
||||
angle >>= ANGLETOFINESHIFT;
|
||||
puff->momx = FixedMul (FRACUNIT*13/10, finecosine[angle]);
|
||||
|
@ -2903,7 +2903,7 @@ void A_FirePhoenixPL2 (AActor *actor)
|
|||
z = pmo->z + 26*FRACUNIT + finetangent[FINEANGLES/4-(pmo->pitch>>ANGLETOFINESHIFT)];
|
||||
z -= pmo->floorclip;
|
||||
slope = finetangent[FINEANGLES/4-(pmo->pitch>>ANGLETOFINESHIFT)] + (FRACUNIT/10);
|
||||
mo = Spawn<APhoenixFX2> (x, y, z);
|
||||
mo = Spawn<APhoenixFX2> (x, y, z, ALLOW_REPLACE);
|
||||
mo->target = pmo;
|
||||
mo->angle = angle;
|
||||
mo->momx = pmo->momx + FixedMul (mo->Speed, finecosine[angle>>ANGLETOFINESHIFT]);
|
||||
|
|
|
@ -321,7 +321,7 @@ void A_LichAttack (AActor *actor)
|
|||
for (i = 0; i < 5; i++)
|
||||
{
|
||||
fire = Spawn<AHeadFX3> (baseFire->x, baseFire->y,
|
||||
baseFire->z);
|
||||
baseFire->z, ALLOW_REPLACE);
|
||||
if (i == 0)
|
||||
{
|
||||
S_Sound (actor, CHAN_BODY, "ironlich/attack1", 1, ATTN_NORM);
|
||||
|
@ -394,7 +394,7 @@ void A_LichIceImpact (AActor *ice)
|
|||
|
||||
for (i = 0; i < 8; i++)
|
||||
{
|
||||
shard = Spawn<AHeadFX2> (ice->x, ice->y, ice->z);
|
||||
shard = Spawn<AHeadFX2> (ice->x, ice->y, ice->z, ALLOW_REPLACE);
|
||||
angle = i*ANG45;
|
||||
shard->target = ice->target;
|
||||
shard->angle = angle;
|
||||
|
|
|
@ -188,7 +188,7 @@ void A_DripBlood (AActor *actor)
|
|||
|
||||
x = actor->x + (pr_dripblood.Random2 () << 11);
|
||||
y = actor->y + (pr_dripblood.Random2 () << 11);
|
||||
mo = Spawn<ABlood> (x, y, actor->z);
|
||||
mo = Spawn<ABlood> (x, y, actor->z, ALLOW_REPLACE);
|
||||
mo->momx = pr_dripblood.Random2 () << 10;
|
||||
mo->momy = pr_dripblood.Random2 () << 10;
|
||||
mo->flags2 |= MF2_LOGRAV;
|
||||
|
|
|
@ -282,7 +282,7 @@ void A_MummySoul (AActor *mummy)
|
|||
{
|
||||
AActor *mo;
|
||||
|
||||
mo = Spawn<AMummySoul> (mummy->x, mummy->y, mummy->z+10*FRACUNIT);
|
||||
mo = Spawn<AMummySoul> (mummy->x, mummy->y, mummy->z+10*FRACUNIT, ALLOW_REPLACE);
|
||||
mo->momz = FRACUNIT;
|
||||
}
|
||||
|
||||
|
|
|
@ -375,7 +375,7 @@ void A_BishopSpawnBlur (AActor *actor)
|
|||
actor->SetState (actor->MissileState);
|
||||
}
|
||||
}
|
||||
mo = Spawn<ABishopBlur> (actor->x, actor->y, actor->z);
|
||||
mo = Spawn<ABishopBlur> (actor->x, actor->y, actor->z, ALLOW_REPLACE);
|
||||
if (mo)
|
||||
{
|
||||
mo->angle = actor->angle;
|
||||
|
@ -405,7 +405,7 @@ void A_BishopPuff (AActor *actor)
|
|||
{
|
||||
AActor *mo;
|
||||
|
||||
mo = Spawn<ABishopPuff> (actor->x, actor->y, actor->z + 40*FRACUNIT);
|
||||
mo = Spawn<ABishopPuff> (actor->x, actor->y, actor->z + 40*FRACUNIT, ALLOW_REPLACE);
|
||||
if (mo)
|
||||
{
|
||||
mo->momz = FRACUNIT/2;
|
||||
|
@ -430,7 +430,7 @@ void A_BishopPainBlur (AActor *actor)
|
|||
fixed_t x = actor->x + (pr_pain.Random2()<<12);
|
||||
fixed_t y = actor->y + (pr_pain.Random2()<<12);
|
||||
fixed_t z = actor->z + (pr_pain.Random2()<<11);
|
||||
mo = Spawn<ABishopPainBlur> (x, y, z);
|
||||
mo = Spawn<ABishopPainBlur> (x, y, z, ALLOW_REPLACE);
|
||||
if (mo)
|
||||
{
|
||||
mo->angle = actor->angle;
|
||||
|
|
|
@ -181,7 +181,7 @@ void AArtiBlastRadius::BlastActor (AActor *victim, fixed_t strength)
|
|||
x = victim->x + FixedMul (victim->radius+FRACUNIT, finecosine[ang]);
|
||||
y = victim->y + FixedMul (victim->radius+FRACUNIT, finesine[ang]);
|
||||
z = victim->z - victim->floorclip + (victim->height>>1);
|
||||
mo = Spawn<ABlastEffect> (x, y, z);
|
||||
mo = Spawn<ABlastEffect> (x, y, z, ALLOW_REPLACE);
|
||||
if (mo)
|
||||
{
|
||||
mo->momx = victim->momx;
|
||||
|
|
|
@ -49,7 +49,7 @@ bool AArtiBoostArmor::Use (bool pickup)
|
|||
|
||||
for (int i = 0; i < 4; ++i)
|
||||
{
|
||||
armor = Spawn<AHexenArmor> (0,0,0);
|
||||
armor = Spawn<AHexenArmor> (0,0,0, NO_REPLACE);
|
||||
armor->flags |= MF_DROPPED;
|
||||
armor->health = i;
|
||||
armor->Amount = 1;
|
||||
|
@ -66,7 +66,7 @@ bool AArtiBoostArmor::Use (bool pickup)
|
|||
}
|
||||
else
|
||||
{
|
||||
ABasicArmorBonus *armor = Spawn<ABasicArmorBonus> (0,0,0);
|
||||
ABasicArmorBonus *armor = Spawn<ABasicArmorBonus> (0,0,0, NO_REPLACE);
|
||||
armor->flags |= MF_DROPPED;
|
||||
armor->SaveAmount = 50;
|
||||
armor->MaxSaveAmount = 300;
|
||||
|
|
|
@ -307,7 +307,7 @@ void A_CentaurDropStuff (AActor *actor)
|
|||
{
|
||||
AActor *mo;
|
||||
|
||||
mo = Spawn (DropTypes[i], actor->x, actor->y, actor->z+45*FRACUNIT);
|
||||
mo = Spawn (DropTypes[i], actor->x, actor->y, actor->z+45*FRACUNIT, ALLOW_REPLACE);
|
||||
if (mo)
|
||||
{
|
||||
angle_t angle = actor->angle + (i ? ANGLE_90 : ANGLE_270);
|
||||
|
|
|
@ -348,7 +348,7 @@ void ACFlameMissile::Tick ()
|
|||
{
|
||||
newz = floorz;
|
||||
}
|
||||
mo = Spawn<ACFlameFloor> (x, y, newz);
|
||||
mo = Spawn<ACFlameFloor> (x, y, newz, ALLOW_REPLACE);
|
||||
if (mo)
|
||||
{
|
||||
mo->angle = angle;
|
||||
|
@ -434,7 +434,7 @@ void A_CFlameMissile (AActor *actor)
|
|||
an90 = (i*ANG45+ANG90)>>ANGLETOFINESHIFT;
|
||||
mo = Spawn<ACircleFlame> (BlockingMobj->x+FixedMul(dist, finecosine[an]),
|
||||
BlockingMobj->y+FixedMul(dist, finesine[an]),
|
||||
BlockingMobj->z+5*FRACUNIT);
|
||||
BlockingMobj->z+5*FRACUNIT, ALLOW_REPLACE);
|
||||
if (mo)
|
||||
{
|
||||
mo->angle = an<<ANGLETOFINESHIFT;
|
||||
|
@ -445,7 +445,7 @@ void A_CFlameMissile (AActor *actor)
|
|||
}
|
||||
mo = Spawn<ACircleFlame> (BlockingMobj->x-FixedMul(dist, finecosine[an]),
|
||||
BlockingMobj->y-FixedMul(dist, finesine[an]),
|
||||
BlockingMobj->z+5*FRACUNIT);
|
||||
BlockingMobj->z+5*FRACUNIT, ALLOW_REPLACE);
|
||||
if(mo)
|
||||
{
|
||||
mo->angle = ANG180+(an<<ANGLETOFINESHIFT);
|
||||
|
|
|
@ -363,7 +363,7 @@ bool AHolySpirit::Slam (AActor *thing)
|
|||
P_DamageMobj (thing, this, target, dam, MOD_HIT);
|
||||
if (pr_spiritslam() < 128)
|
||||
{
|
||||
Spawn<AHolyPuff> (x, y, z);
|
||||
Spawn<AHolyPuff> (x, y, z, ALLOW_REPLACE);
|
||||
S_Sound (this, CHAN_WEAPON, "SpiritAttack", 1, ATTN_NORM);
|
||||
if (thing->flags3&MF3_ISMONSTER && pr_spiritslam() < 128)
|
||||
{
|
||||
|
@ -481,7 +481,7 @@ void A_CHolyAttack2 (AActor *actor)
|
|||
|
||||
for (j = 0; j < 4; j++)
|
||||
{
|
||||
mo = Spawn<AHolySpirit> (actor->x, actor->y, actor->z);
|
||||
mo = Spawn<AHolySpirit> (actor->x, actor->y, actor->z, ALLOW_REPLACE);
|
||||
if (!mo)
|
||||
{
|
||||
continue;
|
||||
|
@ -533,11 +533,11 @@ void SpawnSpiritTail (AActor *spirit)
|
|||
AActor *tail, *next;
|
||||
int i;
|
||||
|
||||
tail = Spawn<AHolyTail> (spirit->x, spirit->y, spirit->z);
|
||||
tail = Spawn<AHolyTail> (spirit->x, spirit->y, spirit->z, ALLOW_REPLACE);
|
||||
tail->target = spirit; // parent
|
||||
for (i = 1; i < 3; i++)
|
||||
{
|
||||
next = Spawn<AHolyTailTrail> (spirit->x, spirit->y, spirit->z);
|
||||
next = Spawn<AHolyTailTrail> (spirit->x, spirit->y, spirit->z, ALLOW_REPLACE);
|
||||
tail->tracer = next;
|
||||
tail = next;
|
||||
}
|
||||
|
@ -868,7 +868,7 @@ void A_CHolyCheckScream (AActor *actor)
|
|||
|
||||
void A_CHolySpawnPuff (AActor *actor)
|
||||
{
|
||||
Spawn<AHolyMissilePuff> (actor->x, actor->y, actor->z);
|
||||
Spawn<AHolyMissilePuff> (actor->x, actor->y, actor->z, ALLOW_REPLACE);
|
||||
}
|
||||
|
||||
void AClericWeaponPiece::BeginPlay ()
|
||||
|
@ -894,7 +894,7 @@ void A_DropWraithvergePieces (AActor *actor)
|
|||
|
||||
for (int i = 0, j = 0, fineang = 0; i < 3; ++i)
|
||||
{
|
||||
AActor *piece = Spawn (pieces[j], actor->x, actor->y, actor->z);
|
||||
AActor *piece = Spawn (pieces[j], actor->x, actor->y, actor->z, ALLOW_REPLACE);
|
||||
if (piece != NULL)
|
||||
{
|
||||
piece->momx = actor->momx + finecosine[fineang];
|
||||
|
|
|
@ -645,7 +645,7 @@ static void TossChunks (AActor *actor, const PClass *const chunks[])
|
|||
|
||||
for (i = 4; i >= 0; --i)
|
||||
{
|
||||
mo = Spawn (chunks[i], actor->x, actor->y, actor->z+45*FRACUNIT);
|
||||
mo = Spawn (chunks[i], actor->x, actor->y, actor->z+45*FRACUNIT, ALLOW_REPLACE);
|
||||
if (mo)
|
||||
{
|
||||
angle = actor->angle + (i<4 ? ANGLE_270 : ANGLE_90);
|
||||
|
|
|
@ -430,7 +430,7 @@ void A_DragonFX2 (AActor *actor)
|
|||
fixed_t y = actor->y+((pr_dragonfx2()-128)<<14);
|
||||
fixed_t z = actor->z+((pr_dragonfx2()-128)<<12);
|
||||
|
||||
mo = Spawn<ADragonExplosion> (x, y, z);
|
||||
mo = Spawn<ADragonExplosion> (x, y, z, ALLOW_REPLACE);
|
||||
if (mo)
|
||||
{
|
||||
mo->tics = delay+(pr_dragonfx2()&3)*i*2;
|
||||
|
|
|
@ -173,7 +173,7 @@ void A_DropMace (AActor *actor)
|
|||
AEttinMace *mo;
|
||||
|
||||
mo = Spawn<AEttinMace> (actor->x, actor->y,
|
||||
actor->z + (actor->height>>1));
|
||||
actor->z + (actor->height>>1), ALLOW_REPLACE);
|
||||
if (mo)
|
||||
{
|
||||
mo->momx = (pr_dropmace()-128) << 11;
|
||||
|
|
|
@ -454,7 +454,7 @@ void P_BloodSplatter2 (fixed_t x, fixed_t y, fixed_t z, AActor *originator)
|
|||
x += ((pr_splat()-128)<<11);
|
||||
y += ((pr_splat()-128)<<11);
|
||||
|
||||
mo = Spawn<AAxeBlood> (x, y, z);
|
||||
mo = Spawn<AAxeBlood> (x, y, z, ALLOW_REPLACE);
|
||||
mo->target = originator;
|
||||
|
||||
// colorize the blood!
|
||||
|
|
|
@ -356,7 +356,7 @@ bool AFighterPlayer::DoHealingRadius (APlayerPawn *other)
|
|||
|
||||
for (int i = 0; i < 4; ++i)
|
||||
{
|
||||
AHexenArmor *armor = Spawn<AHexenArmor> (0,0,0);
|
||||
AHexenArmor *armor = Spawn<AHexenArmor> (0,0,0, NO_REPLACE);
|
||||
armor->health = i;
|
||||
armor->Amount = 1;
|
||||
if (!armor->TryPickup (player->mo))
|
||||
|
|
|
@ -347,7 +347,7 @@ void A_FSwordFlames (AActor *actor)
|
|||
fixed_t x = actor->x+((pr_fswordflame()-128)<<12);
|
||||
fixed_t y = actor->y+((pr_fswordflame()-128)<<12);
|
||||
fixed_t z = actor->z+((pr_fswordflame()-128)<<11);
|
||||
Spawn<AFSwordFlame> (x, y, z);
|
||||
Spawn<AFSwordFlame> (x, y, z, ALLOW_REPLACE);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -368,7 +368,7 @@ void A_DropQuietusPieces (AActor *actor)
|
|||
|
||||
for (int i = 0, j = 0, fineang = 0; i < 3; ++i)
|
||||
{
|
||||
AActor *piece = Spawn (pieces[j], actor->x, actor->y, actor->z);
|
||||
AActor *piece = Spawn (pieces[j], actor->x, actor->y, actor->z, ALLOW_REPLACE);
|
||||
if (piece != NULL)
|
||||
{
|
||||
piece->momx = actor->momx + finecosine[fineang];
|
||||
|
|
|
@ -373,7 +373,7 @@ void A_FiredSpawnRock (AActor *actor)
|
|||
x = actor->x + ((pr_firedemonrock() - 128) << 12);
|
||||
y = actor->y + ((pr_firedemonrock() - 128) << 12);
|
||||
z = actor->z + ( pr_firedemonrock() << 11);
|
||||
mo = Spawn (rtype, x, y, z);
|
||||
mo = Spawn (rtype, x, y, z, ALLOW_REPLACE);
|
||||
if (mo)
|
||||
{
|
||||
mo->target = actor;
|
||||
|
@ -519,14 +519,14 @@ void A_FiredSplotch (AActor *actor)
|
|||
{
|
||||
AActor *mo;
|
||||
|
||||
mo = Spawn<AFireDemonSplotch1> (actor->x, actor->y, actor->z);
|
||||
mo = Spawn<AFireDemonSplotch1> (actor->x, actor->y, actor->z, ALLOW_REPLACE);
|
||||
if (mo)
|
||||
{
|
||||
mo->momx = (pr_firedemonsplotch() - 128) << 11;
|
||||
mo->momy = (pr_firedemonsplotch() - 128) << 11;
|
||||
mo->momz = (pr_firedemonsplotch() << 10) + FRACUNIT*3;
|
||||
}
|
||||
mo = Spawn<AFireDemonSplotch2> (actor->x, actor->y, actor->z);
|
||||
mo = Spawn<AFireDemonSplotch2> (actor->x, actor->y, actor->z, ALLOW_REPLACE);
|
||||
if (mo)
|
||||
{
|
||||
mo->momx = (pr_firedemonsplotch() - 128) << 11;
|
||||
|
|
|
@ -186,7 +186,7 @@ bool AArtiPoisonBag1::Use (bool pickup)
|
|||
mo = Spawn<APoisonBag> (
|
||||
Owner->x+16*finecosine[angle],
|
||||
Owner->y+24*finesine[angle], Owner->z-
|
||||
Owner->floorclip+8*FRACUNIT);
|
||||
Owner->floorclip+8*FRACUNIT, ALLOW_REPLACE);
|
||||
if (mo)
|
||||
{
|
||||
mo->target = Owner;
|
||||
|
@ -216,7 +216,7 @@ bool AArtiPoisonBag2::Use (bool pickup)
|
|||
mo = Spawn<AFireBomb> (
|
||||
Owner->x+16*finecosine[angle],
|
||||
Owner->y+24*finesine[angle], Owner->z-
|
||||
Owner->floorclip+8*FRACUNIT);
|
||||
Owner->floorclip+8*FRACUNIT, ALLOW_REPLACE);
|
||||
if (mo)
|
||||
{
|
||||
mo->target = Owner;
|
||||
|
@ -243,7 +243,7 @@ bool AArtiPoisonBag3::Use (bool pickup)
|
|||
AActor *mo;
|
||||
|
||||
mo = Spawn<AThrowingBomb> (Owner->x, Owner->y,
|
||||
Owner->z-Owner->floorclip+35*FRACUNIT + (Owner->player? Owner->player->crouchoffset : 0));
|
||||
Owner->z-Owner->floorclip+35*FRACUNIT + (Owner->player? Owner->player->crouchoffset : 0), ALLOW_REPLACE);
|
||||
if (mo)
|
||||
{
|
||||
angle_t pitch = (angle_t)Owner->pitch >> ANGLETOFINESHIFT;
|
||||
|
@ -339,7 +339,7 @@ AInventory *AArtiPoisonBag::CreateCopy (AActor *other)
|
|||
{
|
||||
spawntype = RUNTIME_CLASS(AArtiPoisonBag3);
|
||||
}
|
||||
copy = static_cast<AInventory *>(Spawn (spawntype, 0, 0, 0));
|
||||
copy = static_cast<AInventory *>(Spawn (spawntype, 0, 0, 0, NO_REPLACE));
|
||||
copy->Amount = Amount;
|
||||
copy->MaxAmount = MaxAmount;
|
||||
GoAwayAndDie ();
|
||||
|
@ -476,7 +476,7 @@ void A_PoisonBagInit (AActor *actor)
|
|||
{
|
||||
AActor *mo;
|
||||
|
||||
mo = Spawn<APoisonCloud> (actor->x, actor->y, actor->z+28*FRACUNIT);
|
||||
mo = Spawn<APoisonCloud> (actor->x, actor->y, actor->z+28*FRACUNIT, ALLOW_REPLACE);
|
||||
if (mo)
|
||||
{
|
||||
mo->target = actor->target;
|
||||
|
|
|
@ -165,7 +165,7 @@ void A_FogSpawn (AActor *actor)
|
|||
|
||||
actor->special1 = actor->args[2]; // Reset frequency count
|
||||
|
||||
mo = Spawn (fogs[pr_fogspawn()%3], actor->x, actor->y, actor->z);
|
||||
mo = Spawn (fogs[pr_fogspawn()%3], actor->x, actor->y, actor->z, ALLOW_REPLACE);
|
||||
|
||||
if (mo)
|
||||
{
|
||||
|
|
|
@ -672,15 +672,15 @@ void A_SorcSpinBalls(AActor *actor)
|
|||
actor->special1 = ANGLE_1;
|
||||
z = actor->z - actor->floorclip + actor->height;
|
||||
|
||||
mo = Spawn<ASorcBall1> (actor->x, actor->y, z);
|
||||
mo = Spawn<ASorcBall1> (actor->x, actor->y, z, NO_REPLACE);
|
||||
if (mo)
|
||||
{
|
||||
mo->target = actor;
|
||||
mo->special2 = SORCFX4_RAPIDFIRE_TIME;
|
||||
}
|
||||
mo = Spawn<ASorcBall2> (actor->x, actor->y, z);
|
||||
mo = Spawn<ASorcBall2> (actor->x, actor->y, z, NO_REPLACE);
|
||||
if (mo) mo->target = actor;
|
||||
mo = Spawn<ASorcBall3> (actor->x, actor->y, z);
|
||||
mo = Spawn<ASorcBall3> (actor->x, actor->y, z, NO_REPLACE);
|
||||
if (mo) mo->target = actor;
|
||||
}
|
||||
|
||||
|
@ -968,7 +968,7 @@ void ASorcBall2::CastSorcererSpell ()
|
|||
AActor *mo;
|
||||
|
||||
fixed_t z = parent->z - parent->floorclip + SORC_DEFENSE_HEIGHT*FRACUNIT;
|
||||
mo = Spawn<ASorcFX2> (x, y, z);
|
||||
mo = Spawn<ASorcFX2> (x, y, z, ALLOW_REPLACE);
|
||||
parent->flags2 |= MF2_REFLECTIVE|MF2_INVULNERABLE;
|
||||
parent->args[0] = SORC_DEFENSE_TIME;
|
||||
if (mo) mo->target = parent;
|
||||
|
@ -1134,7 +1134,7 @@ void A_SpawnFizzle(AActor *actor)
|
|||
z = actor->z - actor->floorclip + (actor->height>>1);
|
||||
for (ix=0; ix<5; ix++)
|
||||
{
|
||||
mo = Spawn<ASorcSpark1> (x, y, z);
|
||||
mo = Spawn<ASorcSpark1> (x, y, z, ALLOW_REPLACE);
|
||||
if (mo)
|
||||
{
|
||||
rangle = angle + ((pr_heresiarch()%5) << 1);
|
||||
|
@ -1181,7 +1181,7 @@ void A_SorcFX2Split(AActor *actor)
|
|||
{
|
||||
AActor *mo;
|
||||
|
||||
mo = Spawn<ASorcFX2> (actor->x, actor->y, actor->z);
|
||||
mo = Spawn<ASorcFX2> (actor->x, actor->y, actor->z, NO_REPLACE);
|
||||
if (mo)
|
||||
{
|
||||
mo->target = actor->target;
|
||||
|
@ -1189,7 +1189,7 @@ void A_SorcFX2Split(AActor *actor)
|
|||
mo->special1 = actor->angle; // Set angle
|
||||
mo->SetStateNF (&ASorcFX2::States[S_SORCFX2_ORBIT1]);
|
||||
}
|
||||
mo = Spawn<ASorcFX2> (actor->x, actor->y, actor->z);
|
||||
mo = Spawn<ASorcFX2> (actor->x, actor->y, actor->z, NO_REPLACE);
|
||||
if (mo)
|
||||
{
|
||||
mo->target = actor->target;
|
||||
|
@ -1249,7 +1249,7 @@ void A_SorcFX2Orbit (AActor *actor)
|
|||
z = parent->z - parent->floorclip + SORC_DEFENSE_HEIGHT*FRACUNIT;
|
||||
z += FixedMul(15*FRACUNIT,finecosine[angle]);
|
||||
// Spawn trailer
|
||||
Spawn<ASorcFX2T1> (x, y, z);
|
||||
Spawn<ASorcFX2T1> (x, y, z, ALLOW_REPLACE);
|
||||
}
|
||||
else // Clock wise
|
||||
{
|
||||
|
@ -1260,7 +1260,7 @@ void A_SorcFX2Orbit (AActor *actor)
|
|||
z = parent->z - parent->floorclip + SORC_DEFENSE_HEIGHT*FRACUNIT;
|
||||
z += FixedMul(20*FRACUNIT,finesine[angle]);
|
||||
// Spawn trailer
|
||||
Spawn<ASorcFX2T1> (x, y, z);
|
||||
Spawn<ASorcFX2T1> (x, y, z, ALLOW_REPLACE);
|
||||
}
|
||||
|
||||
actor->SetOrigin (x, y, z);
|
||||
|
@ -1279,7 +1279,7 @@ void A_SorcFX2Orbit (AActor *actor)
|
|||
void A_SpawnBishop(AActor *actor)
|
||||
{
|
||||
AActor *mo;
|
||||
mo = Spawn<ABishop> (actor->x, actor->y, actor->z);
|
||||
mo = Spawn<ABishop> (actor->x, actor->y, actor->z, ALLOW_REPLACE);
|
||||
if (mo)
|
||||
{
|
||||
if (!P_TestMobjLocation(mo))
|
||||
|
@ -1304,7 +1304,7 @@ void A_SpawnBishop(AActor *actor)
|
|||
|
||||
void A_SorcererBishopEntry(AActor *actor)
|
||||
{
|
||||
Spawn<ASorcFX3Explosion> (actor->x, actor->y, actor->z);
|
||||
Spawn<ASorcFX3Explosion> (actor->x, actor->y, actor->z, ALLOW_REPLACE);
|
||||
S_SoundID (actor, CHAN_VOICE, actor->SeeSound, 1, ATTN_NORM);
|
||||
}
|
||||
|
||||
|
|
|
@ -187,7 +187,7 @@ void A_PotteryExplode (AActor *actor)
|
|||
|
||||
for(i = (pr_pottery()&3)+3; i; i--)
|
||||
{
|
||||
mo = Spawn<APotteryBit> (actor->x, actor->y, actor->z);
|
||||
mo = Spawn<APotteryBit> (actor->x, actor->y, actor->z, ALLOW_REPLACE);
|
||||
mo->SetState (mo->SpawnState + (pr_pottery()%5));
|
||||
if (mo)
|
||||
{
|
||||
|
@ -203,7 +203,7 @@ void A_PotteryExplode (AActor *actor)
|
|||
|| !(GetDefaultByType (SpawnableThings[actor->args[0]])->flags3 & MF3_ISMONSTER))
|
||||
{ // Only spawn monsters if not -nomonsters
|
||||
Spawn (SpawnableThings[actor->args[0]],
|
||||
actor->x, actor->y, actor->z);
|
||||
actor->x, actor->y, actor->z, ALLOW_REPLACE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -288,7 +288,7 @@ END_DEFAULTS
|
|||
void AZCorpseLynchedNoHeart::PostBeginPlay ()
|
||||
{
|
||||
Super::PostBeginPlay ();
|
||||
Spawn<ABloodPool> (x, y, ONFLOORZ);
|
||||
Spawn<ABloodPool> (x, y, ONFLOORZ, ALLOW_REPLACE);
|
||||
}
|
||||
|
||||
// CorpseBloodDrip ----------------------------------------------------------
|
||||
|
@ -331,7 +331,7 @@ void A_CorpseBloodDrip (AActor *actor)
|
|||
{
|
||||
if (pr_drip() <= 128)
|
||||
{
|
||||
Spawn<ACorpseBloodDrip> (actor->x, actor->y, actor->z + actor->height/2);
|
||||
Spawn<ACorpseBloodDrip> (actor->x, actor->y, actor->z + actor->height/2, ALLOW_REPLACE);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -400,7 +400,7 @@ void A_CorpseExplode (AActor *actor)
|
|||
|
||||
for (i = (pr_foo()&3)+3; i; i--)
|
||||
{
|
||||
mo = Spawn<ACorpseBit> (actor->x, actor->y, actor->z);
|
||||
mo = Spawn<ACorpseBit> (actor->x, actor->y, actor->z, ALLOW_REPLACE);
|
||||
mo->SetState (mo->SpawnState + (pr_foo()%3));
|
||||
if (mo)
|
||||
{
|
||||
|
@ -410,7 +410,7 @@ void A_CorpseExplode (AActor *actor)
|
|||
}
|
||||
}
|
||||
// Spawn a skull
|
||||
mo = Spawn<ACorpseBit> (actor->x, actor->y, actor->z);
|
||||
mo = Spawn<ACorpseBit> (actor->x, actor->y, actor->z, ALLOW_REPLACE);
|
||||
mo->SetState (mo->SpawnState + 3);
|
||||
if (mo)
|
||||
{
|
||||
|
@ -537,7 +537,7 @@ void A_LeafSpawn (AActor *actor)
|
|||
mo = Spawn (pr_leaf()&1 ? RUNTIME_CLASS(ALeaf1) : RUNTIME_CLASS(ALeaf2),
|
||||
actor->x + (pr_leaf.Random2()<<14),
|
||||
actor->y + (pr_leaf.Random2()<<14),
|
||||
actor->z + (pr_leaf()<<14));
|
||||
actor->z + (pr_leaf()<<14), ALLOW_REPLACE);
|
||||
if (mo)
|
||||
{
|
||||
P_ThrustMobj (mo, actor->angle, (pr_leaf()<<9)+3*FRACUNIT);
|
||||
|
@ -720,7 +720,7 @@ void A_SoAExplode (AActor *actor)
|
|||
{
|
||||
mo = Spawn<AZArmorChunk> (actor->x+((pr_soaexplode()-128)<<12),
|
||||
actor->y+((pr_soaexplode()-128)<<12),
|
||||
actor->z+(pr_soaexplode()*actor->height/256));
|
||||
actor->z+(pr_soaexplode()*actor->height/256), ALLOW_REPLACE);
|
||||
mo->SetState (mo->SpawnState + i);
|
||||
if (mo)
|
||||
{
|
||||
|
@ -735,7 +735,7 @@ void A_SoAExplode (AActor *actor)
|
|||
|| !(GetDefaultByType (SpawnableThings[actor->args[0]])->flags3 & MF3_ISMONSTER))
|
||||
{ // Only spawn monsters if not -nomonsters
|
||||
Spawn (SpawnableThings[actor->args[0]],
|
||||
actor->x, actor->y, actor->z);
|
||||
actor->x, actor->y, actor->z, ALLOW_REPLACE);
|
||||
}
|
||||
}
|
||||
S_SoundID (actor, CHAN_BODY, actor->DeathSound, 1, ATTN_NORM);
|
||||
|
|
|
@ -289,7 +289,7 @@ void A_IceGuyLook (AActor *actor)
|
|||
Spawn (WispTypes[pr_iceguylook()&1],
|
||||
actor->x+FixedMul(dist, finecosine[an]),
|
||||
actor->y+FixedMul(dist, finesine[an]),
|
||||
actor->z+60*FRACUNIT);
|
||||
actor->z+60*FRACUNIT, ALLOW_REPLACE);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -314,7 +314,7 @@ void A_IceGuyChase (AActor *actor)
|
|||
mo = Spawn (WispTypes[pr_iceguychase()&1],
|
||||
actor->x+FixedMul(dist, finecosine[an]),
|
||||
actor->y+FixedMul(dist, finesine[an]),
|
||||
actor->z+60*FRACUNIT);
|
||||
actor->z+60*FRACUNIT, ALLOW_REPLACE);
|
||||
if (mo)
|
||||
{
|
||||
mo->momx = actor->momx;
|
||||
|
@ -361,7 +361,7 @@ void A_IceGuyAttack (AActor *actor)
|
|||
void A_IceGuyMissilePuff (AActor *actor)
|
||||
{
|
||||
AActor *mo;
|
||||
mo = Spawn<AIceFXPuff> (actor->x, actor->y, actor->z+2*FRACUNIT);
|
||||
mo = Spawn<AIceFXPuff> (actor->x, actor->y, actor->z+2*FRACUNIT, ALLOW_REPLACE);
|
||||
}
|
||||
|
||||
//============================================================================
|
||||
|
|
|
@ -434,7 +434,7 @@ void A_KoraxCommand (AActor *actor)
|
|||
x = actor->x + KORAX_COMMAND_OFFSET * finecosine[ang];
|
||||
y = actor->y + KORAX_COMMAND_OFFSET * finesine[ang];
|
||||
z = actor->z + KORAX_COMMAND_HEIGHT*FRACUNIT;
|
||||
Spawn<AKoraxBolt> (x, y, z);
|
||||
Spawn<AKoraxBolt> (x, y, z, ALLOW_REPLACE);
|
||||
|
||||
if (actor->health <= (actor->GetDefault()->health >> 1))
|
||||
{
|
||||
|
@ -656,7 +656,7 @@ void A_KBoltRaise (AActor *actor)
|
|||
|
||||
if ((z + KORAX_BOLT_HEIGHT) < actor->ceilingz)
|
||||
{
|
||||
mo = Spawn<AKoraxBolt> (actor->x, actor->y, z);
|
||||
mo = Spawn<AKoraxBolt> (actor->x, actor->y, z, ALLOW_REPLACE);
|
||||
if (mo)
|
||||
{
|
||||
mo->special1 = KORAX_BOLT_LIFETIME;
|
||||
|
@ -682,7 +682,7 @@ AActor *P_SpawnKoraxMissile (fixed_t x, fixed_t y, fixed_t z,
|
|||
int dist;
|
||||
|
||||
z -= source->floorclip;
|
||||
th = Spawn (type, x, y, z);
|
||||
th = Spawn (type, x, y, z, ALLOW_REPLACE);
|
||||
if (th->SeeSound)
|
||||
{
|
||||
S_SoundID (th, CHAN_BODY, th->SeeSound, 1, ATTN_NORM);
|
||||
|
|
|
@ -451,7 +451,7 @@ void A_LightningZap (AActor *actor)
|
|||
}
|
||||
mo = Spawn<ALightningZap> (actor->x+((pr_zap()-128)*actor->radius/256),
|
||||
actor->y+((pr_zap()-128)*actor->radius/256),
|
||||
actor->z+deltaZ);
|
||||
actor->z+deltaZ, ALLOW_REPLACE);
|
||||
if (mo)
|
||||
{
|
||||
mo->lastenemy = actor;
|
||||
|
@ -554,7 +554,7 @@ void A_LastZap (AActor *actor)
|
|||
{
|
||||
AActor *mo;
|
||||
|
||||
mo = Spawn<ALightningZap> (actor->x, actor->y, actor->z);
|
||||
mo = Spawn<ALightningZap> (actor->x, actor->y, actor->z, ALLOW_REPLACE);
|
||||
if (mo)
|
||||
{
|
||||
mo->SetState (&ALightningZap::States[S_LIGHTNING_ZAP_X1]);
|
||||
|
|
|
@ -488,7 +488,7 @@ void A_DropBloodscourgePieces (AActor *actor)
|
|||
|
||||
for (int i = 0, j = 0, fineang = 0; i < 3; ++i)
|
||||
{
|
||||
AActor *piece = Spawn (pieces[j], actor->x, actor->y, actor->z);
|
||||
AActor *piece = Spawn (pieces[j], actor->x, actor->y, actor->z, ALLOW_REPLACE);
|
||||
if (piece != NULL)
|
||||
{
|
||||
piece->momx = actor->momx + finecosine[fineang];
|
||||
|
|
|
@ -171,7 +171,7 @@ void AMageWandMissile::Tick ()
|
|||
{
|
||||
hitz = floorz;
|
||||
}
|
||||
Spawn<AMageWandSmoke> (x, y, hitz);
|
||||
Spawn<AMageWandSmoke> (x, y, hitz, ALLOW_REPLACE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -607,7 +607,7 @@ void A_SerpentMissileAttack (AActor *actor)
|
|||
|
||||
void A_SerpentHeadPop (AActor *actor)
|
||||
{
|
||||
Spawn<ASerpentHead> (actor->x, actor->y, actor->z+45*FRACUNIT);
|
||||
Spawn<ASerpentHead> (actor->x, actor->y, actor->z+45*FRACUNIT, ALLOW_REPLACE);
|
||||
}
|
||||
|
||||
//============================================================================
|
||||
|
@ -631,7 +631,7 @@ void A_SerpentSpawnGibs (AActor *actor)
|
|||
mo = Spawn (GibTypes[i],
|
||||
actor->x+((pr_serpentgibs()-128)<<12),
|
||||
actor->y+((pr_serpentgibs()-128)<<12),
|
||||
actor->floorz+FRACUNIT);
|
||||
actor->floorz+FRACUNIT, ALLOW_REPLACE);
|
||||
if (mo)
|
||||
{
|
||||
mo->momx = (pr_serpentgibs()-128)<<6;
|
||||
|
|
|
@ -185,27 +185,27 @@ END_DEFAULTS
|
|||
|
||||
void AThrustFloor::Activate (AActor *activator)
|
||||
{
|
||||
if (args[0] == 0)
|
||||
{
|
||||
S_Sound (this, CHAN_BODY, "ThrustSpikeLower", 1, ATTN_NORM);
|
||||
renderflags &= ~RF_INVISIBLE;
|
||||
if (args[1])
|
||||
SetState (&States[S_BTHRUSTRAISE]);
|
||||
else
|
||||
SetState (&States[S_THRUSTRAISE]);
|
||||
}
|
||||
if (args[0] == 0)
|
||||
{
|
||||
S_Sound (this, CHAN_BODY, "ThrustSpikeLower", 1, ATTN_NORM);
|
||||
renderflags &= ~RF_INVISIBLE;
|
||||
if (args[1])
|
||||
SetState (&States[S_BTHRUSTRAISE]);
|
||||
else
|
||||
SetState (&States[S_THRUSTRAISE]);
|
||||
}
|
||||
}
|
||||
|
||||
void AThrustFloor::Deactivate (AActor *activator)
|
||||
{
|
||||
if (args[0] == 1)
|
||||
{
|
||||
S_Sound (this, CHAN_BODY, "ThrustSpikeRaise", 1, ATTN_NORM);
|
||||
if (args[1])
|
||||
SetState (&States[S_BTHRUSTLOWER]);
|
||||
else
|
||||
SetState (&States[S_THRUSTLOWER]);
|
||||
}
|
||||
if (args[0] == 1)
|
||||
{
|
||||
S_Sound (this, CHAN_BODY, "ThrustSpikeRaise", 1, ATTN_NORM);
|
||||
if (args[1])
|
||||
SetState (&States[S_BTHRUSTLOWER]);
|
||||
else
|
||||
SetState (&States[S_THRUSTLOWER]);
|
||||
}
|
||||
}
|
||||
|
||||
// Spike up -----------------------------------------------------------------
|
||||
|
@ -264,7 +264,7 @@ void A_ThrustInitDn (AActor *actor)
|
|||
actor->flags2 = MF2_NOTELEPORT|MF2_FLOORCLIP;
|
||||
actor->renderflags = RF_INVISIBLE;
|
||||
static_cast<AThrustFloor *>(actor)->DirtClump =
|
||||
Spawn<ADirtClump> (actor->x, actor->y, actor->z);
|
||||
Spawn<ADirtClump> (actor->x, actor->y, actor->z, ALLOW_REPLACE);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -129,13 +129,13 @@ void A_Summon (AActor *actor)
|
|||
{
|
||||
AMinotaurFriend *mo;
|
||||
|
||||
mo = Spawn<AMinotaurFriend> (actor->x, actor->y, actor->z);
|
||||
mo = Spawn<AMinotaurFriend> (actor->x, actor->y, actor->z, ALLOW_REPLACE);
|
||||
if (mo)
|
||||
{
|
||||
if (P_TestMobjLocation(mo) == false || !actor->tracer)
|
||||
{ // Didn't fit - change back to artifact
|
||||
mo->Destroy ();
|
||||
AActor *arti = Spawn<AArtiDarkServant> (actor->x, actor->y, actor->z);
|
||||
AActor *arti = Spawn<AArtiDarkServant> (actor->x, actor->y, actor->z, ALLOW_REPLACE);
|
||||
if (arti) arti->flags |= MF_DROPPED;
|
||||
return;
|
||||
}
|
||||
|
@ -148,7 +148,7 @@ void A_Summon (AActor *actor)
|
|||
else
|
||||
{
|
||||
mo->tracer = actor->tracer; // Pointer to master
|
||||
AInventory *power = Spawn<APowerMinotaur> (0, 0, 0);
|
||||
AInventory *power = Spawn<APowerMinotaur> (0, 0, 0, NO_REPLACE);
|
||||
power->TryPickup (actor->tracer);
|
||||
if (actor->tracer->player != NULL)
|
||||
{
|
||||
|
@ -157,7 +157,7 @@ void A_Summon (AActor *actor)
|
|||
}
|
||||
|
||||
// Make smoke puff
|
||||
Spawn<AMinotaurSmoke> (actor->x, actor->y, actor->z);
|
||||
Spawn<AMinotaurSmoke> (actor->x, actor->y, actor->z, ALLOW_REPLACE);
|
||||
S_SoundID (actor, CHAN_VOICE, mo->ActiveSound, 1, ATTN_NORM);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -164,7 +164,7 @@ static void TeloSpawn (AActor *source, const PClass *type)
|
|||
{
|
||||
AActor *fx;
|
||||
|
||||
fx = Spawn (type, source->x, source->y, source->z);
|
||||
fx = Spawn (type, source->x, source->y, source->z, ALLOW_REPLACE);
|
||||
if (fx)
|
||||
{
|
||||
fx->special1 = TELEPORT_LIFE; // Lifetime countdown
|
||||
|
|
|
@ -138,7 +138,7 @@ bool AFourthWeaponPiece::TryPickup (AActor *toucher)
|
|||
|
||||
if (gaveWeapon)
|
||||
{
|
||||
TempFourthWeapon = static_cast<AInventory *>(Spawn (FourthWeaponClass, x, y, z));
|
||||
TempFourthWeapon = static_cast<AInventory *>(Spawn (FourthWeaponClass, x, y, z, NO_REPLACE));
|
||||
if (TempFourthWeapon != NULL)
|
||||
{
|
||||
gaveWeapon = TempFourthWeapon->TryPickup (toucher);
|
||||
|
|
|
@ -416,7 +416,7 @@ void A_WraithFX2 (AActor *actor)
|
|||
|
||||
for (i = 2; i; --i)
|
||||
{
|
||||
mo = Spawn<AWraithFX2> (actor->x, actor->y, actor->z);
|
||||
mo = Spawn<AWraithFX2> (actor->x, actor->y, actor->z, ALLOW_REPLACE);
|
||||
if(mo)
|
||||
{
|
||||
if (pr_wraithfx2 ()<128)
|
||||
|
@ -453,7 +453,7 @@ void A_WraithFX3 (AActor *actor)
|
|||
|
||||
while (numdropped-- > 0)
|
||||
{
|
||||
mo = Spawn<AWraithFX3> (actor->x, actor->y, actor->z);
|
||||
mo = Spawn<AWraithFX3> (actor->x, actor->y, actor->z, ALLOW_REPLACE);
|
||||
if (mo)
|
||||
{
|
||||
mo->x += (pr_wraithfx3()-128)<<11;
|
||||
|
@ -501,7 +501,7 @@ void A_WraithFX4 (AActor *actor)
|
|||
|
||||
if (spawn4)
|
||||
{
|
||||
mo = Spawn<AWraithFX4> (actor->x, actor->y, actor->z);
|
||||
mo = Spawn<AWraithFX4> (actor->x, actor->y, actor->z, ALLOW_REPLACE);
|
||||
if (mo)
|
||||
{
|
||||
mo->x += (pr_wraithfx4()-128)<<12;
|
||||
|
@ -512,7 +512,7 @@ void A_WraithFX4 (AActor *actor)
|
|||
}
|
||||
if (spawn5)
|
||||
{
|
||||
mo = Spawn<AWraithFX5> (actor->x, actor->y, actor->z);
|
||||
mo = Spawn<AWraithFX5> (actor->x, actor->y, actor->z, ALLOW_REPLACE);
|
||||
if (mo)
|
||||
{
|
||||
mo->x += (pr_wraithfx4()-128)<<11;
|
||||
|
|
|
@ -54,7 +54,7 @@ bool P_MorphPlayer (player_t *p, const PClass *spawntype)
|
|||
return false;
|
||||
}
|
||||
|
||||
morphed = static_cast<APlayerPawn *>(Spawn (spawntype, actor->x, actor->y, actor->z));
|
||||
morphed = static_cast<APlayerPawn *>(Spawn (spawntype, actor->x, actor->y, actor->z, NO_REPLACE));
|
||||
DObject::PointerSubstitution (actor, morphed);
|
||||
morphed->angle = actor->angle;
|
||||
morphed->target = actor->target;
|
||||
|
@ -69,7 +69,7 @@ bool P_MorphPlayer (player_t *p, const PClass *spawntype)
|
|||
morphed->flags |= actor->flags & (MF_SHADOW|MF_NOGRAVITY);
|
||||
morphed->flags2 |= actor->flags2 & MF2_FLY;
|
||||
morphed->flags3 |= actor->flags3 & MF3_GHOST;
|
||||
Spawn<ATeleportFog> (actor->x, actor->y, actor->z + TELEFOGHEIGHT);
|
||||
Spawn<ATeleportFog> (actor->x, actor->y, actor->z + TELEFOGHEIGHT, ALLOW_REPLACE);
|
||||
actor->player = NULL;
|
||||
actor->flags &= ~(MF_SOLID|MF_SHOOTABLE);
|
||||
actor->flags |= MF_UNMORPHED;
|
||||
|
@ -163,7 +163,7 @@ bool P_UndoPlayerMorph (player_t *player, bool force)
|
|||
}
|
||||
angle = mo->angle >> ANGLETOFINESHIFT;
|
||||
Spawn<ATeleportFog> (pmo->x + 20*finecosine[angle],
|
||||
pmo->y + 20*finesine[angle], pmo->z + TELEFOGHEIGHT);
|
||||
pmo->y + 20*finesine[angle], pmo->z + TELEFOGHEIGHT, ALLOW_REPLACE);
|
||||
beastweap = player->ReadyWeapon;
|
||||
if (player->PremorphWeapon != NULL)
|
||||
{
|
||||
|
@ -205,7 +205,7 @@ bool P_MorphMonster (AActor *actor, const PClass *spawntype)
|
|||
return false;
|
||||
}
|
||||
|
||||
morphed = Spawn (spawntype, actor->x, actor->y, actor->z);
|
||||
morphed = Spawn (spawntype, actor->x, actor->y, actor->z, NO_REPLACE);
|
||||
DObject::PointerSubstitution (actor, morphed);
|
||||
morphed->tid = actor->tid;
|
||||
morphed->angle = actor->angle;
|
||||
|
@ -230,7 +230,7 @@ bool P_MorphMonster (AActor *actor, const PClass *spawntype)
|
|||
actor->flags &= ~(MF_SOLID|MF_SHOOTABLE);
|
||||
actor->flags |= MF_UNMORPHED;
|
||||
actor->renderflags |= RF_INVISIBLE;
|
||||
Spawn<ATeleportFog> (actor->x, actor->y, actor->z + TELEFOGHEIGHT);
|
||||
Spawn<ATeleportFog> (actor->x, actor->y, actor->z + TELEFOGHEIGHT, ALLOW_REPLACE);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -285,7 +285,7 @@ bool P_UpdateMorphedMonster (AActor *beast, int tics)
|
|||
beast->tracer = NULL;
|
||||
DObject::PointerSubstitution (beast, actor);
|
||||
beast->Destroy ();
|
||||
Spawn<ATeleportFog> (beast->x, beast->y, beast->z + TELEFOGHEIGHT);
|
||||
Spawn<ATeleportFog> (beast->x, beast->y, beast->z + TELEFOGHEIGHT, ALLOW_REPLACE);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -598,7 +598,7 @@ void A_MinotaurCharge (AActor *actor)
|
|||
{
|
||||
type = PClass::FindClass ("PunchPuff");
|
||||
}
|
||||
puff = Spawn (type, actor->x, actor->y, actor->z);
|
||||
puff = Spawn (type, actor->x, actor->y, actor->z, ALLOW_REPLACE);
|
||||
puff->momz = 2*FRACUNIT;
|
||||
actor->special1--;
|
||||
}
|
||||
|
@ -714,7 +714,7 @@ void A_MntrFloorFire (AActor *actor)
|
|||
actor->z = actor->floorz;
|
||||
x = actor->x + (pr_fire.Random2 () << 10);
|
||||
y = actor->y + (pr_fire.Random2 () << 10);
|
||||
mo = Spawn<AMinotaurFX3> (x, y, ONFLOORZ);
|
||||
mo = Spawn<AMinotaurFX3> (x, y, ONFLOORZ, ALLOW_REPLACE);
|
||||
mo->target = actor->target;
|
||||
mo->momx = 1; // Force block checking
|
||||
P_CheckMissileSpawn (mo);
|
||||
|
@ -967,5 +967,5 @@ void A_SmokePuffEntry(mobj_t *actor)
|
|||
|
||||
void A_SmokePuffExit (AActor *actor)
|
||||
{
|
||||
Spawn<AMinotaurSmokeExit> (actor->x, actor->y, actor->z);
|
||||
Spawn<AMinotaurSmokeExit> (actor->x, actor->y, actor->z, ALLOW_REPLACE);
|
||||
}
|
||||
|
|
|
@ -100,19 +100,22 @@ void A_NoBlocking (AActor *actor)
|
|||
{
|
||||
FDropItem *di = GetDropItems(actor);
|
||||
|
||||
while (di != NULL)
|
||||
if (di != NULL)
|
||||
{
|
||||
if (di->Name != NAME_None)
|
||||
while (di != NULL)
|
||||
{
|
||||
const PClass *ti = PClass::FindClass(di->Name);
|
||||
if (ti) P_DropItem (actor, ti, di->amount, di->probability);
|
||||
if (di->Name != NAME_None)
|
||||
{
|
||||
const PClass *ti = PClass::FindClass(di->Name);
|
||||
if (ti) P_DropItem (actor, ti, di->amount, di->probability);
|
||||
}
|
||||
di = di->Next;
|
||||
}
|
||||
di = di->Next;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
actor->NoBlockingSet ();
|
||||
else
|
||||
{
|
||||
actor->NoBlockingSet ();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -260,7 +263,7 @@ void A_FreezeDeathChunks (AActor *actor)
|
|||
mo = Spawn<AIceChunk> (
|
||||
actor->x + (((pr_freeze()-128)*actor->radius)>>7),
|
||||
actor->y + (((pr_freeze()-128)*actor->radius)>>7),
|
||||
actor->z + (pr_freeze()*actor->height/255));
|
||||
actor->z + (pr_freeze()*actor->height/255), ALLOW_REPLACE);
|
||||
mo->SetState (mo->SpawnState + (pr_freeze()%3));
|
||||
if (mo)
|
||||
{
|
||||
|
@ -274,7 +277,8 @@ void A_FreezeDeathChunks (AActor *actor)
|
|||
}
|
||||
if (actor->player)
|
||||
{ // attach the player's view to a chunk of ice
|
||||
AIceChunkHead *head = Spawn<AIceChunkHead> (actor->x, actor->y, actor->z + actor->player->mo->ViewHeight);
|
||||
AIceChunkHead *head = Spawn<AIceChunkHead> (actor->x, actor->y,
|
||||
actor->z + actor->player->mo->ViewHeight, ALLOW_REPLACE);
|
||||
head->momz = FixedDiv(head->z-actor->z, actor->height)<<2;
|
||||
head->momx = pr_freeze.Random2 () << (FRACBITS-7);
|
||||
head->momy = pr_freeze.Random2 () << (FRACBITS-7);
|
||||
|
|
|
@ -42,7 +42,7 @@ IMPLEMENT_ABSTRACT_ACTOR (APowerup)
|
|||
|
||||
bool APowerupGiver::Use (bool pickup)
|
||||
{
|
||||
APowerup *power = static_cast<APowerup *> (Spawn (PowerupType, 0, 0, 0));
|
||||
APowerup *power = static_cast<APowerup *> (Spawn (PowerupType, 0, 0, 0, NO_REPLACE));
|
||||
|
||||
if (EffectTics != 0)
|
||||
{
|
||||
|
@ -966,7 +966,7 @@ void APowerSpeed::DoEffect ()
|
|||
if (P_AproxDistance (Owner->momx, Owner->momy) <= 12*FRACUNIT)
|
||||
return;
|
||||
|
||||
AActor *speedMo = Spawn<APlayerSpeedTrail> (Owner->x, Owner->y, Owner->z);
|
||||
AActor *speedMo = Spawn<APlayerSpeedTrail> (Owner->x, Owner->y, Owner->z, NO_REPLACE);
|
||||
if (speedMo)
|
||||
{
|
||||
speedMo->angle = Owner->angle;
|
||||
|
|
|
@ -124,15 +124,15 @@ void A_BridgeInit (AActor *self)
|
|||
self->special1 = 0;
|
||||
|
||||
// Spawn triad into world
|
||||
ball1 = Spawn<ABridgeBall> (cx, cy, cz);
|
||||
ball1 = Spawn<ABridgeBall> (cx, cy, cz, ALLOW_REPLACE);
|
||||
ball1->angle = startangle;
|
||||
ball1->target = self;
|
||||
|
||||
ball2 = Spawn<ABridgeBall> (cx, cy, cz);
|
||||
ball2 = Spawn<ABridgeBall> (cx, cy, cz, ALLOW_REPLACE);
|
||||
ball2->angle = startangle + ANGLE_45/32*85;
|
||||
ball2->target = self;
|
||||
|
||||
ball3 = Spawn<ABridgeBall> (cx, cy, cz);
|
||||
ball3 = Spawn<ABridgeBall> (cx, cy, cz, ALLOW_REPLACE);
|
||||
ball3->angle = startangle + (angle_t)ANGLE_45/32*170;
|
||||
ball3->target = self;
|
||||
|
||||
|
|
|
@ -45,7 +45,7 @@ void P_SpawnDirt (AActor *actor, fixed_t radius)
|
|||
dtype = PClass::FindClass(fmt);
|
||||
if (dtype)
|
||||
{
|
||||
mo = Spawn (dtype, x, y, z);
|
||||
mo = Spawn (dtype, x, y, z, ALLOW_REPLACE);
|
||||
if (mo)
|
||||
{
|
||||
mo->momz = pr_dirt()<<10;
|
||||
|
|
|
@ -144,16 +144,12 @@ AInventory *AAmmo::CreateCopy (AActor *other)
|
|||
{
|
||||
const PClass *type = GetParentAmmo();
|
||||
assert (type->ActorInfo != NULL);
|
||||
FActorInfo *replacesave = type->ActorInfo->Replacement;
|
||||
if (!GoAway ())
|
||||
{
|
||||
Destroy ();
|
||||
}
|
||||
// If the base ammo class has a replacement defined, the replacement
|
||||
// must not be used in the inventory.
|
||||
type->ActorInfo->Replacement = NULL;
|
||||
copy = static_cast<AInventory *>(Spawn (type, 0, 0, 0));
|
||||
type->ActorInfo->Replacement = replacesave;
|
||||
|
||||
copy = static_cast<AInventory *>(Spawn (type, 0, 0, 0, NO_REPLACE));
|
||||
copy->Amount = amount;
|
||||
copy->BecomeItem ();
|
||||
}
|
||||
|
@ -318,7 +314,7 @@ void A_RestoreSpecialDoomThing (AActor *self)
|
|||
{
|
||||
self->SetState (self->SpawnState);
|
||||
S_Sound (self, CHAN_VOICE, "misc/spawn", 1, ATTN_IDLE);
|
||||
Spawn<AItemFog> (self->x, self->y, self->z);
|
||||
Spawn<AItemFog> (self->x, self->y, self->z, ALLOW_REPLACE);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -594,7 +590,7 @@ bool AInventory::GoAway ()
|
|||
{
|
||||
if (ItemFlags & IF_PICKUPFLASH)
|
||||
{
|
||||
Spawn<APickupFlash> (x, y, z);
|
||||
Spawn<APickupFlash> (x, y, z, ALLOW_REPLACE);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
@ -603,7 +599,7 @@ bool AInventory::GoAway ()
|
|||
{
|
||||
if (ItemFlags & IF_PICKUPFLASH)
|
||||
{
|
||||
Spawn<APickupFlash> (x, y, z);
|
||||
Spawn<APickupFlash> (x, y, z, ALLOW_REPLACE);
|
||||
}
|
||||
Hide ();
|
||||
if (ShouldRespawn ())
|
||||
|
@ -649,7 +645,7 @@ AInventory *AInventory::CreateCopy (AActor *other)
|
|||
|
||||
if (GoAway ())
|
||||
{
|
||||
copy = static_cast<AInventory *>(Spawn (GetClass(), 0, 0, 0));
|
||||
copy = static_cast<AInventory *>(Spawn (GetClass(), 0, 0, 0, NO_REPLACE));
|
||||
copy->Amount = Amount;
|
||||
copy->MaxAmount = MaxAmount;
|
||||
}
|
||||
|
@ -693,7 +689,7 @@ AInventory *AInventory::CreateTossable ()
|
|||
return this;
|
||||
}
|
||||
copy = static_cast<AInventory *>(Spawn (GetClass(), Owner->x,
|
||||
Owner->y, Owner->z));
|
||||
Owner->y, Owner->z, NO_REPLACE));
|
||||
if (copy != NULL)
|
||||
{
|
||||
copy->MaxAmount = MaxAmount;
|
||||
|
@ -1365,7 +1361,7 @@ bool ABasicArmorPickup::Use (bool pickup)
|
|||
|
||||
if (armor == NULL)
|
||||
{
|
||||
armor = Spawn<ABasicArmor> (0,0,0);
|
||||
armor = Spawn<ABasicArmor> (0,0,0, NO_REPLACE);
|
||||
armor->BecomeItem ();
|
||||
armor->SavePercent = SavePercent;
|
||||
armor->Amount = armor->MaxAmount = SaveAmount;
|
||||
|
@ -1436,7 +1432,7 @@ bool ABasicArmorBonus::Use (bool pickup)
|
|||
}
|
||||
if (armor == NULL)
|
||||
{
|
||||
armor = Spawn<ABasicArmor> (0,0,0);
|
||||
armor = Spawn<ABasicArmor> (0,0,0, NO_REPLACE);
|
||||
armor->BecomeItem ();
|
||||
armor->SavePercent = SavePercent;
|
||||
armor->Amount = saveAmount;
|
||||
|
@ -1518,7 +1514,7 @@ AInventory *ABasicArmor::CreateCopy (AActor *other)
|
|||
{
|
||||
// BasicArmor that is in use is stored in the inventory as BasicArmor.
|
||||
// BasicArmor that is in reserve is not.
|
||||
ABasicArmor *copy = Spawn<ABasicArmor> (0, 0, 0);
|
||||
ABasicArmor *copy = Spawn<ABasicArmor> (0, 0, 0, NO_REPLACE);
|
||||
copy->SavePercent = SavePercent != 0 ? SavePercent : FRACUNIT/3;
|
||||
copy->Amount = Amount;
|
||||
copy->MaxAmount = MaxAmount;
|
||||
|
@ -1622,7 +1618,7 @@ AInventory *AHexenArmor::CreateCopy (AActor *other)
|
|||
// Like BasicArmor, HexenArmor is used in the inventory but not the map.
|
||||
// health is the slot this armor occupies.
|
||||
// Amount is the quantity to give (0 = normal max).
|
||||
AHexenArmor *copy = Spawn<AHexenArmor> (0, 0, 0);
|
||||
AHexenArmor *copy = Spawn<AHexenArmor> (0, 0, 0, NO_REPLACE);
|
||||
copy->AddArmorToSlot (other, health, Amount);
|
||||
GoAwayAndDie ();
|
||||
return copy;
|
||||
|
@ -1948,7 +1944,7 @@ AInventory *ABackpack::CreateCopy (AActor *other)
|
|||
AAmmo *ammo = static_cast<AAmmo *>(other->FindInventory (type));
|
||||
if (ammo == NULL)
|
||||
{ // The player did not have the ammo. Add it.
|
||||
ammo = static_cast<AAmmo *>(Spawn (type, 0, 0, 0));
|
||||
ammo = static_cast<AAmmo *>(Spawn (type, 0, 0, 0, NO_REPLACE));
|
||||
ammo->Amount = bDepleted ? 0 : ammo->BackpackAmount;
|
||||
ammo->MaxAmount = ammo->BackpackMaxAmount;
|
||||
ammo->AttachToOwner (other);
|
||||
|
|
|
@ -147,7 +147,7 @@ void ASoundSequence::PostBeginPlay ()
|
|||
}
|
||||
if (master == NULL)
|
||||
{
|
||||
master = Spawn<ASoundSequenceSlot> (0, 0, 0);
|
||||
master = Spawn<ASoundSequenceSlot> (0, 0, 0, NO_REPLACE);
|
||||
master->Sequence = SN_StartSequence (master, slot, 0);
|
||||
}
|
||||
master->Sequence->AddChoice (args[0], SEQ_ENVIRONMENT);
|
||||
|
|
|
@ -64,7 +64,7 @@ bool AWeaponPiece::TryPickup (AActor *toucher)
|
|||
}
|
||||
if (!hold)
|
||||
{
|
||||
hold=static_cast<AWeaponHolder*>(Spawn(RUNTIME_CLASS(AWeaponHolder), 0, 0, 0));
|
||||
hold=static_cast<AWeaponHolder*>(Spawn(RUNTIME_CLASS(AWeaponHolder), 0, 0, 0, NO_REPLACE));
|
||||
hold->BecomeItem();
|
||||
hold->AttachToOwner(toucher);
|
||||
hold->PieceMask=0;
|
||||
|
@ -105,7 +105,7 @@ bool AWeaponPiece::TryPickup (AActor *toucher)
|
|||
{
|
||||
if (!toucher->FindInventory (WeaponClass))
|
||||
{
|
||||
FullWeapon= static_cast<AWeapon*>(Spawn(WeaponClass, 0, 0, 0));
|
||||
FullWeapon= static_cast<AWeapon*>(Spawn(WeaponClass, 0, 0, 0, NO_REPLACE));
|
||||
|
||||
// The weapon itself should not give more ammo to the player!
|
||||
FullWeapon->AmmoGive1=0;
|
||||
|
|
|
@ -253,7 +253,7 @@ AAmmo *AWeapon::AddAmmo (AActor *other, const PClass *ammotype, int amount)
|
|||
ammo = static_cast<AAmmo *>(other->FindInventory (ammotype));
|
||||
if (ammo == NULL)
|
||||
{
|
||||
ammo = static_cast<AAmmo *>(Spawn (ammotype, 0, 0, 0));
|
||||
ammo = static_cast<AAmmo *>(Spawn (ammotype, 0, 0, 0, NO_REPLACE));
|
||||
ammo->Amount = MIN (amount, ammo->MaxAmount);
|
||||
ammo->AttachToOwner (other);
|
||||
}
|
||||
|
@ -309,7 +309,7 @@ AWeapon *AWeapon::AddWeapon (const PClass *weapontype)
|
|||
weap = static_cast<AWeapon *>(Owner->FindInventory (weapontype));
|
||||
if (weap == NULL)
|
||||
{
|
||||
weap = static_cast<AWeapon *>(Spawn (weapontype, 0, 0, 0));
|
||||
weap = static_cast<AWeapon *>(Spawn (weapontype, 0, 0, 0, NO_REPLACE));
|
||||
weap->AttachToOwner (Owner);
|
||||
}
|
||||
return weap;
|
||||
|
|
|
@ -343,7 +343,7 @@ END_DEFAULTS
|
|||
|
||||
static void GenericSpectreSpawn (AActor *actor, const PClass *type)
|
||||
{
|
||||
AActor *spectre = Spawn (type, actor->x, actor->y, actor->z);
|
||||
AActor *spectre = Spawn (type, actor->x, actor->y, actor->z, ALLOW_REPLACE);
|
||||
if (spectre != NULL)
|
||||
{
|
||||
spectre->momz = pr_spectrespawn() << 9;
|
||||
|
@ -377,7 +377,7 @@ void A_SpawnSpectre5 (AActor *actor)
|
|||
|
||||
void A_212e4 (AActor *self)
|
||||
{
|
||||
AActor *foo = Spawn<AAlienChunkSmall> (self->x, self->y, self->z + 10*FRACUNIT);
|
||||
AActor *foo = Spawn<AAlienChunkSmall> (self->x, self->y, self->z + 10*FRACUNIT, ALLOW_REPLACE);
|
||||
|
||||
if (foo != NULL)
|
||||
{
|
||||
|
@ -395,7 +395,7 @@ void A_212e4 (AActor *self)
|
|||
|
||||
void A_2134c (AActor *self)
|
||||
{
|
||||
AActor *foo = Spawn<AAlienChunkLarge> (self->x, self->y, self->z + 10*FRACUNIT);
|
||||
AActor *foo = Spawn<AAlienChunkLarge> (self->x, self->y, self->z + 10*FRACUNIT, ALLOW_REPLACE);
|
||||
|
||||
if (foo != NULL)
|
||||
{
|
||||
|
@ -464,7 +464,7 @@ void A_20334 (AActor *self)
|
|||
if (self->target == NULL)
|
||||
return;
|
||||
|
||||
AActor *foo = Spawn<ASpectralLightningV2> (self->x, self->y, self->z + 32*FRACUNIT);
|
||||
AActor *foo = Spawn<ASpectralLightningV2> (self->x, self->y, self->z + 32*FRACUNIT, ALLOW_REPLACE);
|
||||
|
||||
foo->momz = -12*FRACUNIT;
|
||||
foo->target = self;
|
||||
|
|
|
@ -69,7 +69,7 @@ AInventory *ACoin::CreateCopy (AActor *other)
|
|||
{
|
||||
return Super::CreateCopy (other);
|
||||
}
|
||||
AInventory *copy = Spawn<ACoin> (0,0,0);
|
||||
AInventory *copy = Spawn<ACoin> (0,0,0, NO_REPLACE);
|
||||
copy->Amount = Amount;
|
||||
copy->BecomeItem ();
|
||||
GoAwayAndDie ();
|
||||
|
@ -185,22 +185,22 @@ AInventory *ACoin::CreateTossable ()
|
|||
if (Amount >= 50)
|
||||
{
|
||||
Amount -= 50;
|
||||
tossed = Spawn<AGold50> (Owner->x, Owner->y, Owner->z);
|
||||
tossed = Spawn<AGold50> (Owner->x, Owner->y, Owner->z, NO_REPLACE);
|
||||
}
|
||||
else if (Amount >= 25)
|
||||
{
|
||||
Amount -= 25;
|
||||
tossed = Spawn<AGold25> (Owner->x, Owner->y, Owner->z);
|
||||
tossed = Spawn<AGold25> (Owner->x, Owner->y, Owner->z, NO_REPLACE);
|
||||
}
|
||||
else if (Amount >= 10)
|
||||
{
|
||||
Amount -= 10;
|
||||
tossed = Spawn<AGold10> (Owner->x, Owner->y, Owner->z);
|
||||
tossed = Spawn<AGold10> (Owner->x, Owner->y, Owner->z, NO_REPLACE);
|
||||
}
|
||||
else if (Amount > 1)
|
||||
{
|
||||
Amount -= 1;
|
||||
tossed = Spawn<ACoin> (Owner->x, Owner->y, Owner->z);
|
||||
tossed = Spawn<ACoin> (Owner->x, Owner->y, Owner->z, NO_REPLACE);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -295,7 +295,7 @@ void A_200e0 (AActor *self)
|
|||
case 0:
|
||||
if (self->target != NULL)
|
||||
{
|
||||
bar = Spawn<ASpectralLightningSpot> (self->x, self->y, ONFLOORZ);
|
||||
bar = Spawn<ASpectralLightningSpot> (self->x, self->y, ONFLOORZ, ALLOW_REPLACE);
|
||||
bar->threshold = 25;
|
||||
bar->target = self;
|
||||
bar->tracer = self->target;
|
||||
|
@ -347,7 +347,7 @@ void A_200e0 (AActor *self)
|
|||
|
||||
void A_SpawnEntity (AActor *self)
|
||||
{
|
||||
AActor *entity = Spawn<AEntityBoss> (self->x, self->y, self->z + 70*FRACUNIT);
|
||||
AActor *entity = Spawn<AEntityBoss> (self->x, self->y, self->z + 70*FRACUNIT, ALLOW_REPLACE);
|
||||
if (entity != NULL)
|
||||
{
|
||||
entity->angle = self->angle;
|
||||
|
@ -365,7 +365,7 @@ void A_20c74 (AActor *selfa)
|
|||
|
||||
an = self->angle >> ANGLETOFINESHIFT;
|
||||
second = Spawn<AEntitySecond> (self->SpawnX + FixedMul (secondRadius, finecosine[an]),
|
||||
self->SpawnY + FixedMul (secondRadius, finesine[an]), self->SpawnZ);
|
||||
self->SpawnY + FixedMul (secondRadius, finesine[an]), self->SpawnZ, ALLOW_REPLACE);
|
||||
second->target = self->target;
|
||||
A_FaceTarget (second);
|
||||
an = second->angle >> ANGLETOFINESHIFT;
|
||||
|
@ -374,7 +374,7 @@ void A_20c74 (AActor *selfa)
|
|||
|
||||
an = (self->angle + ANGLE_90) >> ANGLETOFINESHIFT;
|
||||
second = Spawn<AEntitySecond> (self->SpawnX + FixedMul (secondRadius, finecosine[an]),
|
||||
self->SpawnY + FixedMul (secondRadius, finesine[an]), self->SpawnZ);
|
||||
self->SpawnY + FixedMul (secondRadius, finesine[an]), self->SpawnZ, ALLOW_REPLACE);
|
||||
second->target = self->target;
|
||||
second->momx = FixedMul (secondRadius, finecosine[an]) << 2;
|
||||
second->momy = FixedMul (secondRadius, finesine[an]) << 2;
|
||||
|
@ -382,7 +382,7 @@ void A_20c74 (AActor *selfa)
|
|||
|
||||
an = (self->angle - ANGLE_90) >> ANGLETOFINESHIFT;
|
||||
second = Spawn<AEntitySecond> (self->SpawnX + FixedMul (secondRadius, finecosine[an]),
|
||||
self->SpawnY + FixedMul (secondRadius, finesine[an]), self->SpawnZ);
|
||||
self->SpawnY + FixedMul (secondRadius, finesine[an]), self->SpawnZ, ALLOW_REPLACE);
|
||||
second->target = self->target;
|
||||
second->momx = FixedMul (secondRadius, finecosine[an]) << 2;
|
||||
second->momy = FixedMul (secondRadius, finesine[an]) << 2;
|
||||
|
|
|
@ -287,7 +287,7 @@ void A_InquisitorCheckLand (AActor *self)
|
|||
|
||||
void A_TossArm (AActor *self)
|
||||
{
|
||||
AActor *foo = Spawn<AInquisitorArm> (self->x, self->y, self->z + 24*FRACUNIT);
|
||||
AActor *foo = Spawn<AInquisitorArm> (self->x, self->y, self->z + 24*FRACUNIT, ALLOW_REPLACE);
|
||||
foo->angle = self->angle - ANGLE_90 + (pr_inq.Random2() << 22);
|
||||
foo->momx = FixedMul (foo->Speed, finecosine[foo->angle >> ANGLETOFINESHIFT]) >> 3;
|
||||
foo->momy = FixedMul (foo->Speed, finesine[foo->angle >> ANGLETOFINESHIFT]) >> 3;
|
||||
|
|
|
@ -205,7 +205,7 @@ void A_20598 (AActor *self)
|
|||
void A_205b0 (AActor *self)
|
||||
{
|
||||
S_Sound (self, CHAN_BODY, "loremaster/active", 1, ATTN_NORM);
|
||||
Spawn<ALoreShot2> (self->x, self->y, self->z);
|
||||
Spawn<ALoreShot2> (self->x - (self->momx >> 1), self->y - (self->momy >> 1), self->z - (self->momz >> 1));
|
||||
Spawn<ALoreShot2> (self->x - self->momx, self->y - self->momy, self->z - self->momz);
|
||||
Spawn<ALoreShot2> (self->x, self->y, self->z, ALLOW_REPLACE);
|
||||
Spawn<ALoreShot2> (self->x - (self->momx >> 1), self->y - (self->momy >> 1), self->z - (self->momz >> 1), ALLOW_REPLACE);
|
||||
Spawn<ALoreShot2> (self->x - self->momx, self->y - self->momy, self->z - self->momz, ALLOW_REPLACE);
|
||||
}
|
||||
|
|
|
@ -247,7 +247,7 @@ void A_SpotLightning (AActor *self)
|
|||
if (self->target == NULL)
|
||||
return;
|
||||
|
||||
spot = Spawn<ASpectralLightningSpot> (self->target->x, self->target->y, ONFLOORZ);
|
||||
spot = Spawn<ASpectralLightningSpot> (self->target->x, self->target->y, ONFLOORZ, ALLOW_REPLACE);
|
||||
if (spot != NULL)
|
||||
{
|
||||
spot->threshold = 25;
|
||||
|
@ -265,7 +265,7 @@ void A_SpotLightning (AActor *self)
|
|||
|
||||
void A_SpawnProgrammerBase (AActor *self)
|
||||
{
|
||||
AActor *foo = Spawn<AProgrammerBase> (self->x, self->y, self->z + 24*FRACUNIT);
|
||||
AActor *foo = Spawn<AProgrammerBase> (self->x, self->y, self->z + 24*FRACUNIT, ALLOW_REPLACE);
|
||||
if (foo != NULL)
|
||||
{
|
||||
foo->angle = self->angle + ANGLE_180 + (pr_prog.Random2() << 22);
|
||||
|
|
|
@ -279,7 +279,7 @@ void A_Beacon (AActor *self)
|
|||
ARebel *rebel;
|
||||
angle_t an;
|
||||
|
||||
rebel = Spawn<ARebel1> (self->x, self->y, ONFLOORZ);
|
||||
rebel = Spawn<ARebel1> (self->x, self->y, ONFLOORZ, ALLOW_REPLACE);
|
||||
if (!P_TryMove (rebel, rebel->x, rebel->y, true))
|
||||
{
|
||||
rebel->Destroy ();
|
||||
|
@ -313,7 +313,7 @@ void A_Beacon (AActor *self)
|
|||
rebel->SetState (rebel->SeeState);
|
||||
rebel->angle = self->angle;
|
||||
an = self->angle >> ANGLETOFINESHIFT;
|
||||
Spawn<ATeleportFog> (rebel->x + 20*finecosine[an], rebel->y + 20*finesine[an], rebel->z + TELEFOGHEIGHT);
|
||||
Spawn<ATeleportFog> (rebel->x + 20*finecosine[an], rebel->y + 20*finesine[an], rebel->z + TELEFOGHEIGHT, ALLOW_REPLACE);
|
||||
if (--self->health < 0)
|
||||
{
|
||||
self->Destroy ();
|
||||
|
|
|
@ -163,7 +163,7 @@ void A_SentinelAttack (AActor *self)
|
|||
trail = Spawn<ASentinelFX1> (
|
||||
self->x + FixedMul (missile->radius * i, finecosine[missile->angle >> ANGLETOFINESHIFT]),
|
||||
self->y + FixedMul (missile->radius * i, finesine[missile->angle >> ANGLETOFINESHIFT]),
|
||||
missile->z + (missile->momz / 4 * i));
|
||||
missile->z + (missile->momz / 4 * i), ALLOW_REPLACE);
|
||||
if (trail != NULL)
|
||||
{
|
||||
trail->target = self;
|
||||
|
|
|
@ -149,7 +149,7 @@ END_DEFAULTS
|
|||
|
||||
void A_2046c (AActor *self)
|
||||
{
|
||||
AActor *foo = Spawn<ASpectralLightningHTail> (self->x - self->momx, self->y - self->momy, self->z);
|
||||
AActor *foo = Spawn<ASpectralLightningHTail> (self->x - self->momx, self->y - self->momy, self->z, ALLOW_REPLACE);
|
||||
|
||||
foo->angle = self->angle;
|
||||
foo->health = self->health;
|
||||
|
@ -290,13 +290,13 @@ void A_201fc (AActor *self)
|
|||
y = self->y + pr_zap5.Random2(3) * FRACUNIT * 50;
|
||||
|
||||
flash = Spawn (self->threshold > 25 ? RUNTIME_CLASS(ASpectralLightningV2) :
|
||||
RUNTIME_CLASS(ASpectralLightningV1), x, y, ONCEILINGZ);
|
||||
RUNTIME_CLASS(ASpectralLightningV1), x, y, ONCEILINGZ, ALLOW_REPLACE);
|
||||
|
||||
flash->target = self->target;
|
||||
flash->momz = -18*FRACUNIT;
|
||||
flash->health = self->health;
|
||||
|
||||
flash = Spawn<ASpectralLightningV2> (self->x, self->y, ONCEILINGZ);
|
||||
flash = Spawn<ASpectralLightningV2> (self->x, self->y, ONCEILINGZ, ALLOW_REPLACE);
|
||||
|
||||
flash->target = self->target;
|
||||
flash->momz = -18*FRACUNIT;
|
||||
|
|
|
@ -155,7 +155,7 @@ bool AHealthTraining::TryPickup (AActor *toucher)
|
|||
if (Super::TryPickup (toucher))
|
||||
{
|
||||
toucher->GiveInventoryType (RUNTIME_CLASS(AGunTraining));
|
||||
AInventory *coin = Spawn<ACoin> (0,0,0);
|
||||
AInventory *coin = Spawn<ACoin> (0,0,0, NO_REPLACE);
|
||||
if (coin != NULL)
|
||||
{
|
||||
coin->Amount = toucher->player->accuracy*5 + 300;
|
||||
|
|
|
@ -768,7 +768,7 @@ END_DEFAULTS
|
|||
void A_TossGib (AActor *self)
|
||||
{
|
||||
const PClass *gibtype = (self->flags & MF_NOBLOOD) ? RUNTIME_CLASS(AJunk) : RUNTIME_CLASS(AMeat);
|
||||
AActor *gib = Spawn (gibtype, self->x, self->y, self->z + 24*FRACUNIT);
|
||||
AActor *gib = Spawn (gibtype, self->x, self->y, self->z + 24*FRACUNIT, ALLOW_REPLACE);
|
||||
angle_t an;
|
||||
int speed;
|
||||
|
||||
|
@ -965,7 +965,7 @@ void A_ItBurnsItBurns (AActor *self)
|
|||
|
||||
void A_DropFire (AActor *self)
|
||||
{
|
||||
AActor *drop = Spawn<AFireDroplet> (self->x, self->y, self->z + 24*FRACUNIT);
|
||||
AActor *drop = Spawn<AFireDroplet> (self->x, self->y, self->z + 24*FRACUNIT, ALLOW_REPLACE);
|
||||
drop->momz = -FRACUNIT;
|
||||
P_RadiusAttack (self, self, 64, 64, MOD_FIRE, false);
|
||||
}
|
||||
|
|
|
@ -746,7 +746,7 @@ END_DEFAULTS
|
|||
|
||||
AInventory *AAssaultGunStanding::CreateCopy (AActor *other)
|
||||
{
|
||||
AAssaultGun *copy = Spawn<AAssaultGun> (0,0,0);
|
||||
AAssaultGun *copy = Spawn<AAssaultGun> (0,0,0, NO_REPLACE);
|
||||
copy->AmmoGive1 = AmmoGive1;
|
||||
copy->AmmoGive2 = AmmoGive2;
|
||||
GoAwayAndDie ();
|
||||
|
@ -933,7 +933,7 @@ void A_RocketInFlight (AActor *self)
|
|||
|
||||
S_Sound (self, CHAN_VOICE, "misc/missileinflight", 1, ATTN_NORM);
|
||||
P_SpawnPuff (RUNTIME_CLASS(AMiniMissilePuff), self->x, self->y, self->z, self->angle - ANGLE_180, 2, true);
|
||||
trail = Spawn<ARocketTrail> (self->x - self->momx, self->y - self->momy, self->z);
|
||||
trail = Spawn<ARocketTrail> (self->x - self->momx, self->y - self->momy, self->z, ALLOW_REPLACE);
|
||||
if (trail != NULL)
|
||||
{
|
||||
trail->momz = FRACUNIT;
|
||||
|
@ -1396,7 +1396,7 @@ void A_MaulerTorpedoWave (AActor *self)
|
|||
|
||||
AActor *P_SpawnSubMissile (AActor *source, PClass *type, AActor *target)
|
||||
{
|
||||
AActor *other = Spawn (type, source->x, source->y, source->z);
|
||||
AActor *other = Spawn (type, source->x, source->y, source->z, ALLOW_REPLACE);
|
||||
|
||||
if (other == NULL)
|
||||
{
|
||||
|
@ -1576,7 +1576,7 @@ int APhosphorousFire::DoSpecialDamage (AActor *target, int damage)
|
|||
|
||||
void A_SpawnBurn (AActor *self)
|
||||
{
|
||||
Spawn<APhosphorousFire> (self->x, self->y, self->z);
|
||||
Spawn<APhosphorousFire> (self->x, self->y, self->z, ALLOW_REPLACE);
|
||||
}
|
||||
|
||||
void A_BurnArea (AActor *self)
|
||||
|
@ -1627,7 +1627,7 @@ void A_Burnination (AActor *self)
|
|||
|
||||
AActor *drop = Spawn<APhosphorousFire> (
|
||||
x, y,
|
||||
self->z + 4*FRACUNIT);
|
||||
self->z + 4*FRACUNIT, ALLOW_REPLACE);
|
||||
if (drop != NULL)
|
||||
{
|
||||
drop->momx = self->momx + ((pr_phburn.Random2 (7)) << FRACBITS);
|
||||
|
@ -2047,7 +2047,7 @@ bool ASigil::HandlePickup (AInventory *item)
|
|||
|
||||
AInventory *ASigil::CreateCopy (AActor *other)
|
||||
{
|
||||
ASigil *copy = Spawn<ASigil> (0,0,0);
|
||||
ASigil *copy = Spawn<ASigil> (0,0,0, NO_REPLACE);
|
||||
copy->Amount = Amount;
|
||||
copy->MaxAmount = MaxAmount;
|
||||
copy->NumPieces = NumPieces;
|
||||
|
@ -2199,7 +2199,7 @@ void A_FireSigil1 (AActor *actor)
|
|||
P_BulletSlope (actor);
|
||||
if (linetarget != NULL)
|
||||
{
|
||||
spot = Spawn<ASpectralLightningSpot> (linetarget->x, linetarget->y, ONFLOORZ);
|
||||
spot = Spawn<ASpectralLightningSpot> (linetarget->x, linetarget->y, ONFLOORZ, ALLOW_REPLACE);
|
||||
if (spot != NULL)
|
||||
{
|
||||
spot->tracer = linetarget;
|
||||
|
@ -2207,7 +2207,7 @@ void A_FireSigil1 (AActor *actor)
|
|||
}
|
||||
else
|
||||
{
|
||||
spot = Spawn<ASpectralLightningSpot> (actor->x, actor->y, actor->z);
|
||||
spot = Spawn<ASpectralLightningSpot> (actor->x, actor->y, actor->z, ALLOW_REPLACE);
|
||||
if (spot != NULL)
|
||||
{
|
||||
spot->momx += 28 * finecosine[actor->angle >> ANGLETOFINESHIFT];
|
||||
|
@ -2380,7 +2380,7 @@ int ASigil::GiveSigilPiece (AActor *receiver)
|
|||
sigil = receiver->FindInventory<ASigil> ();
|
||||
if (sigil == NULL)
|
||||
{
|
||||
sigil = Spawn<ASigil1> (0,0,0);
|
||||
sigil = Spawn<ASigil1> (0,0,0, NO_REPLACE);
|
||||
if (!sigil->TryPickup (receiver))
|
||||
{
|
||||
sigil->Destroy ();
|
||||
|
|
|
@ -60,7 +60,7 @@ void A_Bang4Cloud (AActor *self)
|
|||
spawnx = self->x + (pr_bang4cloud.Random2() & 3) * 10240;
|
||||
spawny = self->y + (pr_bang4cloud.Random2() & 3) * 10240;
|
||||
|
||||
Spawn<ABang4Cloud> (spawnx, spawny, self->z);
|
||||
Spawn<ABang4Cloud> (spawnx, spawny, self->z, ALLOW_REPLACE);
|
||||
}
|
||||
|
||||
// Piston -------------------------------------------------------------------
|
||||
|
@ -74,7 +74,7 @@ void A_GiveQuestItem (AActor *self)
|
|||
{
|
||||
if (playeringame[i])
|
||||
{
|
||||
AInventory *item = static_cast<AInventory *>(Spawn (QuestItemClasses[questitem-1], 0,0,0));
|
||||
AInventory *item = static_cast<AInventory *>(Spawn (QuestItemClasses[questitem-1], 0,0,0, NO_REPLACE));
|
||||
if (!item->TryPickup (players[i].mo))
|
||||
{
|
||||
item->Destroy ();
|
||||
|
@ -272,7 +272,7 @@ void A_LightGoesOut (AActor *self)
|
|||
|
||||
for (int i = 0; i < 8; ++i)
|
||||
{
|
||||
foo = Spawn("Rubble1", self->x, self->y, self->z);
|
||||
foo = Spawn("Rubble1", self->x, self->y, self->z, ALLOW_REPLACE);
|
||||
if (foo != NULL)
|
||||
{
|
||||
int t = pr_lightout() & 15;
|
||||
|
|
|
@ -418,7 +418,7 @@ void GiveSpawner (player_t *player, const PClass *type, int amount)
|
|||
}
|
||||
|
||||
AInventory *item = static_cast<AInventory *>
|
||||
(Spawn (type, player->mo->x, player->mo->y, player->mo->z));
|
||||
(Spawn (type, player->mo->x, player->mo->y, player->mo->z, NO_REPLACE));
|
||||
if (item != NULL)
|
||||
{
|
||||
if (amount > 0)
|
||||
|
@ -533,7 +533,7 @@ void cht_Give (player_t *player, char *name, int amount)
|
|||
AInventory *ammo = player->mo->FindInventory (type);
|
||||
if (ammo == NULL)
|
||||
{
|
||||
ammo = static_cast<AInventory *>(Spawn (type, 0, 0, 0));
|
||||
ammo = static_cast<AInventory *>(Spawn (type, 0, 0, 0, NO_REPLACE));
|
||||
ammo->AttachToOwner (player->mo);
|
||||
ammo->Amount = ammo->MaxAmount;
|
||||
}
|
||||
|
@ -552,7 +552,7 @@ void cht_Give (player_t *player, char *name, int amount)
|
|||
{
|
||||
if (gameinfo.gametype != GAME_Hexen)
|
||||
{
|
||||
ABasicArmorPickup *armor = Spawn<ABasicArmorPickup> (0,0,0);
|
||||
ABasicArmorPickup *armor = Spawn<ABasicArmorPickup> (0,0,0, NO_REPLACE);
|
||||
armor->SaveAmount = 100*deh.BlueAC;
|
||||
armor->SavePercent = gameinfo.gametype != GAME_Heretic ? FRACUNIT/2 : FRACUNIT*3/4;
|
||||
if (!armor->TryPickup (player->mo))
|
||||
|
@ -564,7 +564,7 @@ void cht_Give (player_t *player, char *name, int amount)
|
|||
{
|
||||
for (i = 0; i < 4; ++i)
|
||||
{
|
||||
AHexenArmor *armor = Spawn<AHexenArmor> (0,0,0);
|
||||
AHexenArmor *armor = Spawn<AHexenArmor> (0,0,0, NO_REPLACE);
|
||||
armor->health = i;
|
||||
armor->Amount = 0;
|
||||
if (!armor->TryPickup (player->mo))
|
||||
|
@ -587,7 +587,7 @@ void cht_Give (player_t *player, char *name, int amount)
|
|||
AKey *key = (AKey *)GetDefaultByType (PClass::m_Types[i]);
|
||||
if (key->KeyNumber != 0)
|
||||
{
|
||||
key = static_cast<AKey *>(Spawn (PClass::m_Types[i], 0,0,0));
|
||||
key = static_cast<AKey *>(Spawn (PClass::m_Types[i], 0,0,0, NO_REPLACE));
|
||||
if (!key->TryPickup (player->mo))
|
||||
{
|
||||
key->Destroy ();
|
||||
|
|
|
@ -175,7 +175,7 @@ static void DoGiveInv (AActor *actor, const PClass *info, int amount)
|
|||
? actor->player->PendingWeapon : NULL;
|
||||
bool hadweap = actor->player != NULL ? actor->player->ReadyWeapon != NULL : true;
|
||||
|
||||
AInventory *item = static_cast<AInventory *>(Spawn (info, 0,0,0));
|
||||
AInventory *item = static_cast<AInventory *>(Spawn (info, 0,0,0, NO_REPLACE));
|
||||
|
||||
// This shouldn't count for the item statistics!
|
||||
if (item->flags & MF_COUNTITEM)
|
||||
|
@ -1840,9 +1840,7 @@ int DLevelScript::DoSpawn (int type, fixed_t x, fixed_t y, fixed_t z, int tid, i
|
|||
|
||||
if (info != NULL)
|
||||
{
|
||||
// Handle decorate replacements.
|
||||
info = info->ActorInfo->GetReplacement()->Class;
|
||||
actor = Spawn (info, x, y, z);
|
||||
actor = Spawn (info, x, y, z, ALLOW_REPLACE);
|
||||
if (actor != NULL)
|
||||
{
|
||||
if (P_TestMobjLocation (actor))
|
||||
|
|
|
@ -903,7 +903,7 @@ static void PickConversationReply ()
|
|||
|
||||
if (takestuff)
|
||||
{
|
||||
AInventory *item = static_cast<AInventory *> (Spawn (reply->GiveType, 0, 0, 0));
|
||||
AInventory *item = static_cast<AInventory *> (Spawn (reply->GiveType, 0, 0, 0, NO_REPLACE));
|
||||
// Items given here should not count as items!
|
||||
if (item->flags & MF_COUNTITEM)
|
||||
{
|
||||
|
|
|
@ -2210,10 +2210,7 @@ AInventory *P_DropItem (AActor *source, const PClass *type, int special, int cha
|
|||
spawnz += source->height / 2;
|
||||
}
|
||||
}
|
||||
// Handle decorate replacements.
|
||||
type = type->ActorInfo->GetReplacement()->Class;
|
||||
|
||||
mo = Spawn (type, source->x, source->y, spawnz);
|
||||
mo = Spawn (type, source->x, source->y, spawnz, ALLOW_REPLACE);
|
||||
mo->flags |= MF_DROPPED;
|
||||
mo->flags &= ~MF_NOGRAVITY; // [RH] Make sure it is affected by gravity
|
||||
if (mo->IsKindOf (RUNTIME_CLASS(AInventory)))
|
||||
|
|
|
@ -2591,7 +2591,7 @@ FUNC(LS_GlassBreak)
|
|||
|
||||
for (int i = 0; i < 7; ++i)
|
||||
{
|
||||
glass = Spawn<AGlassJunk> (x, y, ONFLOORZ);
|
||||
glass = Spawn<AGlassJunk> (x, y, ONFLOORZ, ALLOW_REPLACE);
|
||||
|
||||
glass->z += 24 * FRACUNIT;
|
||||
glass->SetState (&AGlassJunk::States[3 + pr_glass() % 3]);
|
||||
|
|
|
@ -3053,7 +3053,7 @@ void P_RailAttack (AActor *source, int damage, int offset, int color1, int color
|
|||
}
|
||||
if (trace.CrossedWater)
|
||||
{
|
||||
AActor *puff = Spawn<ABulletPuff> (0, 0, 0);
|
||||
AActor *puff = Spawn<ABulletPuff> (0, 0, 0, ALLOW_REPLACE);
|
||||
if (puff != NULL)
|
||||
{
|
||||
SpawnDeepSplash (source, trace, puff, vx, vy, vz);
|
||||
|
@ -3858,7 +3858,7 @@ void P_DoCrunch (AActor *thing)
|
|||
}
|
||||
if (!(thing->flags & MF_NOBLOOD))
|
||||
{
|
||||
AActor *gib = Spawn<ARealGibs> (thing->x, thing->y, thing->z);
|
||||
AActor *gib = Spawn<ARealGibs> (thing->x, thing->y, thing->z, ALLOW_REPLACE);
|
||||
gib->RenderStyle = thing->RenderStyle;
|
||||
gib->alpha = thing->alpha;
|
||||
gib->height = 0;
|
||||
|
@ -3921,7 +3921,7 @@ void P_DoCrunch (AActor *thing)
|
|||
AActor *mo;
|
||||
|
||||
mo = Spawn<ABlood> (thing->x, thing->y,
|
||||
thing->z + thing->height/2);
|
||||
thing->z + thing->height/2, ALLOW_REPLACE);
|
||||
|
||||
mo->momx = pr_crunch.Random2 () << 12;
|
||||
mo->momy = pr_crunch.Random2 () << 12;
|
||||
|
|
|
@ -813,7 +813,7 @@ AInventory *AActor::GiveInventoryType (const PClass *type)
|
|||
{
|
||||
AInventory *item;
|
||||
|
||||
item = static_cast<AInventory *>(Spawn (type, 0,0,0));
|
||||
item = static_cast<AInventory *>(Spawn (type, 0,0,0, NO_REPLACE));
|
||||
if (!item->TryPickup (this))
|
||||
{
|
||||
item->Destroy ();
|
||||
|
@ -832,7 +832,7 @@ AInventory *AActor::GiveInventoryType (const PClass *type)
|
|||
|
||||
bool AActor::GiveAmmo (const PClass *type, int amount)
|
||||
{
|
||||
AInventory *item = static_cast<AInventory *>(Spawn (type, 0, 0, 0));
|
||||
AInventory *item = static_cast<AInventory *>(Spawn (type, 0, 0, 0, NO_REPLACE));
|
||||
item->Amount = amount;
|
||||
item->flags |= MF_DROPPED;
|
||||
if (!item->TryPickup (this))
|
||||
|
@ -2147,7 +2147,7 @@ void P_NightmareRespawn (AActor *mobj)
|
|||
// spawn it
|
||||
x = mobj->SpawnPoint[0] << FRACBITS;
|
||||
y = mobj->SpawnPoint[1] << FRACBITS;
|
||||
mo = Spawn (RUNTIME_TYPE(mobj), x, y, z);
|
||||
mo = Spawn (RUNTIME_TYPE(mobj), x, y, z, NO_REPLACE);
|
||||
|
||||
if (z == ONFLOORZ)
|
||||
mo->z += mo->SpawnPoint[2] << FRACBITS;
|
||||
|
@ -2179,14 +2179,14 @@ void P_NightmareRespawn (AActor *mobj)
|
|||
mo->Translation = mobj->Translation;
|
||||
|
||||
// spawn a teleport fog at old spot because of removal of the body?
|
||||
mo = Spawn ("TeleportFog", mobj->x, mobj->y, mobj->z);
|
||||
mo = Spawn ("TeleportFog", mobj->x, mobj->y, mobj->z, ALLOW_REPLACE);
|
||||
if (mo != NULL)
|
||||
{
|
||||
mo->z += TELEFOGHEIGHT;
|
||||
}
|
||||
|
||||
// spawn a teleport fog at the new spot
|
||||
mo = Spawn ("TeleportFog", x, y, z);
|
||||
mo = Spawn ("TeleportFog", x, y, z, ALLOW_REPLACE);
|
||||
if (mo != NULL)
|
||||
{
|
||||
mo->z += TELEFOGHEIGHT;
|
||||
|
@ -3014,7 +3014,7 @@ END_DEFAULTS
|
|||
//
|
||||
//==========================================================================
|
||||
|
||||
AActor *AActor::StaticSpawn (const PClass *type, fixed_t ix, fixed_t iy, fixed_t iz)
|
||||
AActor *AActor::StaticSpawn (const PClass *type, fixed_t ix, fixed_t iy, fixed_t iz, replace_t allowreplacement)
|
||||
{
|
||||
if (type == NULL)
|
||||
{
|
||||
|
@ -3026,6 +3026,10 @@ AActor *AActor::StaticSpawn (const PClass *type, fixed_t ix, fixed_t iy, fixed_t
|
|||
I_Error ("%s is not an actor\n", type->TypeName.GetChars());
|
||||
}
|
||||
|
||||
if (allowreplacement)
|
||||
type = type->ActorInfo->GetReplacement()->Class;
|
||||
|
||||
|
||||
AActor *actor;
|
||||
|
||||
actor = static_cast<AActor *>(const_cast<PClass *>(type)->CreateNew ());
|
||||
|
@ -3359,7 +3363,7 @@ void P_SpawnPlayer (mapthing2_t *mthing, bool startenterscripts)
|
|||
}
|
||||
|
||||
mobj = static_cast<APlayerPawn *>
|
||||
(Spawn (p->cls, mthing->x << FRACBITS, mthing->y << FRACBITS, ONFLOORZ));
|
||||
(Spawn (p->cls, mthing->x << FRACBITS, mthing->y << FRACBITS, ONFLOORZ, NO_REPLACE));
|
||||
|
||||
mobj->FriendPlayer = playernum + 1; // [RH] players are their own friends
|
||||
oldactor = p->mo;
|
||||
|
@ -3457,7 +3461,7 @@ void P_SpawnPlayer (mapthing2_t *mthing, bool startenterscripts)
|
|||
if (multiplayer)
|
||||
{
|
||||
unsigned an = ( ANG45 * (mthing->angle/45) ) >> ANGLETOFINESHIFT;
|
||||
Spawn ("TeleportFog", mobj->x+20*finecosine[an], mobj->y+20*finesine[an], mobj->z + TELEFOGHEIGHT);
|
||||
Spawn ("TeleportFog", mobj->x+20*finecosine[an], mobj->y+20*finesine[an], mobj->z + TELEFOGHEIGHT, ALLOW_REPLACE);
|
||||
}
|
||||
|
||||
// "Fix" for one of the starts on exec.wad MAP01: If you start inside the ceiling,
|
||||
|
@ -3710,7 +3714,8 @@ void P_SpawnMapThing (mapthing2_t *mthing, int position)
|
|||
// it to the unknown thing.
|
||||
else
|
||||
{
|
||||
// Handle decorate replacements.
|
||||
// Handle decorate replacements explicitly here
|
||||
// to check for missing frames in the replacement object.
|
||||
i = i->ActorInfo->GetReplacement()->Class;
|
||||
|
||||
const AActor *defaults = GetDefaultByType (i);
|
||||
|
@ -3785,7 +3790,7 @@ void P_SpawnMapThing (mapthing2_t *mthing, int position)
|
|||
z = ONFLOORZ;
|
||||
|
||||
SpawningMapThing = true;
|
||||
mobj = Spawn (i, x, y, z);
|
||||
mobj = Spawn (i, x, y, z, NO_REPLACE);
|
||||
SpawningMapThing = false;
|
||||
|
||||
if (z == ONFLOORZ)
|
||||
|
@ -3833,7 +3838,7 @@ AActor *P_SpawnPuff (const PClass *pufftype, fixed_t x, fixed_t y, fixed_t z, an
|
|||
|
||||
z += pr_spawnpuff.Random2 () << 10;
|
||||
|
||||
puff = Spawn (pufftype, x, y, z);
|
||||
puff = Spawn (pufftype, x, y, z, ALLOW_REPLACE);
|
||||
|
||||
// If a puff has a crash state and an actor was not hit,
|
||||
// it will enter the crash state. This is used by the StrifeSpark
|
||||
|
@ -3905,7 +3910,7 @@ void P_SpawnBlood (fixed_t x, fixed_t y, fixed_t z, angle_t dir, int damage, AAc
|
|||
if (cl_bloodtype <= 1)
|
||||
{
|
||||
z += pr_spawnblood.Random2 () << 10;
|
||||
th = Spawn<ABlood> (x, y, z);
|
||||
th = Spawn<ABlood> (x, y, z, ALLOW_REPLACE);
|
||||
th->momz = FRACUNIT*2;
|
||||
th->angle = dir;
|
||||
if (gameinfo.gametype == GAME_Doom)
|
||||
|
@ -3967,14 +3972,7 @@ void P_BloodSplatter (fixed_t x, fixed_t y, fixed_t z, AActor *originator)
|
|||
{
|
||||
AActor *mo;
|
||||
|
||||
if (gameinfo.gametype == GAME_Doom)
|
||||
{
|
||||
mo = Spawn<ABlood> (x, y, z);
|
||||
}
|
||||
else
|
||||
{
|
||||
mo = Spawn<ABloodSplatter> (x, y, z);
|
||||
}
|
||||
mo = Spawn<ABloodSplatter> (x, y, z, ALLOW_REPLACE);
|
||||
mo->target = originator;
|
||||
mo->momx = pr_splatter.Random2 () << 10;
|
||||
mo->momy = pr_splatter.Random2 () << 10;
|
||||
|
@ -4006,7 +4004,7 @@ void P_RipperBlood (AActor *mo, AActor *bleeder)
|
|||
if (cl_bloodtype <= 1)
|
||||
{
|
||||
AActor *th;
|
||||
th = Spawn<ABlood> (x, y, z);
|
||||
th = Spawn<ABlood> (x, y, z, ALLOW_REPLACE);
|
||||
if (gameinfo.gametype == GAME_Heretic)
|
||||
th->flags |= MF_NOGRAVITY;
|
||||
th->momx = mo->momx >> 1;
|
||||
|
@ -4093,14 +4091,14 @@ bool P_HitWater (AActor *thing, sector_t *sec)
|
|||
|
||||
if (smallsplash && splash->SmallSplash)
|
||||
{
|
||||
mo = Spawn (splash->SmallSplash, thing->x, thing->y, z);
|
||||
mo = Spawn (splash->SmallSplash, thing->x, thing->y, z, ALLOW_REPLACE);
|
||||
if (mo) mo->floorclip += splash->SmallSplashClip;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (splash->SplashChunk)
|
||||
{
|
||||
mo = Spawn (splash->SplashChunk, thing->x, thing->y, z);
|
||||
mo = Spawn (splash->SplashChunk, thing->x, thing->y, z, ALLOW_REPLACE);
|
||||
mo->target = thing;
|
||||
if (splash->ChunkXVelShift != 255)
|
||||
{
|
||||
|
@ -4114,7 +4112,7 @@ bool P_HitWater (AActor *thing, sector_t *sec)
|
|||
}
|
||||
if (splash->SplashBase)
|
||||
{
|
||||
mo = Spawn (splash->SplashBase, thing->x, thing->y, z);
|
||||
mo = Spawn (splash->SplashBase, thing->x, thing->y, z, ALLOW_REPLACE);
|
||||
}
|
||||
if (thing->player && !splash->NoAlert)
|
||||
{
|
||||
|
@ -4264,7 +4262,7 @@ AActor *P_SpawnMissileXYZ (fixed_t x, fixed_t y, fixed_t z,
|
|||
z -= source->floorclip;
|
||||
}
|
||||
|
||||
AActor *th = Spawn (type, x, y, z);
|
||||
AActor *th = Spawn (type, x, y, z, ALLOW_REPLACE);
|
||||
|
||||
if (th->SeeSound)
|
||||
S_SoundID (th, CHAN_VOICE, th->SeeSound, 1, ATTN_NORM);
|
||||
|
@ -4392,7 +4390,7 @@ AActor *P_SpawnMissileAngleZSpeed (AActor *source, fixed_t z,
|
|||
{
|
||||
z -= source->floorclip;
|
||||
}
|
||||
mo = Spawn (type, source->x, source->y, z);
|
||||
mo = Spawn (type, source->x, source->y, z, ALLOW_REPLACE);
|
||||
if (mo->SeeSound)
|
||||
{
|
||||
S_SoundID (mo, CHAN_VOICE, mo->SeeSound, 1, ATTN_NORM);
|
||||
|
@ -4467,7 +4465,7 @@ AActor *P_SpawnPlayerMissile (AActor *source, fixed_t x, fixed_t y, fixed_t z,
|
|||
{
|
||||
z += 4*8*FRACUNIT - source->floorclip + (source->player? source->player->crouchoffset : 0);
|
||||
}
|
||||
MissileActor = Spawn (type, x, y, z);
|
||||
MissileActor = Spawn (type, x, y, z, ALLOW_REPLACE);
|
||||
|
||||
if (MissileActor->SeeSound)
|
||||
{
|
||||
|
|
|
@ -227,14 +227,14 @@ bool P_Teleport (AActor *thing, fixed_t x, fixed_t y, fixed_t z, angle_t angle,
|
|||
if (sourceFog)
|
||||
{
|
||||
fixed_t fogDelta = thing->flags & MF_MISSILE ? 0 : TELEFOGHEIGHT;
|
||||
Spawn<ATeleportFog> (oldx, oldy, oldz + fogDelta);
|
||||
Spawn<ATeleportFog> (oldx, oldy, oldz + fogDelta, ALLOW_REPLACE);
|
||||
}
|
||||
if (useFog)
|
||||
{
|
||||
fixed_t fogDelta = thing->flags & MF_MISSILE ? 0 : TELEFOGHEIGHT;
|
||||
an = angle >> ANGLETOFINESHIFT;
|
||||
Spawn<ATeleportFog> (x + 20*finecosine[an],
|
||||
y + 20*finesine[an], thing->z + fogDelta);
|
||||
y + 20*finesine[an], thing->z + fogDelta, ALLOW_REPLACE);
|
||||
if (thing->player)
|
||||
{
|
||||
// [RH] Zoom player's field of vision
|
||||
|
|
|
@ -64,7 +64,6 @@ bool P_Thing_Spawn (int tid, int type, angle_t angle, bool fog, int newtid)
|
|||
if ( (kind = SpawnableThings[type]) == NULL)
|
||||
return false;
|
||||
|
||||
|
||||
// Handle decorate replacements.
|
||||
kind = kind->ActorInfo->GetReplacement()->Class;
|
||||
|
||||
|
@ -73,7 +72,7 @@ bool P_Thing_Spawn (int tid, int type, angle_t angle, bool fog, int newtid)
|
|||
|
||||
while ( (spot = iterator.Next ()) )
|
||||
{
|
||||
mobj = Spawn (kind, spot->x, spot->y, spot->z);
|
||||
mobj = Spawn (kind, spot->x, spot->y, spot->z, ALLOW_REPLACE);
|
||||
|
||||
if (mobj != NULL)
|
||||
{
|
||||
|
@ -85,7 +84,7 @@ bool P_Thing_Spawn (int tid, int type, angle_t angle, bool fog, int newtid)
|
|||
mobj->angle = (angle != ANGLE_MAX ? angle : spot->angle);
|
||||
if (fog)
|
||||
{
|
||||
Spawn<ATeleportFog> (spot->x, spot->y, spot->z + TELEFOGHEIGHT);
|
||||
Spawn<ATeleportFog> (spot->x, spot->y, spot->z + TELEFOGHEIGHT, ALLOW_REPLACE);
|
||||
}
|
||||
if (mobj->flags & MF_SPECIAL)
|
||||
mobj->flags |= MF_DROPPED; // Don't respawn
|
||||
|
@ -131,8 +130,8 @@ bool P_MoveThing(AActor * source, fixed_t x, fixed_t y, fixed_t z, bool fog)
|
|||
{
|
||||
if (fog)
|
||||
{
|
||||
Spawn<ATeleportFog> (x, y, z + TELEFOGHEIGHT);
|
||||
Spawn<ATeleportFog> (oldx, oldy, oldz + TELEFOGHEIGHT);
|
||||
Spawn<ATeleportFog> (x, y, z + TELEFOGHEIGHT, ALLOW_REPLACE);
|
||||
Spawn<ATeleportFog> (oldx, oldy, oldz + TELEFOGHEIGHT, ALLOW_REPLACE);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
@ -213,7 +212,7 @@ bool P_Thing_Projectile (int tid, int type, const char * type_name, angle_t angl
|
|||
{
|
||||
z -= spot->floorclip;
|
||||
}
|
||||
mobj = Spawn (kind, spot->x, spot->y, z);
|
||||
mobj = Spawn (kind, spot->x, spot->y, z, ALLOW_REPLACE);
|
||||
|
||||
if (mobj)
|
||||
{
|
||||
|
|
|
@ -666,7 +666,7 @@ void APlayerPawn::GiveDeathmatchInventory()
|
|||
AKey *key = (AKey *)GetDefaultByType (PClass::m_Types[i]);
|
||||
if (key->KeyNumber != 0)
|
||||
{
|
||||
key = static_cast<AKey *>(Spawn (PClass::m_Types[i], 0,0,0));
|
||||
key = static_cast<AKey *>(Spawn (PClass::m_Types[i], 0,0,0, NO_REPLACE));
|
||||
if (!key->TryPickup (this))
|
||||
{
|
||||
key->Destroy ();
|
||||
|
@ -876,7 +876,7 @@ void APlayerPawn::GiveDefaultInventory ()
|
|||
}
|
||||
else
|
||||
{
|
||||
AInventory *item = static_cast<AInventory *>(Spawn (ti, 0,0,0));
|
||||
AInventory *item = static_cast<AInventory *>(Spawn (ti, 0,0,0, NO_REPLACE));
|
||||
item->Amount = di->amount;
|
||||
if (item->IsKindOf (RUNTIME_CLASS (AWeapon)))
|
||||
{
|
||||
|
|
|
@ -566,7 +566,8 @@ void R_InitSkins (void)
|
|||
int lump = Wads.CheckNumForName (sc_String, skins[i].namespc);
|
||||
if (lump == -1)
|
||||
{
|
||||
lump = Wads.CheckNumForName (sc_String, ns_sounds);
|
||||
lump = Wads.CheckNumForFullName (sc_String);
|
||||
if (lump == -1) lump = Wads.CheckNumForName (sc_String, ns_sounds);
|
||||
}
|
||||
if (lump != -1)
|
||||
{
|
||||
|
@ -599,7 +600,8 @@ void R_InitSkins (void)
|
|||
sndlumps[j] = Wads.CheckNumForName (sc_String, skins[i].namespc);
|
||||
if (sndlumps[j] == -1)
|
||||
{ // Replacement not found, try finding it in the global namespace
|
||||
sndlumps[j] = Wads.CheckNumForName (sc_String, ns_sounds);
|
||||
sndlumps[j] = Wads.CheckNumForFullName (sc_String);
|
||||
if (sndlumps[j] == -1) sndlumps[j] = Wads.CheckNumForName (sc_String, ns_sounds);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -439,8 +439,9 @@ int S_FindSoundTentative (const char *name)
|
|||
|
||||
int S_AddSound (const char *logicalname, const char *lumpname)
|
||||
{
|
||||
return S_AddSound (logicalname,
|
||||
lumpname ? Wads.CheckNumForName (lumpname, ns_sounds) : -1);
|
||||
int lump = Wads.CheckNumForFullName (lumpname);
|
||||
if (lump == -1) lump = Wads.CheckNumForName (lumpname, ns_sounds);
|
||||
return S_AddSound (logicalname, lump);
|
||||
}
|
||||
|
||||
static int S_AddSound (const char *logicalname, int lumpnum)
|
||||
|
@ -493,8 +494,15 @@ static int S_AddSound (const char *logicalname, int lumpnum)
|
|||
int S_AddPlayerSound (const char *pclass, int gender, int refid,
|
||||
const char *lumpname)
|
||||
{
|
||||
return S_AddPlayerSound (pclass, gender, refid,
|
||||
lumpname ? Wads.CheckNumForName (lumpname, ns_sounds) : -1);
|
||||
int lump;
|
||||
|
||||
if (lumpname)
|
||||
{
|
||||
lump = Wads.CheckNumForFullName (lumpname);
|
||||
if (lump == -1) lump = Wads.CheckNumForName (lumpname, ns_sounds);
|
||||
}
|
||||
|
||||
return S_AddPlayerSound (pclass, gender, refid, lump);
|
||||
}
|
||||
|
||||
int S_AddPlayerSound (const char *pclass, int gender, int refid, int lumpnum, bool fromskin)
|
||||
|
|
|
@ -3641,7 +3641,7 @@ static void PlayerStartItem (APlayerPawn *defaults, Baggage &bag)
|
|||
FDropItem * di=new FDropItem;
|
||||
|
||||
SC_MustGetString();
|
||||
di->Name=strdup(sc_String);
|
||||
di->Name = sc_String;
|
||||
di->probability=255;
|
||||
di->amount=0;
|
||||
if (SC_CheckNumber())
|
||||
|
|
|
@ -1025,7 +1025,7 @@ static void DoGiveInventory(AActor * self, AActor * receiver)
|
|||
const PClass * mi=PClass::FindClass(item);
|
||||
if (mi)
|
||||
{
|
||||
AInventory *item = static_cast<AInventory *>(Spawn (mi, 0, 0, 0));
|
||||
AInventory *item = static_cast<AInventory *>(Spawn (mi, 0, 0, 0, NO_REPLACE));
|
||||
if (item->IsKindOf(RUNTIME_CLASS(AHealth)))
|
||||
{
|
||||
item->Amount *= amount;
|
||||
|
@ -1143,13 +1143,10 @@ void A_SpawnItem(AActor * self)
|
|||
if (useammo && !weapon->DepleteAmmo(weapon->bAltFire)) return;
|
||||
}
|
||||
|
||||
// Handle decorate replacements.
|
||||
missile = missile->ActorInfo->GetReplacement()->Class;
|
||||
|
||||
AActor * mo = Spawn( missile,
|
||||
self->x + FixedMul(distance, finecosine[self->angle>>ANGLETOFINESHIFT]),
|
||||
self->y + FixedMul(distance, finesine[self->angle>>ANGLETOFINESHIFT]),
|
||||
self->z - self->floorclip + zheight);
|
||||
self->z - self->floorclip + zheight, ALLOW_REPLACE);
|
||||
|
||||
if (mo)
|
||||
{
|
||||
|
@ -1236,7 +1233,8 @@ void A_ThrowGrenade(AActor * self)
|
|||
AActor * bo;
|
||||
|
||||
bo = Spawn(missile, self->x, self->y,
|
||||
self->z - self->floorclip + zheight + 35*FRACUNIT + (self->player? self->player->crouchoffset : 0));
|
||||
self->z - self->floorclip + zheight + 35*FRACUNIT + (self->player? self->player->crouchoffset : 0),
|
||||
ALLOW_REPLACE);
|
||||
if (bo)
|
||||
{
|
||||
int pitch = self->pitch;
|
||||
|
@ -1407,7 +1405,7 @@ void A_SpawnDebris(AActor * self)
|
|||
{
|
||||
mo = Spawn(debris, self->x+((pr_spawndebris()-128)<<12),
|
||||
self->y+((pr_spawndebris()-128)<<12),
|
||||
self->z+(pr_spawndebris()*self->height/256));
|
||||
self->z+(pr_spawndebris()*self->height/256), ALLOW_REPLACE);
|
||||
if (mo && i < mo->GetClass()->ActorInfo->NumOwnedStates)
|
||||
{
|
||||
mo->SetState (mo->GetClass()->ActorInfo->OwnedStates + i);
|
||||
|
@ -1636,7 +1634,7 @@ void A_Burst (AActor *actor)
|
|||
mo = Spawn(chunk,
|
||||
actor->x + (((pr_burst()-128)*actor->radius)>>7),
|
||||
actor->y + (((pr_burst()-128)*actor->radius)>>7),
|
||||
actor->z + (pr_burst()*actor->height/255));
|
||||
actor->z + (pr_burst()*actor->height/255), ALLOW_REPLACE);
|
||||
|
||||
if (mo)
|
||||
{
|
||||
|
|
|
@ -785,7 +785,7 @@ static ExpData *ParseExpressionA ()
|
|||
{
|
||||
if (!stricmp (sc_String, ExpVars[i].name))
|
||||
{
|
||||
varid = i;
|
||||
varid = (int)i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue