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

Method process

Engine/source/T3D/gameBase/gameConnectionEvents.cpp:233–270  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

231}
232
233void SimDataBlockEvent::process(NetConnection *cptr)
234{
235 if(mProcess)
236 {
237 //call the console function to set the number of blocks to be sent
238 Con::executef("onDataBlockObjectReceived", mIndex, mTotal);
239
240 String &errorBuffer = NetConnection::getErrorBuffer();
241
242 // Register the datablock object if this is a new DB
243 // and not for a modified datablock event.
244
245 if( !mObj->isProperlyAdded() )
246 {
247 // This is a fresh datablock object.
248 // Perform preload on datablock and register
249 // the object.
250
251 GameConnection* conn = dynamic_cast< GameConnection* >( cptr );
252 if( conn )
253 conn->preloadDataBlock( mObj );
254
255 if( mObj->registerObject(id) )
256 {
257 cptr->addObject( mObj );
258 mObj = NULL;
259 }
260 }
261 else
262 {
263 // This is an update to an existing datablock. Preload
264 // to finish this.
265
266 mObj->preload( false, errorBuffer );
267 mObj = NULL;
268 }
269 }
270}
271
272
273//----------------------------------------------------------------------------

Callers 1

readDemoStartBlockMethod · 0.45

Calls 7

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

Tested by

no test coverage detected