Fixed player counting bug. Fixed player number. Joining/leaving network game should work now. Added player type to localplayer.
This commit is contained in:
+5
-1
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user