mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Merge branch 'lost-time-protection' into 'master'
TA: Prevent reset during tally if time is a new best See merge request kart-krew-dev/ring-racers-internal!2723
This commit is contained in:
commit
217316787a
4 changed files with 19 additions and 4 deletions
|
|
@ -59,6 +59,9 @@ struct menutransition_s menutransition; // Menu transition properties
|
||||||
INT32 menuKey = -1; // keyboard key pressed for menu
|
INT32 menuKey = -1; // keyboard key pressed for menu
|
||||||
menucmd_t menucmd[MAXSPLITSCREENPLAYERS];
|
menucmd_t menucmd[MAXSPLITSCREENPLAYERS];
|
||||||
|
|
||||||
|
// Prevent early resetting in Attack modes when setting a new best time.
|
||||||
|
// I can't make demos save at the correct time, but I can do this!
|
||||||
|
boolean blockreset = false;
|
||||||
|
|
||||||
// finish wipes between screens
|
// finish wipes between screens
|
||||||
boolean menuwipe = false;
|
boolean menuwipe = false;
|
||||||
|
|
@ -468,8 +471,11 @@ boolean M_Responder(event_t *ev)
|
||||||
// Quick Retry (Z in modeattacking)
|
// Quick Retry (Z in modeattacking)
|
||||||
if (modeattacking && G_PlayerInputDown(0, gc_vote, splitscreen + 1) == true)
|
if (modeattacking && G_PlayerInputDown(0, gc_vote, splitscreen + 1) == true)
|
||||||
{
|
{
|
||||||
M_TryAgain(0);
|
if (!blockreset)
|
||||||
return true;
|
{
|
||||||
|
M_TryAgain(0);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Quick Spectate (L+R+A+Start online)
|
// Quick Spectate (L+R+A+Start online)
|
||||||
|
|
|
||||||
|
|
@ -7618,6 +7618,8 @@ static void P_InitLevelSettings(void)
|
||||||
|
|
||||||
leveltime = 0;
|
leveltime = 0;
|
||||||
modulothing = 0;
|
modulothing = 0;
|
||||||
|
extern boolean blockreset;
|
||||||
|
blockreset = 0;
|
||||||
|
|
||||||
P_SetFreezeLevel(false);
|
P_SetFreezeLevel(false);
|
||||||
P_SetFreezeCheat(false);
|
P_SetFreezeCheat(false);
|
||||||
|
|
|
||||||
|
|
@ -1270,7 +1270,11 @@ void P_DoPlayerExit(player_t *player, pflags_t flags)
|
||||||
if (P_IsDisplayPlayer(player))
|
if (P_IsDisplayPlayer(player))
|
||||||
S_StartSound(NULL, sfx_s3kb0);
|
S_StartSound(NULL, sfx_s3kb0);
|
||||||
player->rings = max(20, player->rings + 20);
|
player->rings = max(20, player->rings + 20);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
extern boolean blockreset;
|
||||||
|
if (modeattacking && !K_IsPlayerLosing(player) && player->realtime < oldbest)
|
||||||
|
blockreset = true;
|
||||||
|
|
||||||
const boolean losing = K_IsPlayerLosing(player); // HEY!!!! Set it AFTER K_UpdateAllPlayerPositions!!!!
|
const boolean losing = K_IsPlayerLosing(player); // HEY!!!! Set it AFTER K_UpdateAllPlayerPositions!!!!
|
||||||
const boolean specialout = (specialstageinfo.valid == true && losing == true);
|
const boolean specialout = (specialstageinfo.valid == true && losing == true);
|
||||||
|
|
@ -3391,7 +3395,7 @@ boolean P_MoveChaseCamera(player_t *player, camera_t *thiscam, boolean resetcall
|
||||||
{
|
{
|
||||||
if (r_splitscreen != 1)
|
if (r_splitscreen != 1)
|
||||||
camheight = FixedMul(mapheaderinfo[gamemap-1]->cameraHeight, cameraScale);
|
camheight = FixedMul(mapheaderinfo[gamemap-1]->cameraHeight, cameraScale);
|
||||||
|
|
||||||
// For 2p SPLITSCREEN SPECIFICALLY:
|
// For 2p SPLITSCREEN SPECIFICALLY:
|
||||||
// The view is pretty narrow, so move it back 3/20 of the way towards default camera height.
|
// The view is pretty narrow, so move it back 3/20 of the way towards default camera height.
|
||||||
else {
|
else {
|
||||||
|
|
|
||||||
|
|
@ -2544,6 +2544,9 @@ void Y_StartIntermission(void)
|
||||||
I_Error("endtic is dirty");
|
I_Error("endtic is dirty");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
extern boolean blockreset;
|
||||||
|
blockreset = false;
|
||||||
|
|
||||||
// set player Power Level type
|
// set player Power Level type
|
||||||
powertype = K_UsingPowerLevels();
|
powertype = K_UsingPowerLevels();
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue