[Opentnl-cvs] tnl/zap UIGame.cpp,1.50,1.51 footballGame.cpp,1.14,1.15 gameConnection.cpp,1.25,1.26 g
Brought to you by:
mark_frohnmayer,
s_alanet
From: Mark F. <mar...@us...> - 2005-02-22 09:49:04
|
Update of /cvsroot/opentnl/tnl/zap In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7023/zap Modified Files: UIGame.cpp footballGame.cpp gameConnection.cpp gameConnection.h gameType.cpp gameType.h huntersGame.cpp huntersGame.h main.cpp masterConnection.cpp masterConnection.h rabbitGame.cpp rabbitGame.h ship.cpp soccerGame.cpp soccerGame.h Log Message: The Zap example now properly compiles and executes using the new RPC funcionality Index: rabbitGame.cpp =================================================================== RCS file: /cvsroot/opentnl/tnl/zap/rabbitGame.cpp,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** rabbitGame.cpp 4 Aug 2004 18:25:27 -0000 1.10 --- rabbitGame.cpp 22 Feb 2005 09:46:37 -0000 1.11 *************** *** 37,41 **** { ! TNL_IMPLEMENT_NETOBJECT_RPC(RabbitGameType, s2cRabbitMessage, (U32 msgIndex, StringTableEntryRef clientName), NetClassGroupGameMask, RPCGuaranteedOrdered, RPCToGhost, 0) { --- 37,41 ---- { ! TNL_IMPLEMENT_NETOBJECT_RPC(RabbitGameType, s2cRabbitMessage, (U32 msgIndex, StringTableEntry clientName), (msgIndex, clientName), NetClassGroupGameMask, RPCGuaranteedOrdered, RPCToGhost, 0) { Index: main.cpp =================================================================== RCS file: /cvsroot/opentnl/tnl/zap/main.cpp,v retrieving revision 1.74 retrieving revision 1.75 diff -C2 -d -r1.74 -r1.75 *** main.cpp 19 Oct 2004 19:43:58 -0000 1.74 --- main.cpp 22 Feb 2005 09:46:34 -0000 1.75 *************** *** 106,110 **** TNL_DECLARE_JOURNAL_ENTRYPOINT(idle, (U32 timeDelta)); TNL_DECLARE_JOURNAL_ENTRYPOINT(display, ()); ! TNL_DECLARE_JOURNAL_ENTRYPOINT(startup, (const Vector<const char *> &theArgv)); }; --- 106,110 ---- TNL_DECLARE_JOURNAL_ENTRYPOINT(idle, (U32 timeDelta)); TNL_DECLARE_JOURNAL_ENTRYPOINT(display, ()); ! TNL_DECLARE_JOURNAL_ENTRYPOINT(startup, (Vector<StringPtr> theArgv)); }; *************** *** 116,120 **** } ! TNL_IMPLEMENT_JOURNAL_ENTRYPOINT(ZapJournal, reshape, (S32 newWidth, S32 newHeight)) { UserInterface::windowWidth = newWidth; --- 116,121 ---- } ! TNL_IMPLEMENT_JOURNAL_ENTRYPOINT(ZapJournal, reshape, ! (S32 newWidth, S32 newHeight), (newWidth, newHeight)) { UserInterface::windowWidth = newWidth; *************** *** 127,131 **** } ! TNL_IMPLEMENT_JOURNAL_ENTRYPOINT(ZapJournal, motion, (S32 x, S32 y)) { if(gIsCrazyBot) --- 128,133 ---- } ! TNL_IMPLEMENT_JOURNAL_ENTRYPOINT(ZapJournal, motion, ! (S32 x, S32 y), (x, y)) { if(gIsCrazyBot) *************** *** 141,145 **** } ! TNL_IMPLEMENT_JOURNAL_ENTRYPOINT(ZapJournal, passivemotion, (S32 x, S32 y)) { if(gIsCrazyBot) --- 143,148 ---- } ! TNL_IMPLEMENT_JOURNAL_ENTRYPOINT(ZapJournal, passivemotion, ! (S32 x, S32 y), (x, y)) { if(gIsCrazyBot) *************** *** 155,159 **** } ! TNL_IMPLEMENT_JOURNAL_ENTRYPOINT(ZapJournal, key, (U8 key)) { // check for ALT-ENTER --- 158,162 ---- } ! TNL_IMPLEMENT_JOURNAL_ENTRYPOINT(ZapJournal, key, (U8 key), (key)) { // check for ALT-ENTER *************** *** 169,173 **** } ! TNL_IMPLEMENT_JOURNAL_ENTRYPOINT(ZapJournal, keyup, (U8 key)) { if(UserInterface::current) --- 172,176 ---- } ! TNL_IMPLEMENT_JOURNAL_ENTRYPOINT(ZapJournal, keyup, (U8 key), (key)) { if(UserInterface::current) *************** *** 180,184 **** } ! TNL_IMPLEMENT_JOURNAL_ENTRYPOINT(ZapJournal, mouse, (S32 button, S32 state, S32 x, S32 y)) { static int mouseState[2] = { 0, }; --- 183,188 ---- } ! TNL_IMPLEMENT_JOURNAL_ENTRYPOINT(ZapJournal, mouse, ! (S32 button, S32 state, S32 x, S32 y), (button, state, x, y)) { static int mouseState[2] = { 0, }; *************** *** 222,226 **** } ! TNL_IMPLEMENT_JOURNAL_ENTRYPOINT(ZapJournal, specialkey, (S32 key)) { if(UserInterface::current) --- 226,230 ---- } ! TNL_IMPLEMENT_JOURNAL_ENTRYPOINT(ZapJournal, specialkey, (S32 key), (key)) { if(UserInterface::current) *************** *** 233,237 **** } ! TNL_IMPLEMENT_JOURNAL_ENTRYPOINT(ZapJournal, specialkeyup, (S32 key)) { if(UserInterface::current) --- 237,241 ---- } ! TNL_IMPLEMENT_JOURNAL_ENTRYPOINT(ZapJournal, specialkeyup, (S32 key), (key)) { if(UserInterface::current) *************** *** 239,243 **** } ! TNL_IMPLEMENT_JOURNAL_ENTRYPOINT(ZapJournal, modifierkey, (U32 key)) { if(UserInterface::current) --- 243,247 ---- } ! TNL_IMPLEMENT_JOURNAL_ENTRYPOINT(ZapJournal, modifierkey, (U32 key), (key)) { if(UserInterface::current) *************** *** 245,249 **** } ! TNL_IMPLEMENT_JOURNAL_ENTRYPOINT(ZapJournal, modifierkeyup, (U32 key)) { if(UserInterface::current) --- 249,253 ---- } ! TNL_IMPLEMENT_JOURNAL_ENTRYPOINT(ZapJournal, modifierkeyup, (U32 key), (key)) { if(UserInterface::current) *************** *** 371,375 **** } ! TNL_IMPLEMENT_JOURNAL_ENTRYPOINT(ZapJournal, idle, (U32 integerTime)) { if(UserInterface::current) --- 375,379 ---- } ! TNL_IMPLEMENT_JOURNAL_ENTRYPOINT(ZapJournal, idle, (U32 integerTime), (integerTime)) { if(UserInterface::current) *************** *** 394,398 **** } ! TNL_IMPLEMENT_JOURNAL_ENTRYPOINT(ZapJournal, display, ()) { glFlush(); --- 398,402 ---- } ! TNL_IMPLEMENT_JOURNAL_ENTRYPOINT(ZapJournal, display, (), ()) { glFlush(); *************** *** 511,515 **** } ! TNL_IMPLEMENT_JOURNAL_ENTRYPOINT(ZapJournal, startup, (const Vector<const char *> &argv)) { bool hasClient = true; --- 515,519 ---- } ! TNL_IMPLEMENT_JOURNAL_ENTRYPOINT(ZapJournal, startup, (Vector<StringPtr> argv), (argv)) { bool hasClient = true; *************** *** 671,675 **** logprintf(argv[i]); ! Vector<const char *> theArgv; for(S32 i = 1; i < argc; i++) --- 675,679 ---- logprintf(argv[i]); ! Vector<StringPtr> theArgv; for(S32 i = 1; i < argc; i++) Index: gameType.cpp =================================================================== RCS file: /cvsroot/opentnl/tnl/zap/gameType.cpp,v retrieving revision 1.65 retrieving revision 1.66 diff -C2 -d -r1.65 -r1.66 *** gameType.cpp 18 Oct 2004 00:09:22 -0000 1.65 --- gameType.cpp 22 Feb 2005 09:46:33 -0000 1.66 *************** *** 400,404 **** } ! TNL_IMPLEMENT_NETOBJECT_RPC(GameType, s2cSetGameOver, (bool gameOver), NetClassGroupGameMask, RPCGuaranteedOrdered, RPCToGhost, 0) { --- 400,404 ---- } ! TNL_IMPLEMENT_NETOBJECT_RPC(GameType, s2cSetGameOver, (bool gameOver), (gameOver), NetClassGroupGameMask, RPCGuaranteedOrdered, RPCToGhost, 0) { *************** *** 768,772 **** } ! GAMETYPE_RPC_S2C(GameType, s2cSetLevelInfo, (StringTableEntryRef levelName, StringTableEntryRef levelDesc)) { mLevelName = levelName; --- 768,772 ---- } ! GAMETYPE_RPC_S2C(GameType, s2cSetLevelInfo, (StringTableEntry levelName, StringTableEntry levelDesc), (levelName, levelDesc)) { mLevelName = levelName; *************** *** 775,784 **** } ! GAMETYPE_RPC_S2C(GameType, s2cSetTimeRemaining, (U32 timeLeft)) { mGameTimer.reset(timeLeft); } ! GAMETYPE_RPC_C2S(GameType, c2sChangeTeams, ()) { GameConnection *source = (GameConnection *) NetObject::getRPCSourceConnection(); --- 775,784 ---- } ! GAMETYPE_RPC_S2C(GameType, s2cSetTimeRemaining, (U32 timeLeft), (timeLeft)) { mGameTimer.reset(timeLeft); } ! GAMETYPE_RPC_C2S(GameType, c2sChangeTeams, (), ()) { GameConnection *source = (GameConnection *) NetObject::getRPCSourceConnection(); *************** *** 805,809 **** } ! GAMETYPE_RPC_S2C(GameType, s2cAddClient, (StringTableEntryRef name, bool isMyClient)) { ClientRef *cref = allocClientRef(); --- 805,809 ---- } ! GAMETYPE_RPC_S2C(GameType, s2cAddClient, (StringTableEntry name, bool isMyClient), (name, isMyClient)) { ClientRef *cref = allocClientRef(); *************** *** 836,840 **** } ! GAMETYPE_RPC_S2C(GameType, s2cRemoveClient, (StringTableEntryRef name)) { for(S32 i = 0; i < mClientList.size(); i++) --- 836,840 ---- } ! GAMETYPE_RPC_S2C(GameType, s2cRemoveClient, (StringTableEntry name), (name)) { for(S32 i = 0; i < mClientList.size(); i++) *************** *** 849,853 **** } ! GAMETYPE_RPC_S2C(GameType, s2cAddTeam, (StringTableEntryRef teamName, F32 r, F32 g, F32 b)) { Team team; --- 849,853 ---- } ! GAMETYPE_RPC_S2C(GameType, s2cAddTeam, (StringTableEntry teamName, F32 r, F32 g, F32 b), (teamName, r, g, b)) { Team team; *************** *** 859,868 **** } ! GAMETYPE_RPC_S2C(GameType, s2cSetTeamScore, (U32 teamIndex, U32 score)) { mTeams[teamIndex].score = score; } ! GAMETYPE_RPC_S2C(GameType, s2cClientJoinedTeam, (StringTableEntryRef name, U32 teamIndex)) { ClientRef *cl = findClientRef(name); --- 859,868 ---- } ! GAMETYPE_RPC_S2C(GameType, s2cSetTeamScore, (U32 teamIndex, U32 score), (teamIndex, score)) { mTeams[teamIndex].score = score; } ! GAMETYPE_RPC_S2C(GameType, s2cClientJoinedTeam, (StringTableEntry name, U32 teamIndex), (name, teamIndex)) { ClientRef *cl = findClientRef(name); *************** *** 905,914 **** } ! GAMETYPE_RPC_S2C(GameType, s2cSyncMessagesComplete, (U32 sequence)) { c2sSyncMessagesComplete(sequence); } ! GAMETYPE_RPC_C2S(GameType, c2sSyncMessagesComplete, (U32 sequence)) { GameConnection *source = (GameConnection *) getRPCSourceConnection(); --- 905,914 ---- } ! GAMETYPE_RPC_S2C(GameType, s2cSyncMessagesComplete, (U32 sequence), (sequence)) { c2sSyncMessagesComplete(sequence); } ! GAMETYPE_RPC_C2S(GameType, c2sSyncMessagesComplete, (U32 sequence), (sequence)) { GameConnection *source = (GameConnection *) getRPCSourceConnection(); *************** *** 919,923 **** } ! GAMETYPE_RPC_S2C(GameType, s2cAddBarriers, (const Vector<F32> &barrier, F32 width)) { if(!barrier.size()) --- 919,923 ---- } ! GAMETYPE_RPC_S2C(GameType, s2cAddBarriers, (Vector<F32> barrier, F32 width), (barrier, width)) { if(!barrier.size()) *************** *** 927,931 **** } ! GAMETYPE_RPC_C2S(GameType, c2sSendChat, (bool global, const char *message)) { GameConnection *source = (GameConnection *) getRPCSourceConnection(); --- 927,931 ---- } ! GAMETYPE_RPC_C2S(GameType, c2sSendChat, (bool global, StringPtr message), (global, message)) { GameConnection *source = (GameConnection *) getRPCSourceConnection(); *************** *** 938,942 **** } ! GAMETYPE_RPC_C2S(GameType, c2sSendChatSTE, (bool global, StringTableEntryRef message)) { GameConnection *source = (GameConnection *) getRPCSourceConnection(); --- 938,942 ---- } ! GAMETYPE_RPC_C2S(GameType, c2sSendChatSTE, (bool global, StringTableEntry message), (global, message)) { GameConnection *source = (GameConnection *) getRPCSourceConnection(); *************** *** 967,978 **** extern Color gTeamChatColor; ! GAMETYPE_RPC_S2C(GameType, s2cDisplayChatMessage, (bool global, StringTableEntryRef clientName, const char *message)) { Color theColor = global ? gGlobalChatColor : gTeamChatColor; ! gGameUserInterface.displayMessage(theColor, "%s: %s", clientName.getString(), message); } ! GAMETYPE_RPC_S2C(GameType, s2cDisplayChatMessageSTE, (bool global, StringTableEntryRef clientName, StringTableEntryRef message)) { Color theColor = global ? gGlobalChatColor : gTeamChatColor; --- 967,978 ---- extern Color gTeamChatColor; ! GAMETYPE_RPC_S2C(GameType, s2cDisplayChatMessage, (bool global, StringTableEntry clientName, StringPtr message), (global, clientName, message)) { Color theColor = global ? gGlobalChatColor : gTeamChatColor; ! gGameUserInterface.displayMessage(theColor, "%s: %s", clientName.getString(), message.getString()); } ! GAMETYPE_RPC_S2C(GameType, s2cDisplayChatMessageSTE, (bool global, StringTableEntry clientName, StringTableEntry message), (global, clientName, message)) { Color theColor = global ? gGlobalChatColor : gTeamChatColor; *************** *** 981,985 **** } ! GAMETYPE_RPC_C2S(GameType, c2sRequestScoreboardUpdates, (bool updates)) { GameConnection *source = (GameConnection *) getRPCSourceConnection(); --- 981,985 ---- } ! GAMETYPE_RPC_C2S(GameType, c2sRequestScoreboardUpdates, (bool updates), (updates)) { GameConnection *source = (GameConnection *) getRPCSourceConnection(); *************** *** 990,994 **** } ! GAMETYPE_RPC_C2S(GameType, c2sAdvanceWeapon, ()) { GameConnection *source = (GameConnection *) getRPCSourceConnection(); --- 990,994 ---- } ! GAMETYPE_RPC_C2S(GameType, c2sAdvanceWeapon, (), ()) { GameConnection *source = (GameConnection *) getRPCSourceConnection(); *************** *** 1020,1026 **** } ! TNL_DECLARE_MEMBER_ENUM(GameType, MaxPing); ! ! GAMETYPE_RPC_S2C(GameType, s2cScoreboardUpdate, (const Vector<RangedU32<0, GameType::MaxPing> > &pingTimes, const Vector<SignedInt<24> > &scores)) { for(S32 i = 0; i < mClientList.size(); i++) --- 1020,1024 ---- } ! GAMETYPE_RPC_S2C(GameType, s2cScoreboardUpdate, (Vector<RangedU32<0, GameType::MaxPing> > pingTimes, Vector<SignedInt<24> > scores), (pingTimes, scores)) { for(S32 i = 0; i < mClientList.size(); i++) *************** *** 1034,1038 **** } ! GAMETYPE_RPC_S2C(GameType, s2cKillMessage, (StringTableEntryRef victim, StringTableEntryRef killer)) { gGameUserInterface.displayMessage(Color(1.0f, 1.0f, 0.8f), --- 1032,1036 ---- } ! GAMETYPE_RPC_S2C(GameType, s2cKillMessage, (StringTableEntry victim, StringTableEntry killer), (victim, killer)) { gGameUserInterface.displayMessage(Color(1.0f, 1.0f, 0.8f), *************** *** 1040,1044 **** } ! TNL_IMPLEMENT_NETOBJECT_RPC(GameType, c2sVoiceChat, (bool echo, ByteBufferRef voiceBuffer), NetClassGroupGameMask, RPCUnguaranteed, RPCToGhostParent, 0) { --- 1038,1042 ---- } ! TNL_IMPLEMENT_NETOBJECT_RPC(GameType, c2sVoiceChat, (bool echo, ByteBufferPtr voiceBuffer), (echo, voiceBuffer), NetClassGroupGameMask, RPCUnguaranteed, RPCToGhostParent, 0) { *************** *** 1059,1063 **** } ! TNL_IMPLEMENT_NETOBJECT_RPC(GameType, s2cVoiceChat, (StringTableEntryRef clientName, ByteBufferRef voiceBuffer), NetClassGroupGameMask, RPCUnguaranteed, RPCToGhost, 0) { --- 1057,1061 ---- } ! TNL_IMPLEMENT_NETOBJECT_RPC(GameType, s2cVoiceChat, (StringTableEntry clientName, ByteBufferPtr voiceBuffer), (clientName, voiceBuffer), NetClassGroupGameMask, RPCUnguaranteed, RPCToGhost, 0) { *************** *** 1065,1069 **** if(cl) { ! ByteBufferPtr playBuffer = cl->decoder->decompressBuffer(voiceBuffer); //logprintf("Decoded buffer size %d", playBuffer->getBufferSize()); --- 1063,1067 ---- if(cl) { ! ByteBufferPtr playBuffer = cl->decoder->decompressBuffer(*(voiceBuffer.getPointer())); //logprintf("Decoded buffer size %d", playBuffer->getBufferSize()); Index: soccerGame.cpp =================================================================== RCS file: /cvsroot/opentnl/tnl/zap/soccerGame.cpp,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** soccerGame.cpp 5 Oct 2004 00:16:34 -0000 1.20 --- soccerGame.cpp 22 Feb 2005 09:46:39 -0000 1.21 *************** *** 42,46 **** TNL_IMPLEMENT_NETOBJECT(SoccerGameType); ! TNL_IMPLEMENT_NETOBJECT_RPC(SoccerGameType, s2cSoccerScoreMessage, (U32 msgIndex, StringTableEntryRef clientName, U32 teamIndex), NetClassGroupGameMask, RPCGuaranteedOrdered, RPCToGhost, 0) { --- 42,47 ---- TNL_IMPLEMENT_NETOBJECT(SoccerGameType); ! TNL_IMPLEMENT_NETOBJECT_RPC(SoccerGameType, s2cSoccerScoreMessage, ! (U32 msgIndex, StringTableEntry clientName, U32 teamIndex), (msgIndex, clientName, teamIndex), NetClassGroupGameMask, RPCGuaranteedOrdered, RPCToGhost, 0) { Index: UIGame.cpp =================================================================== RCS file: /cvsroot/opentnl/tnl/zap/UIGame.cpp,v retrieving revision 1.50 retrieving revision 1.51 diff -C2 -d -r1.50 -r1.51 *** UIGame.cpp 19 Oct 2004 22:19:39 -0000 1.50 --- UIGame.cpp 22 Feb 2005 09:46:25 -0000 1.51 *************** *** 828,832 **** GameType *gt = gClientGame->getGameType(); if(gt) ! gt->c2sVoiceChat(OptionsMenuUserInterface::echoVoice, *(sendBuffer.getPointer())); } } --- 828,832 ---- GameType *gt = gClientGame->getGameType(); if(gt) ! gt->c2sVoiceChat(OptionsMenuUserInterface::echoVoice, sendBuffer); } } Index: masterConnection.cpp =================================================================== RCS file: /cvsroot/opentnl/tnl/zap/masterConnection.cpp,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** masterConnection.cpp 6 Aug 2004 00:02:47 -0000 1.13 --- masterConnection.cpp 22 Feb 2005 09:46:36 -0000 1.14 *************** *** 51,55 **** } ! TNL_IMPLEMENT_RPC_OVERRIDE(MasterServerConnection, m2cQueryGameTypesResponse, (U32 queryId, const Vector<StringTableEntry> &gameTypes, const Vector<StringTableEntry> &missionTypes)) { // Ignore old queries... --- 51,55 ---- } ! TNL_IMPLEMENT_RPC_OVERRIDE(MasterServerConnection, m2cQueryGameTypesResponse, (U32 queryId, Vector<StringTableEntry> gameTypes, Vector<StringTableEntry> missionTypes)) { // Ignore old queries... *************** *** 77,81 **** } ! TNL_IMPLEMENT_RPC_OVERRIDE(MasterServerConnection, m2cQueryServersResponse, (U32 queryId, const Vector<IPAddress> &ipList)) { // Only process results from current query... --- 77,81 ---- } ! TNL_IMPLEMENT_RPC_OVERRIDE(MasterServerConnection, m2cQueryServersResponse, (U32 queryId, Vector<IPAddress> ipList)) { // Only process results from current query... *************** *** 97,105 **** c2mRequestArrangedConnection(mCurrentQueryId, remoteAddress.toIPAddress(), getInterface()->getFirstBoundInterfaceAddress().toIPAddress(), ! ByteBuffer((U8 *) "ZAP!", 5)); } ! TNL_IMPLEMENT_RPC_OVERRIDE(MasterServerConnection, m2cClientRequestedArrangedConnection, (U32 requestId, const Vector<IPAddress> &possibleAddresses, ! ByteBufferRef connectionParameters)) { if(!mIsGameServer) --- 97,105 ---- c2mRequestArrangedConnection(mCurrentQueryId, remoteAddress.toIPAddress(), getInterface()->getFirstBoundInterfaceAddress().toIPAddress(), ! new ByteBuffer((U8 *) "ZAP!", 5)); } ! TNL_IMPLEMENT_RPC_OVERRIDE(MasterServerConnection, m2cClientRequestedArrangedConnection, (U32 requestId, Vector<IPAddress> possibleAddresses, ! ByteBufferPtr connectionParameters)) { if(!mIsGameServer) *************** *** 123,129 **** // Ok, let's do the arranged connection! U8 data[Nonce::NonceSize * 2 + SymmetricCipher::KeySize * 2]; - ByteBuffer b(data, sizeof(data)); Random::read(data, sizeof(data)); IPAddress localAddress = getInterface()->getFirstBoundInterfaceAddress().toIPAddress(); c2mAcceptArrangedConnection(requestId, localAddress, b); --- 123,130 ---- // Ok, let's do the arranged connection! U8 data[Nonce::NonceSize * 2 + SymmetricCipher::KeySize * 2]; Random::read(data, sizeof(data)); IPAddress localAddress = getInterface()->getFirstBoundInterfaceAddress().toIPAddress(); + ByteBufferPtr b = new ByteBuffer(data, sizeof(data)); + b->takeOwnership(); c2mAcceptArrangedConnection(requestId, localAddress, b); *************** *** 133,141 **** logprintf("Accepting arranged connection from %s", Address(fullPossibleAddresses[0]).toString()); ! logprintf(" Generated shared secret data: %s", b.encodeBase64()->getBuffer()); ByteBufferPtr theSharedData = new ByteBuffer(data + 2 * Nonce::NonceSize, sizeof(data) - 2 * Nonce::NonceSize); Nonce nonce(data); Nonce serverNonce(data + Nonce::NonceSize); conn->connectArranged(getInterface(), fullPossibleAddresses, --- 134,143 ---- logprintf("Accepting arranged connection from %s", Address(fullPossibleAddresses[0]).toString()); ! logprintf(" Generated shared secret data: %s", b->encodeBase64()->getBuffer()); ByteBufferPtr theSharedData = new ByteBuffer(data + 2 * Nonce::NonceSize, sizeof(data) - 2 * Nonce::NonceSize); Nonce nonce(data); Nonce serverNonce(data + Nonce::NonceSize); + theSharedData->takeOwnership(); conn->connectArranged(getInterface(), fullPossibleAddresses, *************** *** 143,152 **** } ! TNL_IMPLEMENT_RPC_OVERRIDE(MasterServerConnection, m2cArrangedConnectionAccepted, (U32 requestId, const Vector<IPAddress> &possibleAddresses, ByteBufferRef connectionData)) { ! if(!mIsGameServer && requestId == mCurrentQueryId && connectionData.getBufferSize() >= Nonce::NonceSize * 2 + SymmetricCipher::KeySize * 2) { logprintf("Remote host accepted arranged connection."); ! logprintf(" Shared secret data: %s", connectionData.encodeBase64()->getBuffer()); Vector<Address> fullPossibleAddresses; --- 145,154 ---- } ! TNL_IMPLEMENT_RPC_OVERRIDE(MasterServerConnection, m2cArrangedConnectionAccepted, (U32 requestId, Vector<IPAddress> possibleAddresses, ByteBufferPtr connectionData)) { ! if(!mIsGameServer && requestId == mCurrentQueryId && connectionData->getBufferSize() >= Nonce::NonceSize * 2 + SymmetricCipher::KeySize * 2) { logprintf("Remote host accepted arranged connection."); ! logprintf(" Shared secret data: %s", connectionData->encodeBase64()->getBuffer()); Vector<Address> fullPossibleAddresses; *************** *** 156,165 **** ByteBufferPtr theSharedData = new ByteBuffer( ! (U8 *) connectionData.getBuffer() + Nonce::NonceSize * 2, ! connectionData.getBufferSize() - Nonce::NonceSize * 2 ); ! Nonce nonce(connectionData.getBuffer()); ! Nonce serverNonce(connectionData.getBuffer() + Nonce::NonceSize); GameConnection *conn = new GameConnection(); --- 158,167 ---- ByteBufferPtr theSharedData = new ByteBuffer( ! (U8 *) connectionData->getBuffer() + Nonce::NonceSize * 2, ! connectionData->getBufferSize() - Nonce::NonceSize * 2 ); ! Nonce nonce(connectionData->getBuffer()); ! Nonce serverNonce(connectionData->getBuffer() + Nonce::NonceSize); GameConnection *conn = new GameConnection(); *************** *** 177,181 **** } ! TNL_IMPLEMENT_RPC_OVERRIDE(MasterServerConnection, m2cArrangedConnectionRejected, (U32 requestId, ByteBufferRef rejectData)) { if(!mIsGameServer && requestId == mCurrentQueryId) --- 179,183 ---- } ! TNL_IMPLEMENT_RPC_OVERRIDE(MasterServerConnection, m2cArrangedConnectionRejected, (U32 requestId, ByteBufferPtr rejectData)) { if(!mIsGameServer && requestId == mCurrentQueryId) *************** *** 187,191 **** } ! TNL_IMPLEMENT_RPC_OVERRIDE(MasterServerConnection, m2cSetMOTD, (const char *motdString)) { gMainMenuUserInterface.setMOTD(motdString); --- 189,193 ---- } ! TNL_IMPLEMENT_RPC_OVERRIDE(MasterServerConnection, m2cSetMOTD, (StringPtr motdString)) { gMainMenuUserInterface.setMOTD(motdString); Index: huntersGame.h =================================================================== RCS file: /cvsroot/opentnl/tnl/zap/huntersGame.h,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** huntersGame.h 8 Oct 2004 00:17:47 -0000 1.6 --- huntersGame.h 22 Feb 2005 09:46:34 -0000 1.7 *************** *** 86,90 **** TNL_DECLARE_RPC(s2cAddYardSaleWaypoint, (F32 x, F32 y)); TNL_DECLARE_RPC(s2cSetNexusTimer, (U32 nexusTime, bool canCap)); ! TNL_DECLARE_RPC(s2cHuntersMessage, (U32 msgIndex, StringTableEntryRef clientName, U32 flagCount)); TNL_DECLARE_CLASS(HuntersGameType); }; --- 86,90 ---- TNL_DECLARE_RPC(s2cAddYardSaleWaypoint, (F32 x, F32 y)); TNL_DECLARE_RPC(s2cSetNexusTimer, (U32 nexusTime, bool canCap)); ! TNL_DECLARE_RPC(s2cHuntersMessage, (U32 msgIndex, StringTableEntry clientName, U32 flagCount)); TNL_DECLARE_CLASS(HuntersGameType); }; Index: rabbitGame.h =================================================================== RCS file: /cvsroot/opentnl/tnl/zap/rabbitGame.h,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** rabbitGame.h 4 Aug 2004 18:25:27 -0000 1.6 --- rabbitGame.h 22 Feb 2005 09:46:37 -0000 1.7 *************** *** 96,100 **** const char *getInstructionString() { return "Grab the flag and hold it for as long as you can!"; } ! TNL_DECLARE_RPC(s2cRabbitMessage, (U32 msgIndex, StringTableEntryRef clientName)); TNL_DECLARE_CLASS(RabbitGameType); }; --- 96,100 ---- const char *getInstructionString() { return "Grab the flag and hold it for as long as you can!"; } ! TNL_DECLARE_RPC(s2cRabbitMessage, (U32 msgIndex, StringTableEntry clientName)); TNL_DECLARE_CLASS(RabbitGameType); }; Index: gameConnection.cpp =================================================================== RCS file: /cvsroot/opentnl/tnl/zap/gameConnection.cpp,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** gameConnection.cpp 6 Aug 2004 00:02:47 -0000 1.25 --- gameConnection.cpp 22 Feb 2005 09:46:33 -0000 1.26 *************** *** 93,97 **** } ! TNL_IMPLEMENT_RPC(GameConnection, c2sAdminPassword, (const char *pass), NetClassGroupGameMask, RPCGuaranteedOrdered, RPCDirClientToServer, 1) { if(gAdminPassword && !strcmp(gAdminPassword, pass)) --- 93,97 ---- } ! TNL_IMPLEMENT_RPC(GameConnection, c2sAdminPassword, (StringPtr pass), (pass), NetClassGroupGameMask, RPCGuaranteedOrdered, RPCDirClientToServer, 1) { if(gAdminPassword && !strcmp(gAdminPassword, pass)) *************** *** 104,108 **** } ! TNL_IMPLEMENT_RPC(GameConnection, c2sAdminPlayerAction, (StringTableEntryRef playerName, U32 actionIndex), NetClassGroupGameMask, RPCGuaranteedOrdered, RPCDirClientToServer, 1) { if(isAdmin()) --- 104,110 ---- } ! TNL_IMPLEMENT_RPC(GameConnection, c2sAdminPlayerAction, ! (StringTableEntry playerName, U32 actionIndex), (playerName, actionIndex), ! NetClassGroupGameMask, RPCGuaranteedOrdered, RPCDirClientToServer, 1) { if(isAdmin()) *************** *** 157,176 **** } ! TNL_IMPLEMENT_RPC(GameConnection, s2cSetIsAdmin, (), NetClassGroupGameMask, RPCGuaranteedOrdered, RPCDirServerToClient, 1) { setIsAdmin(true); } ! TNL_IMPLEMENT_RPC(GameConnection, c2sRequestCommanderMap, (), NetClassGroupGameMask, RPCGuaranteedOrdered, RPCDirClientToServer, 1) { mInCommanderMap = true; } ! TNL_IMPLEMENT_RPC(GameConnection, c2sReleaseCommanderMap, (), NetClassGroupGameMask, RPCGuaranteedOrdered, RPCDirClientToServer, 1) { mInCommanderMap = false; } ! TNL_IMPLEMENT_RPC(GameConnection, c2sRequestLoadout, (const Vector<U32> &loadout), NetClassGroupGameMask, RPCGuaranteedOrdered, RPCDirClientToServer, 1) { mLoadout = loadout; --- 159,181 ---- } ! TNL_IMPLEMENT_RPC(GameConnection, s2cSetIsAdmin, (), (), ! NetClassGroupGameMask, RPCGuaranteedOrdered, RPCDirServerToClient, 1) { setIsAdmin(true); } ! TNL_IMPLEMENT_RPC(GameConnection, c2sRequestCommanderMap, (), (), ! NetClassGroupGameMask, RPCGuaranteedOrdered, RPCDirClientToServer, 1) { mInCommanderMap = true; } ! TNL_IMPLEMENT_RPC(GameConnection, c2sReleaseCommanderMap, (), (), ! NetClassGroupGameMask, RPCGuaranteedOrdered, RPCDirClientToServer, 1) { mInCommanderMap = false; } ! TNL_IMPLEMENT_RPC(GameConnection, c2sRequestLoadout, (Vector<U32> loadout), (loadout), NetClassGroupGameMask, RPCGuaranteedOrdered, RPCDirClientToServer, 1) { mLoadout = loadout; *************** *** 180,186 **** } - TNL_DECLARE_MEMBER_ENUM(GameConnection, ColorCount); - TNL_DECLARE_ENUM(NumSFXBuffers); - static void displayMessage(U32 colorIndex, U32 sfxEnum, const char *message) { --- 185,188 ---- *************** *** 201,206 **** TNL_IMPLEMENT_RPC(GameConnection, s2cDisplayMessageESI, ! (RangedU32<0, GameConnection::ColorCount> color, RangedU32<0, NumSFXBuffers> sfx, StringTableEntryRef formatString, ! const Vector<StringTableEntry> &e, const Vector<const char *> &s, const Vector<S32> &i), NetClassGroupGameMask, RPCGuaranteedOrdered, RPCDirServerToClient, 1) { --- 203,209 ---- TNL_IMPLEMENT_RPC(GameConnection, s2cDisplayMessageESI, ! (RangedU32<0, GameConnection::ColorCount> color, RangedU32<0, NumSFXBuffers> sfx, StringTableEntry formatString, ! Vector<StringTableEntry> e, Vector<StringPtr> s, Vector<S32> i), ! (color, sfx, formatString, e, s, i), NetClassGroupGameMask, RPCGuaranteedOrdered, RPCDirServerToClient, 1) { *************** *** 221,225 **** case 's': if(index < s.size()) ! pos += dSprintf(outputBuffer + pos, 256 - pos, "%s", s[index]); break; case 'i': --- 224,228 ---- case 's': if(index < s.size()) ! pos += dSprintf(outputBuffer + pos, 256 - pos, "%s", s[index].getString()); break; case 'i': *************** *** 241,246 **** TNL_IMPLEMENT_RPC(GameConnection, s2cDisplayMessageE, ! (RangedU32<0, GameConnection::ColorCount> color, RangedU32<0, NumSFXBuffers> sfx, StringTableEntryRef formatString, ! const Vector<StringTableEntry> &e), NetClassGroupGameMask, RPCGuaranteedOrdered, RPCDirServerToClient, 1) { --- 244,249 ---- TNL_IMPLEMENT_RPC(GameConnection, s2cDisplayMessageE, ! (RangedU32<0, GameConnection::ColorCount> color, RangedU32<0, NumSFXBuffers> sfx, StringTableEntry formatString, ! Vector<StringTableEntry> e), (color, sfx, formatString, e), NetClassGroupGameMask, RPCGuaranteedOrdered, RPCDirServerToClient, 1) { *************** *** 273,277 **** TNL_IMPLEMENT_RPC(GameConnection, s2cDisplayMessage, ! (RangedU32<0, GameConnection::ColorCount> color, RangedU32<0, NumSFXBuffers> sfx, StringTableEntryRef formatString), NetClassGroupGameMask, RPCGuaranteedOrdered, RPCDirServerToClient, 1) { --- 276,281 ---- TNL_IMPLEMENT_RPC(GameConnection, s2cDisplayMessage, ! (RangedU32<0, GameConnection::ColorCount> color, RangedU32<0, NumSFXBuffers> sfx, StringTableEntry formatString), ! (color, sfx, formatString), NetClassGroupGameMask, RPCGuaranteedOrdered, RPCDirServerToClient, 1) { *************** *** 291,295 **** ! TNL_IMPLEMENT_RPC(GameConnection, s2cAddLevel, (StringTableEntryRef name, StringTableEntryRef type), NetClassGroupGameMask, RPCGuaranteedOrdered, RPCDirServerToClient, 1) { --- 295,299 ---- ! TNL_IMPLEMENT_RPC(GameConnection, s2cAddLevel, (StringTableEntry name, StringTableEntry type), (name, type), NetClassGroupGameMask, RPCGuaranteedOrdered, RPCDirServerToClient, 1) { *************** *** 298,302 **** } ! TNL_IMPLEMENT_RPC(GameConnection, c2sRequestLevelChange, (S32 newLevelIndex), NetClassGroupGameMask, RPCGuaranteedOrdered, RPCDirClientToServer, 1) { if(mIsAdmin) --- 302,306 ---- } ! TNL_IMPLEMENT_RPC(GameConnection, c2sRequestLevelChange, (S32 newLevelIndex), (newLevelIndex), NetClassGroupGameMask, RPCGuaranteedOrdered, RPCDirClientToServer, 1) { if(mIsAdmin) Index: footballGame.cpp =================================================================== RCS file: /cvsroot/opentnl/tnl/zap/footballGame.cpp,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** footballGame.cpp 5 Oct 2004 23:41:59 -0000 1.14 --- footballGame.cpp 22 Feb 2005 09:46:32 -0000 1.15 *************** *** 76,80 **** TNL_IMPLEMENT_NETOBJECT(ZoneControlGameType); ! GAMETYPE_RPC_S2C(ZoneControlGameType, s2cSetFlagTeam, (S32 flagTeam)) { mFlagTeam = flagTeam; --- 76,80 ---- TNL_IMPLEMENT_NETOBJECT(ZoneControlGameType); ! GAMETYPE_RPC_S2C(ZoneControlGameType, s2cSetFlagTeam, (S32 flagTeam), (flagTeam)) { mFlagTeam = flagTeam; Index: huntersGame.cpp =================================================================== RCS file: /cvsroot/opentnl/tnl/zap/huntersGame.cpp,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** huntersGame.cpp 8 Oct 2004 00:17:47 -0000 1.12 --- huntersGame.cpp 22 Feb 2005 09:46:34 -0000 1.13 *************** *** 40,44 **** ! TNL_IMPLEMENT_NETOBJECT_RPC(HuntersGameType, s2cSetNexusTimer, (U32 nexusTime, bool canCap), NetClassGroupGameMask, RPCGuaranteedOrdered, RPCToGhost, 0) { --- 40,45 ---- ! TNL_IMPLEMENT_NETOBJECT_RPC(HuntersGameType, s2cSetNexusTimer, ! (U32 nexusTime, bool canCap), (nexusTime, canCap), NetClassGroupGameMask, RPCGuaranteedOrdered, RPCToGhost, 0) { *************** *** 47,51 **** } ! GAMETYPE_RPC_S2C(HuntersGameType, s2cAddYardSaleWaypoint, (F32 x, F32 y)) { YardSaleWaypoint w; --- 48,52 ---- } ! GAMETYPE_RPC_S2C(HuntersGameType, s2cAddYardSaleWaypoint, (F32 x, F32 y), (x, y)) { YardSaleWaypoint w; *************** *** 55,59 **** } ! TNL_IMPLEMENT_NETOBJECT_RPC(HuntersGameType, s2cHuntersMessage, (U32 msgIndex, StringTableEntryRef clientName, U32 flagCount), NetClassGroupGameMask, RPCGuaranteedOrdered, RPCToGhost, 0) { --- 56,61 ---- } ! TNL_IMPLEMENT_NETOBJECT_RPC(HuntersGameType, s2cHuntersMessage, ! (U32 msgIndex, StringTableEntry clientName, U32 flagCount), (msgIndex, clientName, flagCount), NetClassGroupGameMask, RPCGuaranteedOrdered, RPCToGhost, 0) { Index: gameType.h =================================================================== RCS file: /cvsroot/opentnl/tnl/zap/gameType.h,v retrieving revision 1.39 retrieving revision 1.40 diff -C2 -d -r1.39 -r1.40 *** gameType.h 18 Oct 2004 00:09:22 -0000 1.39 --- gameType.h 22 Feb 2005 09:46:33 -0000 1.40 *************** *** 187,195 **** void onGhostAvailable(GhostConnection *theConnection); ! TNL_DECLARE_RPC(s2cSetLevelInfo, (StringTableEntryRef levelName, StringTableEntryRef levelDesc)); ! TNL_DECLARE_RPC(s2cAddBarriers, (const Vector<F32> &barrier, F32 width)); ! TNL_DECLARE_RPC(s2cAddTeam, (StringTableEntryRef teamName, F32 r, F32 g, F32 b)); ! TNL_DECLARE_RPC(s2cAddClient, (StringTableEntryRef clientName, bool isMyClient)); ! TNL_DECLARE_RPC(s2cClientJoinedTeam, (StringTableEntryRef clientName, U32 teamIndex)); TNL_DECLARE_RPC(s2cSyncMessagesComplete, (U32 sequence)); --- 187,195 ---- void onGhostAvailable(GhostConnection *theConnection); ! TNL_DECLARE_RPC(s2cSetLevelInfo, (StringTableEntry levelName, StringTableEntry levelDesc)); ! TNL_DECLARE_RPC(s2cAddBarriers, (Vector<F32> barrier, F32 width)); ! TNL_DECLARE_RPC(s2cAddTeam, (StringTableEntry teamName, F32 r, F32 g, F32 b)); ! TNL_DECLARE_RPC(s2cAddClient, (StringTableEntry clientName, bool isMyClient)); ! TNL_DECLARE_RPC(s2cClientJoinedTeam, (StringTableEntry clientName, U32 teamIndex)); TNL_DECLARE_RPC(s2cSyncMessagesComplete, (U32 sequence)); *************** *** 199,203 **** TNL_DECLARE_RPC(s2cSetTimeRemaining, (U32 timeLeft)); ! TNL_DECLARE_RPC(s2cRemoveClient, (StringTableEntryRef clientName)); void setTeamScore(S32 teamIndex, S32 newScore); --- 199,203 ---- TNL_DECLARE_RPC(s2cSetTimeRemaining, (U32 timeLeft)); ! TNL_DECLARE_RPC(s2cRemoveClient, (StringTableEntry clientName)); void setTeamScore(S32 teamIndex, S32 newScore); *************** *** 205,209 **** TNL_DECLARE_RPC(c2sRequestScoreboardUpdates, (bool updates)); ! TNL_DECLARE_RPC(s2cScoreboardUpdate, (const Vector<RangedU32<0, MaxPing> > &pingTimes, const Vector<SignedInt<24> > &scores)); virtual void updateClientScoreboard(ClientRef *theClient); --- 205,209 ---- TNL_DECLARE_RPC(c2sRequestScoreboardUpdates, (bool updates)); ! TNL_DECLARE_RPC(s2cScoreboardUpdate, (Vector<RangedU32<0, MaxPing> > pingTimes, Vector<SignedInt<24> > scores)); virtual void updateClientScoreboard(ClientRef *theClient); *************** *** 215,236 **** void sendChatDisplayEvent(ClientRef *cl, bool global, NetEvent *theEvent); ! TNL_DECLARE_RPC(c2sSendChat, (bool global, const char *message)); ! TNL_DECLARE_RPC(c2sSendChatSTE, (bool global, StringTableEntryRef ste)); ! TNL_DECLARE_RPC(s2cDisplayChatMessage, (bool global, StringTableEntryRef clientName, const char *message)); ! TNL_DECLARE_RPC(s2cDisplayChatMessageSTE, (bool global, StringTableEntryRef clientName, StringTableEntryRef message)); ! TNL_DECLARE_RPC(s2cKillMessage, (StringTableEntryRef victim, StringTableEntryRef killer)); ! TNL_DECLARE_RPC(c2sVoiceChat, (bool echo, ByteBufferRef compressedVoice)); ! TNL_DECLARE_RPC(s2cVoiceChat, (StringTableEntryRef client, ByteBufferRef compressedVoice)); TNL_DECLARE_CLASS(GameType); }; ! #define GAMETYPE_RPC_S2C(className, methodName, args) \ ! TNL_IMPLEMENT_NETOBJECT_RPC(className, methodName, args, NetClassGroupGameMask, RPCGuaranteedOrdered, RPCToGhost, 0) ! #define GAMETYPE_RPC_C2S(className, methodName, args) \ ! TNL_IMPLEMENT_NETOBJECT_RPC(className, methodName, args, NetClassGroupGameMask, RPCGuaranteedOrdered, RPCToGhostParent, 0) --- 215,236 ---- void sendChatDisplayEvent(ClientRef *cl, bool global, NetEvent *theEvent); ! TNL_DECLARE_RPC(c2sSendChat, (bool global, StringPtr message)); ! TNL_DECLARE_RPC(c2sSendChatSTE, (bool global, StringTableEntry ste)); ! TNL_DECLARE_RPC(s2cDisplayChatMessage, (bool global, StringTableEntry clientName, StringPtr message)); ! TNL_DECLARE_RPC(s2cDisplayChatMessageSTE, (bool global, StringTableEntry clientName, StringTableEntry message)); ! TNL_DECLARE_RPC(s2cKillMessage, (StringTableEntry victim, StringTableEntry killer)); ! TNL_DECLARE_RPC(c2sVoiceChat, (bool echo, ByteBufferPtr compressedVoice)); ! TNL_DECLARE_RPC(s2cVoiceChat, (StringTableEntry client, ByteBufferPtr compressedVoice)); TNL_DECLARE_CLASS(GameType); }; ! #define GAMETYPE_RPC_S2C(className, methodName, args, argNames) \ ! TNL_IMPLEMENT_NETOBJECT_RPC(className, methodName, args, argNames, NetClassGroupGameMask, RPCGuaranteedOrdered, RPCToGhost, 0) ! #define GAMETYPE_RPC_C2S(className, methodName, args, argNames) \ ! TNL_IMPLEMENT_NETOBJECT_RPC(className, methodName, args, argNames, NetClassGroupGameMask, RPCGuaranteedOrdered, RPCToGhostParent, 0) Index: gameConnection.h =================================================================== RCS file: /cvsroot/opentnl/tnl/zap/gameConnection.h,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** gameConnection.h 2 Aug 2004 18:11:54 -0000 1.19 --- gameConnection.h 22 Feb 2005 09:46:33 -0000 1.20 *************** *** 93,99 **** bool isAdmin() { return mIsAdmin; } void setIsAdmin(bool admin) { mIsAdmin = admin; } ! TNL_DECLARE_RPC(c2sAdminPassword, (const char *pass)); TNL_DECLARE_RPC(s2cSetIsAdmin, ()); ! TNL_DECLARE_RPC(c2sAdminPlayerAction, (StringTableEntryRef playerName, U32 actionIndex)); bool isInCommanderMap() { return mInCommanderMap; } --- 93,99 ---- bool isAdmin() { return mIsAdmin; } void setIsAdmin(bool admin) { mIsAdmin = admin; } ! TNL_DECLARE_RPC(c2sAdminPassword, (StringPtr pass)); TNL_DECLARE_RPC(s2cSetIsAdmin, ()); ! TNL_DECLARE_RPC(c2sAdminPlayerAction, (StringTableEntry playerName, U32 actionIndex)); bool isInCommanderMap() { return mInCommanderMap; } *************** *** 101,112 **** TNL_DECLARE_RPC(c2sReleaseCommanderMap, ()); ! TNL_DECLARE_RPC(c2sRequestLoadout, (const Vector<U32> &loadout)); ! TNL_DECLARE_RPC(s2cDisplayMessageESI, (RangedU32<0, ColorCount> color, RangedU32<0, NumSFXBuffers> sfx, StringTableEntryRef formatString, ! const Vector<StringTableEntry> &e, const Vector<const char *> &s, const Vector<S32> &i)); ! TNL_DECLARE_RPC(s2cDisplayMessageE, (RangedU32<0, ColorCount> color, RangedU32<0, NumSFXBuffers> sfx, StringTableEntryRef formatString, ! const Vector<StringTableEntry> &e)); ! TNL_DECLARE_RPC(s2cDisplayMessage, (RangedU32<0, ColorCount> color, RangedU32<0, NumSFXBuffers> sfx, StringTableEntryRef formatString)); ! TNL_DECLARE_RPC(s2cAddLevel, (StringTableEntryRef name, StringTableEntryRef type)); TNL_DECLARE_RPC(c2sRequestLevelChange, (S32 newLevelIndex)); --- 101,112 ---- TNL_DECLARE_RPC(c2sReleaseCommanderMap, ()); ! TNL_DECLARE_RPC(c2sRequestLoadout, (Vector<U32> loadout)); ! TNL_DECLARE_RPC(s2cDisplayMessageESI, (RangedU32<0, ColorCount> color, RangedU32<0, NumSFXBuffers> sfx, StringTableEntry formatString, ! Vector<StringTableEntry> e, Vector<StringPtr> s, Vector<S32> i)); ! TNL_DECLARE_RPC(s2cDisplayMessageE, (RangedU32<0, ColorCount> color, RangedU32<0, NumSFXBuffers> sfx, StringTableEntry formatString, ! Vector<StringTableEntry> e)); ! TNL_DECLARE_RPC(s2cDisplayMessage, (RangedU32<0, ColorCount> color, RangedU32<0, NumSFXBuffers> sfx, StringTableEntry formatString)); ! TNL_DECLARE_RPC(s2cAddLevel, (StringTableEntry name, StringTableEntry type)); TNL_DECLARE_RPC(c2sRequestLevelChange, (S32 newLevelIndex)); Index: soccerGame.h =================================================================== RCS file: /cvsroot/opentnl/tnl/zap/soccerGame.h,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** soccerGame.h 5 Oct 2004 00:16:34 -0000 1.12 --- soccerGame.h 22 Feb 2005 09:46:39 -0000 1.13 *************** *** 63,67 **** virtual const char *getInstructionString() { return "Push the ball into the opposing team's goal."; } ! TNL_DECLARE_RPC(s2cSoccerScoreMessage, (U32 msgIndex, StringTableEntryRef clientName, U32 teamIndex)); TNL_DECLARE_CLASS(SoccerGameType); }; --- 63,67 ---- virtual const char *getInstructionString() { return "Push the ball into the opposing team's goal."; } ! TNL_DECLARE_RPC(s2cSoccerScoreMessage, (U32 msgIndex, StringTableEntry clientName, U32 teamIndex)); TNL_DECLARE_CLASS(SoccerGameType); }; Index: masterConnection.h =================================================================== RCS file: /cvsroot/opentnl/tnl/zap/masterConnection.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** masterConnection.h 3 Jul 2004 20:01:47 -0000 1.4 --- masterConnection.h 22 Feb 2005 09:46:36 -0000 1.5 *************** *** 55,65 **** void requestArrangedConnection(const Address &remoteAddress); ! TNL_DECLARE_RPC_OVERRIDE(m2cQueryGameTypesResponse, (U32 queryId, const Vector<StringTableEntry> &gameTypes, const Vector<StringTableEntry> &missionTypes)); ! TNL_DECLARE_RPC_OVERRIDE(m2cQueryServersResponse, (U32 queryId, const Vector<IPAddress> &ipList)); ! TNL_DECLARE_RPC_OVERRIDE(m2cClientRequestedArrangedConnection, (U32 requestId, const Vector<IPAddress> &possibleAddresses, ! ByteBufferRef connectionParameters)); ! TNL_DECLARE_RPC_OVERRIDE(m2cArrangedConnectionAccepted, (U32 requestId, const Vector<IPAddress> &possibleAddresses, ByteBufferRef connectionData)); ! TNL_DECLARE_RPC_OVERRIDE(m2cArrangedConnectionRejected, (U32 requestId, ByteBufferRef rejectData)); ! TNL_DECLARE_RPC_OVERRIDE(m2cSetMOTD, (const char *motdString)); void writeConnectRequest(BitStream *bstream); --- 55,65 ---- void requestArrangedConnection(const Address &remoteAddress); ! TNL_DECLARE_RPC_OVERRIDE(m2cQueryGameTypesResponse, (U32 queryId, Vector<StringTableEntry> gameTypes, Vector<StringTableEntry> missionTypes)); ! TNL_DECLARE_RPC_OVERRIDE(m2cQueryServersResponse, (U32 queryId, Vector<IPAddress> ipList)); ! TNL_DECLARE_RPC_OVERRIDE(m2cClientRequestedArrangedConnection, (U32 requestId, Vector<IPAddress> possibleAddresses, ! ByteBufferPtr connectionParameters)); ! TNL_DECLARE_RPC_OVERRIDE(m2cArrangedConnectionAccepted, (U32 requestId, Vector<IPAddress> possibleAddresses, ByteBufferPtr connectionData)); ! TNL_DECLARE_RPC_OVERRIDE(m2cArrangedConnectionRejected, (U32 requestId, ByteBufferPtr rejectData)); ! TNL_DECLARE_RPC_OVERRIDE(m2cSetMOTD, (StringPtr motdString)); void writeConnectRequest(BitStream *bstream); Index: ship.cpp =================================================================== RCS file: /cvsroot/opentnl/tnl/zap/ship.cpp,v retrieving revision 1.77 retrieving revision 1.78 diff -C2 -d -r1.77 -r1.78 *** ship.cpp 1 Oct 2004 00:21:40 -0000 1.77 --- ship.cpp 22 Feb 2005 09:46:37 -0000 1.78 *************** *** 599,603 **** { stream->writeFlag(getGame()->getCurrentTime() - getCreationTime() < 300); ! connection->packStringTableEntry(stream, mPlayerName); stream->write(mass); stream->writeRangedU32(mTeam + 1, 0, getGame()->getTeamCount()); --- 599,603 ---- { stream->writeFlag(getGame()->getCurrentTime() - getCreationTime() < 300); ! stream->writeStringTableEntry(mPlayerName); stream->write(mass); stream->writeRangedU32(mTeam + 1, 0, getGame()->getTeamCount()); *************** *** 670,674 **** playSpawnEffect = stream->readFlag(); ! mPlayerName = connection->unpackStringTableEntry(stream); stream->read(&mass); mTeam = stream->readRangedU32(0, gClientGame->getTeamCount()) - 1; --- 670,674 ---- playSpawnEffect = stream->readFlag(); ! stream->readStringTableEntry(&mPlayerName); stream->read(&mass); mTeam = stream->readRangedU32(0, gClientGame->getTeamCount()) - 1; |