- Fixed: A_Respawn and P_NightmareRespawn() should not check for collision with world geometry.
The initial spawn did not, so this can prevent respawns of things that were initially spawned if they happen to intersect a wall. - Fixed: Don't respawn actors inside the floor. - Fixed: The final calls to P_FindFloorCeiling() in P_NightmareRespawn() and A_RestoreSpecialPosition also need to pass true as the second parameter. (Because this parameter is onlyspawnpos, not onlymidtex.) SVN r3518 (trunk)
This commit is contained in:
parent
14730a89be
commit
5358fd594b
5 changed files with 39 additions and 12 deletions
|
|
@ -2467,12 +2467,23 @@ void P_NightmareRespawn (AActor *mobj)
|
|||
mo = AActor::StaticSpawn(RUNTIME_TYPE(mobj), x, y, z, NO_REPLACE, true);
|
||||
|
||||
if (z == ONFLOORZ)
|
||||
{
|
||||
mo->z += mobj->SpawnPoint[2];
|
||||
if (mo->z < mo->floorz)
|
||||
{ // Do not respawn monsters in the floor, even if that's where they
|
||||
// started. The initial P_ZMovement() call would have put them on
|
||||
// the floor right away, but we need them on the floor now so we
|
||||
// can use P_CheckPosition() properly.
|
||||
mo->z = mo->floorz;
|
||||
}
|
||||
}
|
||||
else if (z == ONCEILINGZ)
|
||||
{
|
||||
mo->z -= mobj->SpawnPoint[2];
|
||||
}
|
||||
|
||||
// something is occupying its position?
|
||||
if (!P_TestMobjLocation (mo))
|
||||
if (!P_CheckPosition(mo, mo->x, mo->y, true))
|
||||
{
|
||||
//[GrafZahl] MF_COUNTKILL still needs to be checked here.
|
||||
mo->ClearCounters();
|
||||
|
|
@ -2481,7 +2492,7 @@ void P_NightmareRespawn (AActor *mobj)
|
|||
}
|
||||
|
||||
// If there are 3D floors, we need to find floor/ceiling again.
|
||||
P_FindFloorCeiling(mo);
|
||||
P_FindFloorCeiling(mo, true);
|
||||
|
||||
z = mo->z;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue