Fix: No Resources in Gui when loading savegame with shared team resources

See: https://forum.megaglest.org/index.php?topic=9641.0
This commit is contained in:
titison 2015-01-13 18:51:32 +01:00
parent e4c2683e1d
commit 3875b80334

View File

@ -731,9 +731,13 @@ void Faction::init(
store[index].init(rt, 0);
this->world->initTeamResource(rt,this->teamIndex,0);
this->updateUnitTypeWithResourceCostCache(rt);
}
}
//initialize cache
for(int index = 0; index < techTree->getResourceTypeCount(); ++index) {
const ResourceType *rt = techTree->getResourceType(index);
this->updateUnitTypeWithResourceCostCache(rt);
}
texture= Renderer::getInstance().newTexture2D(rsGame);
string data_path = getGameReadWritePath(GameConstants::path_data_CacheLookupKey);