MCPcopy Create free account
hub / github.com/GarageGames/Torque3D / onConnectionEstablished

Method onConnectionEstablished

Engine/source/T3D/gameBase/gameConnection.cpp:323–354  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

321}
322
323void GameConnection::onConnectionEstablished(bool isInitiator)
324{
325 if(isInitiator)
326 {
327 setGhostFrom(false);
328 setGhostTo(true);
329 setSendingEvents(true);
330 setTranslatesStrings(true);
331 setIsConnectionToServer();
332 mServerConnection = this;
333 Con::printf("Connection established %d", getId());
334 onConnectionAccepted_callback();
335 }
336 else
337 {
338 setGhostFrom(true);
339 setGhostTo(false);
340 setSendingEvents(true);
341 setTranslatesStrings(true);
342 Sim::getClientGroup()->addObject(this);
343 mMoveList->init();
344
345 const char *argv[MaxConnectArgs + 2];
346 argv[0] = "onConnect";
347 argv[1] = NULL; // Filled in later
348 for(U32 i = 0; i < mConnectArgc; i++)
349 argv[i + 2] = mConnectArgv[i];
350 // NOTE: Need to fallback to Con::execute() as IMPLEMENT_CALLBACK does not
351 // support variadic functions.
352 Con::execute(this, mConnectArgc + 2, argv);
353 }
354}
355
356void GameConnection::onConnectTimedOut()
357{

Callers 1

gameConnection.cppFile · 0.45

Calls 4

printfFunction · 0.85
executeFunction · 0.85
addObjectMethod · 0.45
initMethod · 0.45

Tested by

no test coverage detected