game.cpp
Public Variables
Public Functions
bool
clientProcess(U32 timeDelta)
Processes the next frame, including gui, rendering, and tick interpolation.
ConsoleFunction(getLocalTime , const char * , 1 , 1 , "Return the current local time as: weekday month day year hour min <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">sec.\n\n</a>" "Local time is platform defined." )
ConsoleFunctionGroupBegin(InputManagement , "Functions that let you deal with input from scripts" )
ConsoleFunctionGroupBegin(Platform , "General platform functions." )
ConsoleFunctionGroupEnd(InputManagement )
ConsoleFunctionGroupEnd(Platform )
DefineConsoleFunction(activateDirectInput , void , () , "()" "@brief Activates <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">DirectInput.\n\n</a>" "Also activates any connected joysticks." "@ingroup <a href="/coding/class/classinput/">Input</a>" )
DefineConsoleFunction(closeNetPort , void , () , "()" "@brief Closes the current network <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">port\n\n</a>" "@ingroup Networking" )
DefineConsoleFunction(deactivateDirectInput , void , () , "()" "@brief Disables <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">DirectInput.\n\n</a>" "Also deactivates any connected <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">joysticks.\n\n</a>" "@ingroup <a href="/coding/class/classinput/">Input</a>" )
DefineConsoleFunction(getRealTime , S32 , () , "()" "@brief Return the current real time in <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">milliseconds.\n\n</a>" "Real time is platform defined; typically time since the computer <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">booted.\n\n</a>" "@ingroup Platform" )
DefineConsoleFunction(getSimTime , S32 , () , "()" "Return the current sim time in <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">milliseconds.\n\n</a>" "@brief Sim time is time since the game <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">started.\n\n</a>" "@ingroup Platform" )
DefineConsoleFunction(isAddressTypeAvailable , bool , (int addressType) , "(protocol <a href="/coding/file/win32cursorcontroller_8cpp/#win32cursorcontroller_8cpp_1ab38592509822a5f4674447022cc62efe">id</a>)" "@brief Determines <a href="/coding/file/tsmeshintrinsics_8cpp/#tsmeshintrinsics_8cpp_1a2594a51175f310ed96ad6cd7d6514878">if</a> a specified address type can be <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">reached.\n\n</a>" "@ingroup Networking" )
DefineConsoleFunction(lockMouse , void , (bool isLocked) , "(bool isLocked)" "@brief Lock or unlock the mouse <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> the <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">window.\n\n</a>" "When true, prevents the mouse from leaving the bounds of the game <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">window.\n\n</a>" " @ingroup <a href="/coding/class/classinput/">Input</a>" )
DefineConsoleFunction(playJournal , void , (const char *filename) , "(string filename)" "@brief Begin playback of a journal from a specified <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">field.\n\n</a>" "@param filename Name and path of <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1a702945180aa732857b380a007a7e2a21">file</a> journal <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">file\n</a>" "@ingroup Platform" )
DefineConsoleFunction(saveJournal , void , (const char *filename) , "(string filename)" "Save the journal <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> the specified <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">file.\n\n</a>" "@ingroup Platform" )
DefineConsoleFunction(setNetPort , bool , (int port, bool bind) , (true) , "(int port, bool bind=true)" "@brief Set the network port <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1a2732ab74fa0237854c2ba0f75f88a624">for</a> the game <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">use.\n\n</a>" "@param port The port <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">use.\n</a>" "@param bind True <a href="/coding/file/tsmeshintrinsics_8cpp/#tsmeshintrinsics_8cpp_1a2594a51175f310ed96ad6cd7d6514878">if</a> bind() should be called on the <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">port.\n</a>" "@returns True <a href="/coding/file/tsmeshintrinsics_8cpp/#tsmeshintrinsics_8cpp_1a2594a51175f310ed96ad6cd7d6514878">if</a> the port was successfully <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">opened.\n</a>" "This will trigger a windows firewall prompt. " "If you don'<a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a21feba301403a65090791a94f26c9d92">t</a> have firewall tunneling tech you can set this <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> false <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> avoid the <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">prompt.\n\n</a>" "@ingroup Networking" )
DefineConsoleFunction(strToPlayerName , const char * , (const char *ptr) , "strToPlayerName(string);" )
bool
serverProcess(U32 timeDelta)
Processes the next cycle on the server. This function will only have an effect when executed on the server.
Detailed Description
Public Variables
const U32 MaxPlayerNameLength
Public Functions
clientProcess(U32 timeDelta)
Processes the next frame, including gui, rendering, and tick interpolation.
This function will only have an effect when executed on the client.
ConsoleFunction(getLocalTime , const char * , 1 , 1 , "Return the current local time as: weekday month day year hour min <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">sec.\n\n</a>" "Local time is platform defined." )
ConsoleFunctionGroupBegin(InputManagement , "Functions that let you deal with input from scripts" )
ConsoleFunctionGroupBegin(Platform , "General platform functions." )
ConsoleFunctionGroupEnd(InputManagement )
ConsoleFunctionGroupEnd(Platform )
DefineConsoleFunction(activateDirectInput , void , () , "()" "@brief Activates <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">DirectInput.\n\n</a>" "Also activates any connected joysticks." "@ingroup <a href="/coding/class/classinput/">Input</a>" )
DefineConsoleFunction(closeNetPort , void , () , "()" "@brief Closes the current network <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">port\n\n</a>" "@ingroup Networking" )
DefineConsoleFunction(deactivateDirectInput , void , () , "()" "@brief Disables <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">DirectInput.\n\n</a>" "Also deactivates any connected <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">joysticks.\n\n</a>" "@ingroup <a href="/coding/class/classinput/">Input</a>" )
DefineConsoleFunction(getRealTime , S32 , () , "()" "@brief Return the current real time in <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">milliseconds.\n\n</a>" "Real time is platform defined; typically time since the computer <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">booted.\n\n</a>" "@ingroup Platform" )
DefineConsoleFunction(getSimTime , S32 , () , "()" "Return the current sim time in <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">milliseconds.\n\n</a>" "@brief Sim time is time since the game <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">started.\n\n</a>" "@ingroup Platform" )
DefineConsoleFunction(isAddressTypeAvailable , bool , (int addressType) , "(protocol <a href="/coding/file/win32cursorcontroller_8cpp/#win32cursorcontroller_8cpp_1ab38592509822a5f4674447022cc62efe">id</a>)" "@brief Determines <a href="/coding/file/tsmeshintrinsics_8cpp/#tsmeshintrinsics_8cpp_1a2594a51175f310ed96ad6cd7d6514878">if</a> a specified address type can be <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">reached.\n\n</a>" "@ingroup Networking" )
DefineConsoleFunction(lockMouse , void , (bool isLocked) , "(bool isLocked)" "@brief Lock or unlock the mouse <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> the <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">window.\n\n</a>" "When true, prevents the mouse from leaving the bounds of the game <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">window.\n\n</a>" " @ingroup <a href="/coding/class/classinput/">Input</a>" )
DefineConsoleFunction(playJournal , void , (const char *filename) , "(string filename)" "@brief Begin playback of a journal from a specified <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">field.\n\n</a>" "@param filename Name and path of <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1a702945180aa732857b380a007a7e2a21">file</a> journal <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">file\n</a>" "@ingroup Platform" )
DefineConsoleFunction(saveJournal , void , (const char *filename) , "(string filename)" "Save the journal <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> the specified <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">file.\n\n</a>" "@ingroup Platform" )
DefineConsoleFunction(setNetPort , bool , (int port, bool bind) , (true) , "(int port, bool bind=true)" "@brief Set the network port <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1a2732ab74fa0237854c2ba0f75f88a624">for</a> the game <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">use.\n\n</a>" "@param port The port <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">use.\n</a>" "@param bind True <a href="/coding/file/tsmeshintrinsics_8cpp/#tsmeshintrinsics_8cpp_1a2594a51175f310ed96ad6cd7d6514878">if</a> bind() should be called on the <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">port.\n</a>" "@returns True <a href="/coding/file/tsmeshintrinsics_8cpp/#tsmeshintrinsics_8cpp_1a2594a51175f310ed96ad6cd7d6514878">if</a> the port was successfully <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">opened.\n</a>" "This will trigger a windows firewall prompt. " "If you don'<a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a21feba301403a65090791a94f26c9d92">t</a> have firewall tunneling tech you can set this <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> false <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> avoid the <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">prompt.\n\n</a>" "@ingroup Networking" )
DefineConsoleFunction(strToPlayerName , const char * , (const char *ptr) , "strToPlayerName(string);" )
serverProcess(U32 timeDelta)
Processes the next cycle on the server. This function will only have an effect when executed on the server.
1 2//----------------------------------------------------------------------------- 3// Copyright (c) 2012 GarageGames, LLC 4// 5// Permission is hereby granted, free of charge, to any person obtaining a copy 6// of this software and associated documentation files (the "Software"), to 7// deal in the Software without restriction, including without limitation the 8// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 9// sell copies of the Software, and to permit persons to whom the Software is 10// furnished to do so, subject to the following conditions: 11// 12// The above copyright notice and this permission notice shall be included in 13// all copies or substantial portions of the Software. 14// 15// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 20// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 21// IN THE SOFTWARE. 22//----------------------------------------------------------------------------- 23 24#include "platform/platform.h" 25#include "platform/platformInput.h" 26 27#include "app/game.h" 28#include "math/mMath.h" 29#include "core/dnet.h" 30#include "core/stream/fileStream.h" 31#include "core/frameAllocator.h" 32#include "core/iTickable.h" 33#include "core/strings/findMatch.h" 34#include "console/simBase.h" 35#include "console/console.h" 36#include "console/consoleTypes.h" 37#include "console/engineAPI.h" 38#include "gui/controls/guiMLTextCtrl.h" 39#ifdef TORQUE_TGB_ONLY 40#include "T2D/oldModel/networking/t2dGameConnection.h" 41#include "T2D/oldModel/networking/t2dNetworkServerSceneProcess.h" 42#include "T2D/oldModel/networking/t2dNetworkClientSceneProcess.h" 43#else 44#include "T3D/gameBase/gameConnection.h" 45#include "T3D/gameFunctions.h" 46#include "T3D/gameBase/gameProcess.h" 47#endif 48#include "platform/profiler.h" 49#include "gfx/gfxCubemap.h" 50#include "gfx/gfxTextureManager.h" 51#include "sfx/sfxSystem.h" 52 53#ifdef TORQUE_PLAYER 54// See matching #ifdef in editor/editor.cpp 55bool gEditingMission = false; 56#endif 57 58//-------------------------------------------------------------------------- 59 60ConsoleFunctionGroupBegin( InputManagement, "Functions that let you deal with input from scripts" ); 61 62DefineConsoleFunction( deactivateDirectInput, void, (), , 63 "()" 64 "@brief Disables DirectInput.\n\n" 65 "Also deactivates any connected joysticks.\n\n" 66 "@ingroup Input" ) 67{ 68 if ( Input::isActive() ) 69 Input::deactivate(); 70} 71 72DefineConsoleFunction( activateDirectInput, void, (), , 73 "()" 74 "@brief Activates DirectInput.\n\n" 75 "Also activates any connected joysticks." 76 "@ingroup Input") 77{ 78 if ( !Input::isActive() ) 79 Input::activate(); 80} 81ConsoleFunctionGroupEnd( InputManagement ); 82 83//-------------------------------------------------------------------------- 84 85static const U32 MaxPlayerNameLength = 16; 86DefineConsoleFunction( strToPlayerName, const char*, (const char* ptr ), , "strToPlayerName(string);" ) 87{ 88 89 // Strip leading spaces and underscores: 90 while ( *ptr == ' ' || *ptr == '_' ) 91 ptr++; 92 93 U32 len = dStrlen( ptr ); 94 if ( len ) 95 { 96 char* ret = Con::getReturnBuffer( MaxPlayerNameLength + 1 ); 97 char* rptr = ret; 98 ret[MaxPlayerNameLength - 1] = '\0'; 99 ret[MaxPlayerNameLength] = '\0'; 100 bool space = false; 101 102 U8 ch; 103 while ( *ptr && dStrlen( ret ) < MaxPlayerNameLength ) 104 { 105 ch = (U8) *ptr; 106 107 // Strip all illegal characters: 108 if ( ch < 32 || ch == ',' || ch == '.' || ch == '\'' || ch == '`' ) 109 { 110 ptr++; 111 continue; 112 } 113 114 // Don't allow double spaces or space-underline combinations: 115 if ( ch == ' ' || ch == '_' ) 116 { 117 if ( space ) 118 { 119 ptr++; 120 continue; 121 } 122 else 123 space = true; 124 } 125 else 126 space = false; 127 128 *rptr++ = *ptr; 129 ptr++; 130 } 131 *rptr = '\0'; 132 133 //finally, strip out the ML text control chars... 134 return GuiMLTextCtrl::stripControlChars(ret); 135 } 136 137 return( "" ); 138} 139 140ConsoleFunctionGroupBegin( Platform , "General platform functions."); 141 142DefineConsoleFunction( lockMouse, void, (bool isLocked ), , "(bool isLocked)" 143 "@brief Lock or unlock the mouse to the window.\n\n" 144 "When true, prevents the mouse from leaving the bounds of the game window.\n\n" 145 "@ingroup Input") 146{ 147 Platform::setWindowLocked(isLocked); 148} 149 150 151DefineConsoleFunction( setNetPort, bool, (int port, bool bind), (true), "(int port, bool bind=true)" 152 "@brief Set the network port for the game to use.\n\n" 153 154 "@param port The port to use.\n" 155 "@param bind True if bind() should be called on the port.\n" 156 157 "@returns True if the port was successfully opened.\n" 158 159 "This will trigger a windows firewall prompt. " 160 "If you don't have firewall tunneling tech you can set this to false to avoid the prompt.\n\n" 161 "@ingroup Networking") 162{ 163 return Net::openPort((S32)port, bind); 164} 165 166DefineConsoleFunction(isAddressTypeAvailable, bool, (int addressType), , "(protocol id)" 167 "@brief Determines if a specified address type can be reached.\n\n" 168 "@ingroup Networking") 169{ 170 return Net::isAddressTypeAvailable((NetAddress::Type)addressType); 171} 172 173DefineConsoleFunction( closeNetPort, void, (), , "()" 174 "@brief Closes the current network port\n\n" 175 "@ingroup Networking") 176{ 177 Net::closePort(); 178} 179 180DefineConsoleFunction( saveJournal, void, (const char * filename), , "(string filename)" 181 "Save the journal to the specified file.\n\n" 182 "@ingroup Platform") 183{ 184 Journal::Record(filename); 185} 186 187DefineConsoleFunction( playJournal, void, (const char * filename), , "(string filename)" 188 "@brief Begin playback of a journal from a specified field.\n\n" 189 "@param filename Name and path of file journal file\n" 190 "@ingroup Platform") 191{ 192 // CodeReview - BJG 4/24/2007 - The break flag needs to be wired back in. 193 // bool jBreak = (argc > 2)? dAtob(argv[2]): false; 194 Journal::Play(filename); 195} 196 197DefineConsoleFunction( getSimTime, S32, (), , "()" 198 "Return the current sim time in milliseconds.\n\n" 199 "@brief Sim time is time since the game started.\n\n" 200 "@ingroup Platform") 201{ 202 return Sim::getCurrentTime(); 203} 204 205DefineConsoleFunction( getRealTime, S32, (), , "()" 206 "@brief Return the current real time in milliseconds.\n\n" 207 "Real time is platform defined; typically time since the computer booted.\n\n" 208 "@ingroup Platform") 209{ 210 return Platform::getRealMilliseconds(); 211} 212 213ConsoleFunction( getLocalTime, const char *, 1, 1, "Return the current local time as: weekday month day year hour min sec.\n\n" 214 "Local time is platform defined.") 215{ 216 Platform::LocalTime lt; 217 Platform::getLocalTime(lt); 218 219 static const U32 bufSize = 128; 220 char *retBuffer = Con::getReturnBuffer(bufSize); 221 dSprintf(retBuffer, bufSize, "%d %d %d %d %02d %02d %02d", 222 lt.weekday, 223 lt.month + 1, 224 lt.monthday, 225 lt.year + 1900, 226 lt.hour, 227 lt.min, 228 lt.sec); 229 230 return retBuffer; 231} 232 233ConsoleFunctionGroupEnd(Platform); 234 235//----------------------------------------------------------------------------- 236 237bool clientProcess(U32 timeDelta) 238{ 239 bool ret = true; 240 241#ifndef TORQUE_TGB_ONLY 242 ret = ClientProcessList::get()->advanceTime(timeDelta); 243#else 244 ret = gt2dNetworkClientProcess.advanceTime( timeDelta ); 245#endif 246 247 ITickable::advanceTime(timeDelta); 248 249#ifndef TORQUE_TGB_ONLY 250 // Determine if we're lagging 251 GameConnection* connection = GameConnection::getConnectionToServer(); 252 if(connection) 253 { 254 connection->detectLag(); 255 } 256#else 257 // Determine if we're lagging 258 t2dGameConnection* connection = t2dGameConnection::getConnectionToServer(); 259 if(connection) 260 { 261 connection->detectLag(); 262 } 263#endif 264 265 // Let SFX process. 266 SFX->_update(); 267 268 return ret; 269} 270 271bool serverProcess(U32 timeDelta) 272{ 273 bool ret = true; 274#ifndef TORQUE_TGB_ONLY 275 ret = ServerProcessList::get()->advanceTime(timeDelta); 276#else 277 ret = gt2dNetworkServerProcess.advanceTime( timeDelta ); 278#endif 279 return ret; 280} 281 282
