浏览代码

Fix for serialization bug

nordsoft 2 年之前
父节点
当前提交
059ccdc9bc
共有 1 个文件被更改,包括 4 次插入0 次删除
  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