| 1098 | //----------------------------------------------------------------------------- |
| 1099 | |
| 1100 | void 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 |
no test coverage detected