From 40a07075197229f3117c507ba70a643f3e3478c2 Mon Sep 17 00:00:00 2001 From: Mark Vejvoda Date: Fri, 22 Oct 2010 16:47:08 +0000 Subject: [PATCH] - bugfix for switching human to AI on disconnect (the check used the wrong index) --- source/glest_game/game/game.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/glest_game/game/game.cpp b/source/glest_game/game/game.cpp index f03dbef3..58e8952d 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(i); + ConnectionSlot *slot = server->getSlot(faction->getIndex()); if(aiInterfaces[i] == NULL && (slot == NULL || slot->isConnected() == false)) { faction->setControlType(ctCpu);