Bläddra i källkod

Fix for serialization bug

nordsoft 2 år sedan
förälder
incheckning
059ccdc9bc
1 ändrade filer med 4 tillägg och 0 borttagningar
  1. 4 0
      lib/mapObjects/CGTownInstance.h

+ 4 - 0
lib/mapObjects/CGTownInstance.h

@@ -89,6 +89,10 @@ public:
 		h & spells;
 		h & spells;
 		h & events;
 		h & events;
 		h & bonusingBuildings;
 		h & bonusingBuildings;
+		
+		for(auto * bonusingBuilding : bonusingBuildings)
+			bonusingBuilding->town = this;
+		
 		h & town;
 		h & town;
 		h & townAndVis;
 		h & townAndVis;
 		BONUS_TREE_DESERIALIZATION_FIX
 		BONUS_TREE_DESERIALIZATION_FIX