Fixed player counting bug. Fixed player number. Joining/leaving network game should work now. Added player type to localplayer.

This commit is contained in:
lotodore
2007-05-08 06:45:46 +00:00
parent 5b878d9095
commit 4a10d6188c
14 changed files with 216 additions and 183 deletions
+5 -1
View File
@@ -65,9 +65,13 @@ Game::Game(GuiInterface* gui, const PlayerDataList &playerDataList, const GameDa
string myName;
string myAvatarFile;
unsigned uniqueId = 0;
PlayerType type = PLAYER_TYPE_COMPUTER;
if (player_i != player_end)
{
uniqueId = (*player_i)->GetUniqueId();
type = (*player_i)->GetType();
myName = (*player_i)->GetName();
myAvatarFile = (*player_i)->GetAvatarFile();
// TODO: set player type
@@ -75,7 +79,7 @@ Game::Game(GuiInterface* gui, const PlayerDataList &playerDataList, const GameDa
}
//PlayerObjekte erzeugen
playerArray[i] = myFactory->createPlayer(actualBoard, i, myName, myAvatarFile, startCash, startQuantityPlayers > i, 0);
playerArray[i] = myFactory->createPlayer(actualBoard, i, uniqueId, type, myName, myAvatarFile, startCash, startQuantityPlayers > i, 0);
}
actualBoard->setPlayer(playerArray);