mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Cleanup of P_Ticker gamedata material
- Don't do updates in titlemap - totalplaytime is leveltime-based
This commit is contained in:
parent
e2a3acc99d
commit
224d584203
1 changed files with 15 additions and 8 deletions
23
src/p_tick.c
23
src/p_tick.c
|
|
@ -864,15 +864,22 @@ void P_Ticker(boolean run)
|
|||
|
||||
ps_playerthink_time = I_GetPreciseTime() - ps_playerthink_time;
|
||||
|
||||
// TODO would this be laggy with more conditions in play...
|
||||
if (((!demo.playback && leveltime > introtime && M_UpdateUnlockablesAndExtraEmblems(true, false))
|
||||
|| (gamedata && gamedata->deferredsave)))
|
||||
G_SaveGameData();
|
||||
}
|
||||
if (gamedata && gamestate == GS_LEVEL && !demo.playback)
|
||||
{
|
||||
// Keep track of how long they've been playing!
|
||||
gamedata->totalplaytime++;
|
||||
|
||||
// Keep track of how long they've been playing!
|
||||
if (!demo.playback) // Don't increment if a demo is playing.
|
||||
gamedata->totalplaytime++;
|
||||
// TODO would this be laggy with more conditions in play...
|
||||
if (
|
||||
(leveltime > introtime
|
||||
&& M_UpdateUnlockablesAndExtraEmblems(true, false))
|
||||
|| gamedata->deferredsave
|
||||
)
|
||||
{
|
||||
G_SaveGameData();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (run)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue