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

Method unmountObject

Engine/source/scene/sceneObject.cpp:1280–1305  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1278//-----------------------------------------------------------------------------
1279
1280void SceneObject::unmountObject( SceneObject *obj )
1281{
1282 if ( obj->mMount.object == this )
1283 {
1284 // Find and unlink the object
1285 for ( SceneObject **ptr = &mMount.list; *ptr; ptr = &(*ptr)->mMount.link )
1286 {
1287 if ( *ptr == obj )
1288 {
1289 *ptr = obj->mMount.link;
1290 break;
1291 }
1292 }
1293
1294 obj->mMount.object = NULL;
1295 obj->mMount.link = NULL;
1296
1297 if( obj->mMountPID != NULL ) // Only on server.
1298 {
1299 obj->mMountPID->decRefCount();
1300 obj->mMountPID = NULL;
1301 }
1302
1303 obj->onUnmount( this, obj->mMount.node );
1304 }
1305}
1306
1307//-----------------------------------------------------------------------------
1308

Callers 2

unmountMethod · 0.45
sceneObject.cppFile · 0.45

Calls 2

decRefCountMethod · 0.45
onUnmountMethod · 0.45

Tested by

no test coverage detected