Fixed relationship of network session and player data to be consistent with the game engine. Now sending card's values via network. Fixed net packet checks.
This commit is contained in:
@@ -67,6 +67,7 @@ Game::Game(GuiInterface* gui, const PlayerDataList &playerDataList, const GameDa
|
||||
string myAvatarFile;
|
||||
unsigned uniqueId = 0;
|
||||
PlayerType type = PLAYER_TYPE_COMPUTER;
|
||||
boost::shared_ptr<SessionData> myNetSession;
|
||||
|
||||
if (player_i != player_end)
|
||||
{
|
||||
@@ -74,12 +75,14 @@ Game::Game(GuiInterface* gui, const PlayerDataList &playerDataList, const GameDa
|
||||
type = (*player_i)->GetType();
|
||||
myName = (*player_i)->GetName();
|
||||
myAvatarFile = (*player_i)->GetAvatarFile();
|
||||
myNetSession = (*player_i)->GetNetSessionData();
|
||||
// TODO: set player type
|
||||
++player_i;
|
||||
}
|
||||
|
||||
//PlayerObjekte erzeugen
|
||||
playerArray[i] = myFactory->createPlayer(actualBoard, i, uniqueId, type, myName, myAvatarFile, startCash, startQuantityPlayers > i, 0);
|
||||
playerArray[i]->setNetSessionData(myNetSession);
|
||||
}
|
||||
actualBoard->setPlayer(playerArray);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user