|
Int PlayerList::getSlotIndex(Int playerIndex) const |
|
{ |
|
if (playerIndex >= 0 && playerIndex < ARRAY_SIZE(m_slotIndices)) |
|
{ |
|
return m_slotIndices[playerIndex]; |
|
} |
|
|
|
return -1; |
|
} |
It should be possible to replace any code that does a conversion from player index to slot index with a call to PlayerList::getSlotIndex.
Incomplete list:
GameLogic::onLogicCrc
// "player%d":
ControlBar::populateObserverList
ConnectionManager::processChat
GameSpyStagingRoom::generateGameSpyGameResultsPacket
GameSpyStagingRoom::generateLadderGameResultsPacket
NetGameCommandMsg::constructGameMessage
Network::processDestroyPlayerCommand
RecorderClass::handleCRCMessage
PopulateInGameDiplomacyPopup
ToggleInGameChat
grabMultiPlayerInfo
InGameUI::drawPlayerInfoList
VictoryConditions::update
GameLogic::tryStartNewGame
GeneralsGameCode/GeneralsMD/Code/GameEngine/Source/Common/RTS/PlayerList.cpp
Lines 500 to 508 in e378776
It should be possible to replace any code that does a conversion from player index to slot index with a call to
PlayerList::getSlotIndex.Incomplete list:
GameLogic::onLogicCrc // "player%d": ControlBar::populateObserverList ConnectionManager::processChat GameSpyStagingRoom::generateGameSpyGameResultsPacket GameSpyStagingRoom::generateLadderGameResultsPacket NetGameCommandMsg::constructGameMessage Network::processDestroyPlayerCommand RecorderClass::handleCRCMessage PopulateInGameDiplomacyPopup ToggleInGameChat grabMultiPlayerInfo InGameUI::drawPlayerInfoList VictoryConditions::update GameLogic::tryStartNewGame