Tweaks for kart v1 MR comments

This commit is contained in:
Eidolon 2022-05-21 12:32:40 -05:00
parent 2fe0555e3f
commit 64088d8f07
3 changed files with 13 additions and 12 deletions

View file

@ -5600,11 +5600,6 @@ boolean TryRunTics(tic_t realtics)
ticking = neededtic > gametic; ticking = neededtic > gametic;
if (player_joining)
{
return false;
}
if (ticking) if (ticking)
{ {
if (advancedemo) if (advancedemo)

View file

@ -30,6 +30,12 @@ static precise_t enterprecise, oldenterprecise;
static fixed_t entertic, oldentertics; static fixed_t entertic, oldentertics;
static double tictimer; static double tictimer;
// A little more than the minimum sleep duration on Windows.
// May be incorrect for other platforms, but we don't currently have a way to
// query the scheduler granularity. SDL will do what's needed to make this as
// low as possible though.
#define MIN_SLEEP_DURATION_MS 2.1
tic_t I_GetTime(void) tic_t I_GetTime(void)
{ {
return g_time.time; return g_time.time;
@ -90,7 +96,7 @@ void I_SleepDuration(precise_t duration)
precise_t dest; precise_t dest;
{ {
double gran = round(((double)(precision / 1000) * sleepvalue * 2.1)); double gran = round(((double)(precision / 1000) * sleepvalue * MIN_SLEEP_DURATION_MS));
delaygranularity = (UINT64)gran; delaygranularity = (UINT64)gran;
} }

View file

@ -9144,8 +9144,7 @@ Update the maxplayers label...
static fixed_t cursorframe = 0; static fixed_t cursorframe = 0;
cursorframe += renderdeltatics / 4; cursorframe += renderdeltatics / 4;
if (cursorframe > 7 * FRACUNIT) for (; cursorframe > 7 * FRACUNIT; cursorframe -= 7 * FRACUNIT) {}
cursorframe -= 7 * FRACUNIT;
V_DrawFixedPatch(x<<FRACBITS, y<<FRACBITS, FRACUNIT, 0, W_CachePatchName(va("K_BHILI%d", (cursorframe >> FRACBITS) + 1), PU_CACHE), NULL); V_DrawFixedPatch(x<<FRACBITS, y<<FRACBITS, FRACUNIT, 0, W_CachePatchName(va("K_BHILI%d", (cursorframe >> FRACBITS) + 1), PU_CACHE), NULL);
} }
@ -9493,8 +9492,7 @@ static void M_DrawSetupMultiPlayerMenu(void)
UINT8 *colmap; UINT8 *colmap;
cursorframe += renderdeltatics / 4; cursorframe += renderdeltatics / 4;
if (cursorframe > 7 * FRACUNIT) for (; cursorframe > 7 * FRACUNIT; cursorframe -= 7 * FRACUNIT) {}
cursorframe -= 7 * FRACUNIT;
cursor = W_CachePatchName(va("K_BHILI%d", (cursorframe >> FRACBITS) + 1), PU_CACHE); cursor = W_CachePatchName(va("K_BHILI%d", (cursorframe >> FRACBITS) + 1), PU_CACHE);
@ -9534,9 +9532,11 @@ static void M_DrawSetupMultiPlayerMenu(void)
st = multi_state->nextstate; st = multi_state->nextstate;
if (st != S_NULL) if (st != S_NULL)
multi_state = &states[st]; multi_state = &states[st];
multi_tics = multi_state->tics;
if (multi_tics <= -1*FRACUNIT) if (multi_state->tics <= -1)
multi_tics += 15*FRACUNIT; multi_tics += 15*FRACUNIT;
else
multi_tics += multi_state->tics * FRACUNIT;
} }
// skin 0 is default player sprite // skin 0 is default player sprite