- g_shared refactored
This commit is contained in:
parent
9f78bcd1e6
commit
27aeb6a656
15 changed files with 111 additions and 122 deletions
|
|
@ -91,7 +91,7 @@ class ARandomSpawner : public AActor
|
|||
// So now we can spawn the dropped item.
|
||||
if (di == NULL || bouncecount >= MAX_RANDOMSPAWNERS_RECURSION) // Prevents infinite recursions
|
||||
{
|
||||
Spawn("Unknown", x, y, z, NO_REPLACE); // Show that there's a problem.
|
||||
Spawn("Unknown", Pos(), NO_REPLACE); // Show that there's a problem.
|
||||
Destroy();
|
||||
return;
|
||||
}
|
||||
|
|
@ -144,9 +144,9 @@ class ARandomSpawner : public AActor
|
|||
if (this->flags & MF_MISSILE && target && target->target) // Attempting to spawn a missile.
|
||||
{
|
||||
if ((tracer == NULL) && (flags2 & MF2_SEEKERMISSILE)) tracer = target->target;
|
||||
newmobj = P_SpawnMissileXYZ(x, y, z, target, target->target, cls, false);
|
||||
newmobj = P_SpawnMissileXYZ(Pos(), target, target->target, cls, false);
|
||||
}
|
||||
else newmobj = Spawn(cls, x, y, z, NO_REPLACE);
|
||||
else newmobj = Spawn(cls, Pos(), NO_REPLACE);
|
||||
if (newmobj != NULL)
|
||||
{
|
||||
// copy everything relevant
|
||||
|
|
@ -179,7 +179,7 @@ class ARandomSpawner : public AActor
|
|||
// Handle special altitude flags
|
||||
if (newmobj->flags & MF_SPAWNCEILING)
|
||||
{
|
||||
newmobj->z = newmobj->ceilingz - newmobj->height - SpawnPoint[2];
|
||||
newmobj->SetZ(newmobj->ceilingz - newmobj->height - SpawnPoint[2]);
|
||||
}
|
||||
else if (newmobj->flags2 & MF2_SPAWNFLOAT)
|
||||
{
|
||||
|
|
@ -187,9 +187,9 @@ class ARandomSpawner : public AActor
|
|||
if (space > 48*FRACUNIT)
|
||||
{
|
||||
space -= 40*FRACUNIT;
|
||||
newmobj->z = MulScale8 (space, pr_randomspawn()) + newmobj->floorz + 40*FRACUNIT;
|
||||
newmobj->SetZ(MulScale8 (space, pr_randomspawn()) + newmobj->floorz + 40*FRACUNIT);
|
||||
}
|
||||
newmobj->z += SpawnPoint[2];
|
||||
newmobj->AddZ(SpawnPoint[2]);
|
||||
}
|
||||
if (newmobj->flags & MF_MISSILE)
|
||||
P_CheckMissileSpawn(newmobj, 0);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue