Merge branch 'fix-collected-emblem-lag' into 'next'

Fix lag when touching collected emblems

Closes #1306

See merge request STJr/SRB2!2536
This commit is contained in:
Lactozilla 2024-11-12 00:56:57 +00:00
commit 10598062f9

View file

@ -836,7 +836,8 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck)
{ {
clientGamedata->collected[special->health-1] = true; clientGamedata->collected[special->health-1] = true;
M_UpdateUnlockablesAndExtraEmblems(clientGamedata); M_UpdateUnlockablesAndExtraEmblems(clientGamedata);
G_SaveGameData(clientGamedata); if (!prevCollected) // don't thrash the disk and wreak performance.
G_SaveGameData(clientGamedata);
} }
if (netgame) if (netgame)