mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-02-18 11:32:24 +00:00
Fix karma overtime not counting down after 10 seconds :)
This commit is contained in:
parent
059058476e
commit
5f9ec5caa6
2 changed files with 18 additions and 22 deletions
|
|
@ -2460,10 +2460,8 @@ static void K_drawKartBumpersOrKarma(void)
|
|||
else
|
||||
V_DrawMappedPatch(LAPS_X, LAPS_Y, V_HUDTRANS|V_SLIDEIN|splitflags, kp_bumpersticker, colormap);
|
||||
|
||||
if (stplyr->bumpers > 0)
|
||||
V_DrawKartString(LAPS_X+47, LAPS_Y+3, V_HUDTRANS|V_SLIDEIN|splitflags, va("%d/%d", stplyr->bumpers, maxbumper));
|
||||
else // TODO - BETTER HUD
|
||||
V_DrawKartString(LAPS_X+47, LAPS_Y+3, V_HUDTRANS|V_SLIDEIN|splitflags, va("%d", stplyr->overtimekarma / TICRATE));
|
||||
// TODO BETTER HUD
|
||||
V_DrawKartString(LAPS_X+47, LAPS_Y+3, V_HUDTRANS|V_SLIDEIN|splitflags, va("%d - %d", stplyr->bumpers, stplyr->overtimekarma / TICRATE));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
34
src/k_kart.c
34
src/k_kart.c
|
|
@ -6890,28 +6890,26 @@ void K_KartPlayerThink(player_t *player, ticcmd_t *cmd)
|
|||
|
||||
K_KartPlayerHUDUpdate(player);
|
||||
|
||||
if (battleovertime.enabled && !(player->pflags & PF_ELIMINATED))
|
||||
if (battleovertime.enabled && !(player->pflags & PF_ELIMINATED) && player->bumpers <= 0)
|
||||
{
|
||||
if (battleovertime.enabled >= 10*TICRATE)
|
||||
if (player->overtimekarma)
|
||||
player->overtimekarma--;
|
||||
else
|
||||
P_DamageMobj(player->mo, NULL, NULL, 1, DMG_TIMEOVER);
|
||||
}
|
||||
|
||||
if ((battleovertime.enabled >= 10*TICRATE) && !(player->pflags & PF_ELIMINATED))
|
||||
{
|
||||
fixed_t distanceToBarrier = 0;
|
||||
|
||||
if (battleovertime.radius > 0)
|
||||
{
|
||||
fixed_t distanceToBarrier = 0;
|
||||
|
||||
if (battleovertime.radius > 0)
|
||||
{
|
||||
distanceToBarrier = R_PointToDist2(player->mo->x, player->mo->y, battleovertime.x, battleovertime.y) - (player->mo->radius * 2);
|
||||
}
|
||||
|
||||
if (distanceToBarrier > battleovertime.radius)
|
||||
{
|
||||
P_DamageMobj(player->mo, NULL, NULL, 1, DMG_TIMEOVER);
|
||||
}
|
||||
distanceToBarrier = R_PointToDist2(player->mo->x, player->mo->y, battleovertime.x, battleovertime.y) - (player->mo->radius * 2);
|
||||
}
|
||||
else if (player->bumpers <= 0)
|
||||
|
||||
if (distanceToBarrier > battleovertime.radius)
|
||||
{
|
||||
if (player->overtimekarma)
|
||||
player->overtimekarma--;
|
||||
else
|
||||
P_DamageMobj(player->mo, NULL, NULL, 1, DMG_TIMEOVER);
|
||||
P_DamageMobj(player->mo, NULL, NULL, 1, DMG_TIMEOVER);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue