Permalink
Browse files

- re-count impact decals each time a savegame is loaded.

This counter is not always reliable, especially when running for longer periods, so putting it in a savegame is not a good idea.
  • Loading branch information...
coelckers committed Feb 7, 2019
1 parent 4f0850b commit 97e3e858a10422e883643396c5afabb44311dbd3
Showing with 5 additions and 2 deletions.
  1. +5 −2 src/p_saveg.cpp
@@ -964,7 +964,6 @@ void FLevelLocals::Serialize(FSerializer &arc, bool hubload)
("spotstate", SpotState)
("fragglethinker", FraggleScriptThinker)
("acsthinker", ACSThinker)
("impactdecalcount", ImpactDecalCount)
("scrolls", Scrolls)
("automap", automap)
("interpolator", interpolator)
@@ -1015,7 +1014,7 @@ void FLevelLocals::Serialize(FSerializer &arc, bool hubload)
if (arc.isReading())
{
for (auto &sec : sectors)
{
{
P_Recalculate3DFloors(&sec);
}
for (int i = 0; i < MAXPLAYERS; ++i)
@@ -1029,6 +1028,10 @@ void FLevelLocals::Serialize(FSerializer &arc, bool hubload)
RecreateAllAttachedLights();
InitPortalGroups(this);

auto it = GetThinkerIterator<DImpactDecal>(NAME_None, STAT_AUTODECAL);
ImpactDecalCount = 0;
while (it.Next()) ImpactDecalCount++;

automap->UpdateShowAllLines();

}

0 comments on commit 97e3e85

Please sign in to comment.