mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-28 23:11:58 +00:00
- Fixed: A_Respawn also needs to use P_SpawnMapThing-like sector finding. Since it is exactly the
same situation A_RestoreSpecialPosition, it now just calls that to do the moving. This also means it is no longer limited to respawning things on the floor. SVN r3514 (trunk)
This commit is contained in:
parent
498a432c8d
commit
64f0e0e984
2 changed files with 10 additions and 10 deletions
|
@ -49,4 +49,3 @@ DEFINE_ACTION_FUNCTION(AActor, A_BarrelDestroy)
|
|||
self->Destroy ();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -2625,6 +2625,8 @@ static void CheckStopped(AActor *self)
|
|||
//
|
||||
//===========================================================================
|
||||
|
||||
extern void AF_A_RestoreSpecialPosition(DECLARE_PARAMINFO);
|
||||
|
||||
enum RS_Flags
|
||||
{
|
||||
RSF_FOG=1,
|
||||
|
@ -2637,24 +2639,20 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_Respawn)
|
|||
ACTION_PARAM_START(1);
|
||||
ACTION_PARAM_INT(flags, 0);
|
||||
|
||||
fixed_t x = self->SpawnPoint[0];
|
||||
fixed_t y = self->SpawnPoint[1];
|
||||
bool oktorespawn = false;
|
||||
sector_t *sec;
|
||||
|
||||
self->flags |= MF_SOLID;
|
||||
sec = P_PointInSector (x, y);
|
||||
self->height = self->GetDefault()->height;
|
||||
CALL_ACTION(A_RestoreSpecialPosition, self);
|
||||
|
||||
if (flags & RSF_TELEFRAG)
|
||||
{
|
||||
// [KS] DIE DIE DIE DIE erm *ahem* =)
|
||||
if (P_TeleportMove (self, x, y, sec->floorplane.ZatPoint (x, y), true)) oktorespawn = true;
|
||||
oktorespawn = P_TeleportMove(self, self->x, self->y, self->z, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
self->SetOrigin (x, y, sec->floorplane.ZatPoint (x, y));
|
||||
if (P_TestMobjLocation (self)) oktorespawn = true;
|
||||
oktorespawn = P_TestMobjLocation(self);
|
||||
}
|
||||
|
||||
if (oktorespawn)
|
||||
|
@ -2687,9 +2685,12 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_Respawn)
|
|||
|
||||
if (flags & RSF_FOG)
|
||||
{
|
||||
Spawn<ATeleportFog> (x, y, self->z + TELEFOGHEIGHT, ALLOW_REPLACE);
|
||||
Spawn<ATeleportFog> (self->x, self->y, self->z + TELEFOGHEIGHT, ALLOW_REPLACE);
|
||||
}
|
||||
if (self->CountsAsKill())
|
||||
{
|
||||
level.total_monsters++;
|
||||
}
|
||||
if (self->CountsAsKill()) level.total_monsters++;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue