diff --git a/src/doomdef.h b/src/doomdef.h index 3492179b4..0d759f3bd 100644 --- a/src/doomdef.h +++ b/src/doomdef.h @@ -670,6 +670,11 @@ extern int compuncommitted; /// Experimental attempts at preventing MF_PAPERCOLLISION objects from getting stuck in walls. //#define PAPER_COLLISIONCORRECTION +#ifdef DEVELOP +// Easily make it so that overtime works offline +#define TESTOVERTIMEINFREEPLAY +#endif + /// FINALLY some real clipping that doesn't make walls dissappear AND speeds the game up /// (that was the original comment from SRB2CB, sadly it is a lie and actually slows game down) /// on the bright side it fixes some weird issues with translucent walls diff --git a/src/k_hud.c b/src/k_hud.c index e9810e7f7..7d0f335f3 100644 --- a/src/k_hud.c +++ b/src/k_hud.c @@ -1421,9 +1421,10 @@ void K_drawKartTimestamp(tic_t drawtime, INT32 TX, INT32 TY, INT16 emblemmap, UI if (leveltime & 1) jitter = -jitter; } - else if (drawtime < 5*TICRATE) + else if (drawtime <= 5*TICRATE) { - jitter = 1; + jitter = ((drawtime <= 3*TICRATE) && (((drawtime-1) % TICRATE) >= TICRATE-2)) + ? 3 : 1; if (drawtime & 2) jitter = -jitter; } diff --git a/src/p_inter.c b/src/p_inter.c index cdc1ec9ad..5a6a9bcf0 100644 --- a/src/p_inter.c +++ b/src/p_inter.c @@ -590,9 +590,6 @@ void P_TouchStarPost(mobj_t *post, player_t *player, boolean snaptopost) player->starpostnum = post->health; } -// Easily make it so that overtime works offline -#define TESTOVERTIMEINFREEPLAY - /** Checks if the level timer is over the timelimit and the round should end, * unless you are in overtime. In which case leveltime may stretch out beyond * timelimitintics and overtime's status will be checked here each tick. @@ -616,34 +613,43 @@ void P_CheckTimeLimit(void) return; } - if (secretextratime) + if (leveltime < (timelimitintics + starttime)) { - secretextratime--; - timelimitintics++; - } - else if (extratimeintics) - { - timelimitintics++; - if (leveltime & 1) - ; - else + if (secretextratime) { - if (extratimeintics > 20) - { - extratimeintics -= 20; - timelimitintics += 20; - } + secretextratime--; + timelimitintics++; + } + else if (extratimeintics) + { + timelimitintics++; + if (leveltime & 1) + ; else { - timelimitintics += extratimeintics; - extratimeintics = 0; + if (extratimeintics > 20) + { + extratimeintics -= 20; + timelimitintics += 20; + } + else + { + timelimitintics += extratimeintics; + extratimeintics = 0; + } + S_StartSound(NULL, sfx_ptally); } - S_StartSound(NULL, sfx_ptally); } - } - - if (leveltime < (timelimitintics + starttime)) + else + { + if (timelimitintics + starttime - leveltime <= 3*TICRATE) + { + if (((timelimitintics + starttime - leveltime) % TICRATE) == 0) + S_StartSound(NULL, sfx_s3ka7); + } + } return; + } if (gameaction == ga_completed) return;