1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-25 22:42:04 +02:00

Fix hero pool persistency between saves

This commit is contained in:
Ivan Savenko
2023-07-11 20:29:44 +03:00
parent 539c508870
commit ec7e046617
5 changed files with 40 additions and 18 deletions

View File

@@ -7242,3 +7242,10 @@ void CGameHandler::createObject(const int3 & visitablePosition, Obj type, int32_
no.targetPos = visitablePosition;
sendAndApply(&no);
}
void CGameHandler::deserializationFix()
{
//FIXME: pointer to GameHandler itself can't be deserialized at the moment since GameHandler is top-level entity in serialization
// restore any places that requires such pointer manually
heroPool->gameHandler = this;
}