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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user