mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-03-22 02:42:20 +00:00
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.)
This commit is contained in:
parent
79b95a53ed
commit
cc87ba39c2
1 changed files with 8 additions and 3 deletions
11
src/b_bot.c
11
src/b_bot.c
|
@ -221,7 +221,12 @@ boolean B_CheckRespawn(player_t *player)
|
|||
return false;
|
||||
|
||||
// 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;
|
||||
|
||||
// If you're dead, wait a few seconds to respawn.
|
||||
|
@ -255,11 +260,11 @@ void B_RespawnBot(INT32 playernum)
|
|||
y = sonic->y;
|
||||
if (sonic->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)
|
||||
z = sonic->floorz;
|
||||
} 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)
|
||||
z = sonic->ceilingz - sonic->height;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue