mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Update respawn waypoint on fastfall bounce
This commit is contained in:
parent
63bda6076f
commit
5235408b0e
2 changed files with 9 additions and 1 deletions
|
|
@ -67,7 +67,7 @@ typedef enum
|
|||
{
|
||||
PF_GODMODE = 1<<0, // Immortal. No lightsnake from pits either
|
||||
|
||||
// free: 1<<1
|
||||
PF_UPDATEMYRESPAWN = 1<<1, // Scripted sequences / fastfall can set this to force a respawn waypoint update
|
||||
|
||||
PF_AUTOROULETTE = 1<<2, // Accessibility: Non-deterministic item box, no manual stop.
|
||||
|
||||
|
|
|
|||
|
|
@ -8953,6 +8953,12 @@ static waypoint_t *K_GetPlayerNextWaypoint(player_t *player)
|
|||
updaterespawn = false;
|
||||
}
|
||||
|
||||
if (player->pflags & PF_UPDATEMYRESPAWN)
|
||||
{
|
||||
updaterespawn = true;
|
||||
player->pflags &= ~PF_UPDATEMYRESPAWN;
|
||||
}
|
||||
|
||||
// Respawn point should only be updated when we're going to a nextwaypoint
|
||||
if ((updaterespawn) &&
|
||||
(player->respawn.state == RESPAWNST_NONE) &&
|
||||
|
|
@ -10688,6 +10694,8 @@ boolean K_FastFallBounce(player_t *player)
|
|||
if (player->mo->eflags & MFE_UNDERWATER)
|
||||
bounce = (117 * bounce) / 200;
|
||||
|
||||
player->pflags |= PF_UPDATEMYRESPAWN;
|
||||
|
||||
player->mo->momz = bounce * P_MobjFlip(player->mo);
|
||||
|
||||
player->fastfall = 0;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue