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

Method unmountObject

Engine/source/scene/sceneObject.cpp:1100–1125  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1098//-----------------------------------------------------------------------------
1099
1100void SceneObject::unmountObject( SceneObject *obj )
1101{
1102 if ( obj->mMount.object == this )
1103 {
1104 // Find and unlink the object
1105 for ( SceneObject **ptr = &mMount.list; *ptr; ptr = &(*ptr)->mMount.link )
1106 {
1107 if ( *ptr == obj )
1108 {
1109 *ptr = obj->mMount.link;
1110 break;
1111 }
1112 }
1113
1114 obj->mMount.object = NULL;
1115 obj->mMount.link = NULL;
1116
1117 if( obj->mMountPID != NULL ) // Only on server.
1118 {
1119 obj->mMountPID->decRefCount();
1120 obj->mMountPID = NULL;
1121 }
1122
1123 obj->onUnmount( this, obj->mMount.node );
1124 }
1125}
1126
1127//-----------------------------------------------------------------------------
1128

Callers 2

unmountMethod · 0.45
sceneObject.cppFile · 0.45

Calls 2

decRefCountMethod · 0.45
onUnmountMethod · 0.45

Tested by

no test coverage detected