Skip to content
Snippets Groups Projects
Commit cc87ba39 authored by toaster's avatar toaster
Browse files

There's code in B_RespawnBot that handles gravflip, but none in...

There's code in B_RespawnBot that handles gravflip, but none in B_CheckRespawn. This commit fixes that. (Only done on this branch since bots had already been touched.)
parent 79b95a53
Branches
Tags
No related merge requests found
...@@ -221,7 +221,12 @@ boolean B_CheckRespawn(player_t *player) ...@@ -221,7 +221,12 @@ boolean B_CheckRespawn(player_t *player)
return false; return false;
// Low ceiling, do not want! // Low ceiling, do not want!
if (sonic->ceilingz - sonic->z < (sonic->player->exiting ? 6 : 3)*sonic->height) // increased for new camera height if (sonic->eflags & MFE_VERTICALFLIP)
{
if (sonic->z - sonic->floorz < (sonic->player->exiting ? 5 : 2)*sonic->height)
return false;
}
else if (sonic->ceilingz - sonic->z < (sonic->player->exiting ? 6 : 3)*sonic->height)
return false; return false;
// If you're dead, wait a few seconds to respawn. // If you're dead, wait a few seconds to respawn.
...@@ -255,11 +260,11 @@ void B_RespawnBot(INT32 playernum) ...@@ -255,11 +260,11 @@ void B_RespawnBot(INT32 playernum)
y = sonic->y; y = sonic->y;
if (sonic->eflags & MFE_VERTICALFLIP) { if (sonic->eflags & MFE_VERTICALFLIP) {
tails->eflags |= MFE_VERTICALFLIP; tails->eflags |= MFE_VERTICALFLIP;
z = sonic->z - FixedMul(512*FRACUNIT,sonic->scale); z = sonic->z - (512*sonic->scale);
if (z < sonic->floorz) if (z < sonic->floorz)
z = sonic->floorz; z = sonic->floorz;
} else { } else {
z = sonic->z + sonic->height + FixedMul(512*FRACUNIT,sonic->scale); z = sonic->z + sonic->height + (512*sonic->scale);
if (z > sonic->ceilingz - sonic->height) if (z > sonic->ceilingz - sonic->height)
z = sonic->ceilingz - sonic->height; z = sonic->ceilingz - sonic->height;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment