1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-06-27 00:41:08 +02:00

Fixed desync due to uninitialized objects. Added some logging. RMG maps don't work yet, though.

This commit is contained in:
DjWarmonger
2014-07-27 19:30:17 +02:00
parent 3acbda75ef
commit fe292dfa1d
5 changed files with 14 additions and 0 deletions

View File

@ -1849,7 +1849,10 @@ void CGameState::initMapObjects()
for(CGObjectInstance *obj : map->objects)
{
if(obj)
{
logGlobal->traceStream() << boost::format ("Calling Init for object %d, %d") % obj->ID % obj->subID;
obj->initObj();
}
}
for(CGObjectInstance *obj : map->objects)
{
@ -3518,5 +3521,6 @@ CPathfinder::CPathfinder(CPathsInfo &_out, CGameState *_gs, const CGHeroInstance
CRandomGenerator & CGameState::getRandomGenerator()
{
logGlobal->traceStream() << "Fetching CGameState::rand with seed " << rand.nextInt();
return rand;
}