Skip to content

Commit

Permalink
fix default elements disappearing when loading saves if the identifie…
Browse files Browse the repository at this point in the history
…rs don't match
  • Loading branch information
jacob1 committed Aug 25, 2018
1 parent c1e4644 commit bbef295
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/simulation/Simulation.cpp
Expand Up @@ -76,7 +76,7 @@ int Simulation::Load(int fullX, int fullY, GameSave * save, bool includePressure
// if this is a custom element, set the ID to the ID we found when comparing identifiers in the palette map
// set type to 0 if we couldn't find an element with that identifier present when loading,
// unless this is a default element, in which case keep the current ID, because otherwise when an element is renamed it wouldn't show up anymore in older saves
if (myId != 0 || pi.first.BeginsWith("DEFAULT_PT_"))
if (myId != 0 || !pi.first.BeginsWith("DEFAULT_PT_"))
partMap[pi.second] = myId;
}
}
Expand Down

0 comments on commit bbef295

Please sign in to comment.