diff --git a/source/glest_game/game/game.cpp b/source/glest_game/game/game.cpp index 58e8952d..272c0efc 100644 --- a/source/glest_game/game/game.cpp +++ b/source/glest_game/game/game.cpp @@ -774,7 +774,7 @@ void Game::ReplaceDisconnectedNetworkPlayersWithAI(bool isNetworkGame, NetworkRo faction->getControlType() == ctNetworkCpu || faction->getControlType() == ctNetworkCpuUltra || faction->getControlType() == ctNetworkCpuMega) { - ConnectionSlot *slot = server->getSlot(faction->getIndex()); + ConnectionSlot *slot = server->getSlot(faction->getStartLocationIndex()); if(aiInterfaces[i] == NULL && (slot == NULL || slot->isConnected() == false)) { faction->setControlType(ctCpu); diff --git a/source/glest_game/type_instances/faction.cpp b/source/glest_game/type_instances/faction.cpp index ba977c41..84f0ff20 100644 --- a/source/glest_game/type_instances/faction.cpp +++ b/source/glest_game/type_instances/faction.cpp @@ -77,7 +77,7 @@ void Faction::init( } texture= Renderer::getInstance().newTexture2D(rsGame); - texture->load("data/core/faction_textures/faction"+intToStr(index)+".tga"); + texture->load("data/core/faction_textures/faction"+intToStr(startLocationIndex)+".tga"); SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__); } diff --git a/source/glest_game/world/world.cpp b/source/glest_game/world/world.cpp index 936e5149..a94cecaf 100644 --- a/source/glest_game/world/world.cpp +++ b/source/glest_game/world/world.cpp @@ -866,7 +866,7 @@ void World::initFactionTypes(GameSettings *gs){ for(int i=0; i < factions.size(); ++i) { const FactionType *ft= techTree->getType(gs->getFactionTypeName(i)); factions[i].init( - ft, gs->getFactionControl(i), techTree, game, gs->getStartLocationIndex(i), gs->getTeam(i), + ft, gs->getFactionControl(i), techTree, game, i, gs->getTeam(i), gs->getStartLocationIndex(i), i==thisFactionIndex, gs->getDefaultResources()); stats.setTeam(i, gs->getTeam(i));