Browse Source

Fix for serialization bug

nordsoft 2 years ago
parent
commit
059ccdc9bc
1 changed files with 4 additions and 0 deletions
  1. 4 0
      lib/mapObjects/CGTownInstance.h

+ 4 - 0
lib/mapObjects/CGTownInstance.h

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