It is now possible to start the network game with a player number below the maximum player count.

This commit is contained in:
lotodore
2007-06-11 19:46:18 +00:00
parent 07dc39d107
commit 0d4e38705d
11 changed files with 40 additions and 23 deletions
+4 -2
View File
@@ -261,10 +261,12 @@ ServerRecvThread::InternalStartGame()
// Create EngineFactory
boost::shared_ptr<EngineFactory> factory(new LocalEngineFactory(m_playerConfig)); // LocalEngine erstellen
// Set dealer pos.
// Set start data.
StartData startData;
startData.numberOfPlayers = playerData.size();
int tmpDealerPos = 0;
Tools::getRandNumber(0, GetGameData().numberOfPlayers-1, 1, &tmpDealerPos, 0);
Tools::getRandNumber(0, startData.numberOfPlayers-1, 1, &tmpDealerPos, 0);
// The Player Id is not continuous. Therefore, the start dealer position
// needs to be converted to a player Id, and cannot be directly generated
// as player Id.