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:
lotodore
2007-05-13 22:25:59 +00:00
parent e2d394f576
commit 7540ea17bd
21 changed files with 282 additions and 72 deletions
+3
View File
@@ -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);
}