mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Merge branch 'fix-fault-hits' into 'master'
Fix fault exit conditions triggering before hitlag ended (resolves #947) Closes #947 See merge request KartKrew/Kart!1856
This commit is contained in:
commit
19ba6178e4
2 changed files with 6 additions and 4 deletions
|
|
@ -7941,7 +7941,7 @@ void K_KartPlayerHUDUpdate(player_t *player)
|
|||
if (player->positiondelay)
|
||||
player->positiondelay--;
|
||||
|
||||
if (!(player->pflags & PF_FAULT))
|
||||
if (!(player->pflags & PF_FAULT || player->pflags & PF_VOID))
|
||||
player->karthud[khud_fault] = 0;
|
||||
else if (player->karthud[khud_fault] > 0 && player->karthud[khud_fault] <= 2*TICRATE)
|
||||
player->karthud[khud_fault]++;
|
||||
|
|
@ -8726,7 +8726,7 @@ void K_KartPlayerThink(player_t *player, ticcmd_t *cmd)
|
|||
player->nextringaward = 99; // Next time we need to award superring, spawn the first one instantly.
|
||||
}
|
||||
|
||||
if (player->pflags & PF_VOID) // Returning from FAULT VOID
|
||||
if (player->pflags & PF_VOID && player->mo->hitlag == 0) // Returning from FAULT VOID
|
||||
{
|
||||
player->pflags &= ~PF_VOID;
|
||||
player->mo->renderflags &= ~RF_DONTDRAW;
|
||||
|
|
|
|||
|
|
@ -1920,10 +1920,12 @@ static void K_HandleLapIncrement(player_t *player)
|
|||
player->mo->renderflags |= RF_DONTDRAW;
|
||||
player->mo->flags |= MF_NOCLIPTHING;
|
||||
player->nocontrol = UINT16_MAX;
|
||||
player->hyudorotimer = UINT16_MAX;
|
||||
player->speed = 0;
|
||||
player->mo->momx = 0;
|
||||
player->mo->momy = 0;
|
||||
player->mo->momz = 0;
|
||||
K_StripItems(player);
|
||||
player->faultflash = TICRATE/3;
|
||||
player->karthud[khud_fault] = 1;
|
||||
ClearFakePlayerSkin(player);
|
||||
S_StartSound(player->mo, sfx_s3k8a);
|
||||
P_MoveOrigin(player->mo, player->mo->old_x, player->mo->old_y, player->mo->z);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue