Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members  

NetworkMessages Namespace Reference


Detailed Description

Contains the various commands that will be sent for network play. The first string being who the command is for (i.e. COMMAND_OVERHEAD, COMMAND_BATTLEMODE, etc) and the second string being "COMMIT_TIME" and the third string being an int of when the command should be acted out.


Functions

void sendBuildMessage (const string &buildMsg, unsigned int cityID)
const string NETWORK_DATA ("receiveNetworkData:")
const string COMMIT_TIME ("CommitTime")
const string COMMAND_CHAT ("Chat")
const string COMMAND_START_GAME ("StartGameCommand")
const string COMMAND_SYNC ("CommandSync")
const string RANDOM_SEED_VALUE ("RandomSeedValue")
const string COMMAND_PRINT_A_RANDOM_NUMBER_TO_THE_CONSOLE ("PrintARandomNumberToTheConsole")
const string COMMAND_TEXT_MESSAGE ("TextMessageCommand")
const string COMMAND_MORE_MONEY ("CommandMoreMoney")
const string COMMAND_SEND_MONEY ("CommandSendMoney")
const string COMMAND_ASK_FOR_RANDOM_NUMBER ("CommandAskForRandomNumber")
const string COMMAND_RANDOM_NUMBER_ANSWER ("CommandRandomNumberAnswer")
const string COMMAND_SEND_JET_REINFORCEMENT ("CommandSendJetReinforcement")
const string COMMAND_SEND_UNIT_REINFORCEMENT ("CommandSendUnitReinforcement")
const string COMMAND_OVERHEAD ("OverheadCommand")
const string REQUEST_NEW_LIGHT_TANK ("RequestNewLightTank")
const string UNIT_NUMBER ("UnitNumber")
const string COMMAND_GOAL ("CommandGoal")
const string END_GAME_TICK ("EndGameTick")
const string COMMAND_BUILD_LIGHTTANK ("BuildLightTank")
const string COMMAND_BUILD_HEAVYTANK ("BuildHeavyTank")
const string COMMAND_BUILD_ROCKET_LAUNCHER ("BuildRocketLauncher")
const string COMMAND_BUILD_ARTILLERY ("BuildArtillery")
const string COMMAND_BUILD_JET ("BuildJet")
const string COMMAND_BUILD_ECON ("BuildEcon")
const string COMMAND_SET_RALLY_POINT ("SetRallyPointForCity")
const string COMMAND_BEGINBATTLE ("BeginBattle")
const string COMMAND_BATTLEMODE ("BattlemodeCommand")
const string COMMAND_BATTLE_ID ("BattleID")


Function Documentation

const string COMMAND_ASK_FOR_RANDOM_NUMBER "CommandAskForRandomNumber"   
 

Referenced by Overhead::askForRandomNumbers(), and NetworkSubsystem::processNetworkData().

const string COMMAND_BATTLE_ID "BattleID"   
 

Referenced by BattleEntry::inputIssueGroupCommand(), BattleEntry::inputIssueJetsCommand(), and NetworkSubsystem::processNetworkData().

const string COMMAND_BATTLEMODE "BattlemodeCommand"   
 

Referenced by BattleEntry::inputIssueGroupCommand(), BattleEntry::inputIssueJetsCommand(), and NetworkSubsystem::processNetworkData().

const string COMMAND_BEGINBATTLE "BeginBattle"   
 

Referenced by NetworkSubsystem::processNetworkData().

const string COMMAND_BUILD_ARTILLERY "BuildArtillery"   
 

Referenced by NetworkSubsystem::processNetworkData().

const string COMMAND_BUILD_ECON "BuildEcon"   
 

Referenced by NetworkSubsystem::processNetworkData().

const string COMMAND_BUILD_HEAVYTANK "BuildHeavyTank"   
 

Referenced by NetworkSubsystem::processNetworkData().

const string COMMAND_BUILD_JET "BuildJet"   
 

Referenced by NetworkSubsystem::processNetworkData().

const string COMMAND_BUILD_LIGHTTANK "BuildLightTank"   
 

Referenced by NetworkSubsystem::processNetworkData().

const string COMMAND_BUILD_ROCKET_LAUNCHER "BuildRocketLauncher"   
 

Referenced by NetworkSubsystem::processNetworkData().

const string COMMAND_CHAT "Chat"   
 

Referenced by processIncomingMessages(), and updateMultiplayMenu().

const string COMMAND_GOAL "CommandGoal"   
 

Referenced by HUD::processMiniMapInput(), NetworkSubsystem::processNetworkData(), and Overhead::processOverheadInput().

const string COMMAND_MORE_MONEY "CommandMoreMoney"   
 

Referenced by Overhead::processCommand(), and NetworkSubsystem::processNetworkData().

const string COMMAND_OVERHEAD "OverheadCommand"   
 

Referenced by existsGameTickEnd(), HUD::processMiniMapInput(), NetworkSubsystem::processNetworkData(), Overhead::processOverheadInput(), sendBuildMessage(), and sendGameTickEnd().

const string COMMAND_PRINT_A_RANDOM_NUMBER_TO_THE_CONSOLE "PrintARandomNumberToTheConsole"   
 

Referenced by NetworkSubsystem::processNetworkData(), and Overhead::sendMessageToPrintARandomNumberToTheConsole().

const string COMMAND_RANDOM_NUMBER_ANSWER "CommandRandomNumberAnswer"   
 

Referenced by NetworkSubsystem::processNetworkData().

const string COMMAND_SEND_JET_REINFORCEMENT "CommandSendJetReinforcement"   
 

Referenced by NetworkSubsystem::processNetworkData(), and sendReinforcement().

const string COMMAND_SEND_MONEY "CommandSendMoney"   
 

Referenced by Overhead::processCommand(), and NetworkSubsystem::processNetworkData().

const string COMMAND_SEND_UNIT_REINFORCEMENT "CommandSendUnitReinforcement"   
 

Referenced by NetworkSubsystem::processNetworkData(), and sendReinforcement().

const string COMMAND_SET_RALLY_POINT "SetRallyPointForCity"   
 

Referenced by NetworkSubsystem::processNetworkData(), and Overhead::processOverheadInput().

const string COMMAND_START_GAME "StartGameCommand"   
 

Referenced by processIncomingMessages(), and updateMultiplayMenu().

const string COMMAND_SYNC "CommandSync"   
 

Referenced by NetworkData::addData(), and Overhead::overhead_update().

const string COMMAND_TEXT_MESSAGE "TextMessageCommand"   
 

Referenced by Overhead::overhead_update(), and NetworkSubsystem::processNetworkData().

const string COMMIT_TIME "CommitTime"   
 

Referenced by Overhead::askForRandomNumbers(), getGameTick(), BattleEntry::inputIssueGroupCommand(), BattleEntry::inputIssueJetsCommand(), Overhead::overhead_update(), Overhead::processCommand(), HUD::processMiniMapInput(), NetworkSubsystem::processNetworkData(), Overhead::processOverheadInput(), sendBuildMessage(), Overhead::sendMessageToPrintARandomNumberToTheConsole(), sendReinforcement(), and updateMultiplayMenu().

const string END_GAME_TICK "EndGameTick"   
 

Referenced by existsGameTickEnd(), and sendGameTickEnd().

const string NETWORK_DATA "receiveNetworkData:"   
 

Referenced by NetworkSubsystem::loadNetworkData(), and NetworkSubsystem::receiveNetworkData().

const string RANDOM_SEED_VALUE "RandomSeedValue"   
 

Referenced by updateMultiplayMenu().

const string REQUEST_NEW_LIGHT_TANK "RequestNewLightTank"   
 

void NetworkMessages::sendBuildMessage const string &    buildMsg,
unsigned int    cityID
 

Definition at line 30 of file Globals.cpp.

References COMMAND_OVERHEAD(), COMMIT_TIME(), Globals::currGameTick, net_send(), and Globals::NETWORK_GAME_TICK_LAG().

Referenced by Overhead::processOverheadInput(), and HUD::processOverheadInput().

00031   {
00032     stringstream sstr;
00033     sstr << COMMAND_OVERHEAD << " " << COMMIT_TIME << " " 
00034          << currGameTick + NETWORK_GAME_TICK_LAG << " " << buildMsg
00035          << " " << cityID;
00036     net_send(sstr.str());
00037   }

const string UNIT_NUMBER "UnitNumber"   
 


Generated on Wed Apr 23 05:52:18 2003 for Modern Warfare by doxygen1.3-rc2