| 1278 | //----------------------------------------------------------------------------- |
| 1279 | |
| 1280 | void 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 |
no test coverage detected