mirror of
https://github.com/glest/glest-source.git
synced 2025-02-24 19:52:25 +01:00
- bugfix for segfault (using wrong index variables again). This time I understand what to change and what not to change :)
This commit is contained in:
parent
6ace9ad571
commit
b72124a89a
@ -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);
|
||||
|
@ -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__);
|
||||
}
|
||||
|
@ -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));
|
||||
|
Loading…
x
Reference in New Issue
Block a user