Fix getting race-endingly stuck in zoom tubes while respawning

This commit is contained in:
toaster 2023-01-06 13:50:47 +00:00
parent 6d1dd5f089
commit f4071ce42f
2 changed files with 4 additions and 1 deletions

View file

@ -4401,6 +4401,9 @@ static void P_ProcessZoomTube(player_t *player, mtag_t sectag, boolean end)
if (player->mo->tracer && player->mo->tracer->type == MT_TUBEWAYPOINT && player->carry == CR_ZOOMTUBE)
return;
if (player->respawn.state != RESPAWNST_NONE)
return;
// Find line #3 tagged to this sector
lineindex = Tag_FindLineSpecial(3, sectag);

View file

@ -4166,7 +4166,7 @@ void P_PlayerThink(player_t *player)
// for a bit after a teleport.
player->mo->reactiontime--;
}
else if (player->mo->tracer && player->mo->tracer->type == MT_TUBEWAYPOINT)
else if (player->carry == CR_ZOOMTUBE && player->mo->tracer && player->mo->tracer->type == MT_TUBEWAYPOINT)
{
P_DoZoomTube(player);
player->rmomx = player->rmomy = 0;