mirror of
https://github.com/vcmi/vcmi.git
synced 2025-06-23 00:28:08 +02:00
Fix crashes on game start, gamestate now derives from GameCallbackHolder
This commit is contained in:
@ -118,7 +118,7 @@ void CClient::newGame(std::shared_ptr<CGameState> initializedGameState)
|
||||
CMapService mapService;
|
||||
assert(initializedGameState);
|
||||
gamestate = initializedGameState;
|
||||
gamestate->preInit(LIBRARY, this);
|
||||
gamestate->preInit(LIBRARY);
|
||||
logNetwork->trace("\tCreating gamestate: %i", GAME->server().th->getDiff());
|
||||
|
||||
initMapHandler();
|
||||
@ -133,7 +133,7 @@ void CClient::loadGame(std::shared_ptr<CGameState> initializedGameState)
|
||||
|
||||
logNetwork->info("Game state was transferred over network, loading.");
|
||||
gamestate = initializedGameState;
|
||||
gamestate->preInit(LIBRARY, this);
|
||||
gamestate->preInit(LIBRARY);
|
||||
gamestate->updateOnLoad(GAME->server().si.get());
|
||||
logNetwork->info("Game loaded, initialize interfaces.");
|
||||
|
||||
|
Reference in New Issue
Block a user