MCPcopy Create free account
hub / github.com/TorqueGameEngines/Torque3D / process

Method process

Engine/source/T3D/gameBase/gameConnectionEvents.cpp:255–292  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

253}
254
255void SimDataBlockEvent::process(NetConnection *cptr)
256{
257 if(mProcess)
258 {
259 //call the console function to set the number of blocks to be sent
260 Con::executef("onDataBlockObjectReceived", mIndex, mTotal);
261
262 String &errorBuffer = NetConnection::getErrorBuffer();
263
264 // Register the datablock object if this is a new DB
265 // and not for a modified datablock event.
266
267 if( !mObj->isProperlyAdded() )
268 {
269 // This is a fresh datablock object.
270 // Perform preload on datablock and register
271 // the object.
272
273 GameConnection* conn = dynamic_cast< GameConnection* >( cptr );
274 if( conn )
275 conn->preloadDataBlock( mObj );
276
277 if( mObj->registerObject(id) )
278 {
279 cptr->addObject( mObj );
280 mObj = NULL;
281 }
282 }
283 else
284 {
285 // This is an update to an existing datablock. Preload
286 // to finish this.
287
288 mObj->preload( false, errorBuffer );
289 mObj = NULL;
290 }
291 }
292}
293
294
295//----------------------------------------------------------------------------

Callers 2

readDemoStartBlockMethod · 0.45

Calls 9

executefFunction · 0.85
isProperlyAddedMethod · 0.80
preloadDataBlockMethod · 0.80
getSfxProfileMethod · 0.80
registerObjectMethod · 0.45
addObjectMethod · 0.45
preloadMethod · 0.45
is3DMethod · 0.45
playOnceMethod · 0.45

Tested by

no test coverage detected