浏览代码

Fix saves when some humans become AI. (PlayerInterface destructor clears LOCPLINT)

Andrii Danylchenko 3 年之前
父节点
当前提交
4defbc314a
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      client/Client.cpp

+ 2 - 0
client/Client.cpp

@@ -288,6 +288,7 @@ void CClient::serialize(BinaryDeserializer & h, const int version)
 		std::string dllname;
 		PlayerColor pid;
 		bool isHuman = false;
+		auto prevInt = LOCPLINT;
 
 		h & pid;
 		h & dllname;
@@ -331,6 +332,7 @@ void CClient::serialize(BinaryDeserializer & h, const int version)
 			continue;
 		}
 		nInt.reset();
+		LOCPLINT = prevInt;
 	}
 
 	{