| 1402 | } |
| 1403 | |
| 1404 | void ShapeBase::setControllingClient( GameConnection* client ) |
| 1405 | { |
| 1406 | if( isGhost() && gSFX3DWorld ) |
| 1407 | { |
| 1408 | if( gSFX3DWorld->getListener() == this && !client && getControllingClient() && getControllingClient()->isConnectionToServer() ) |
| 1409 | { |
| 1410 | // We are the current listener and are no longer a controller object on the |
| 1411 | // connection, so clear our listener status. |
| 1412 | |
| 1413 | gSFX3DWorld->setListener( NULL ); |
| 1414 | } |
| 1415 | else if( client && client->isConnectionToServer() && !getControllingObject() ) |
| 1416 | { |
| 1417 | // We're on the local client and not controlled by another object, so make |
| 1418 | // us the current SFX listener. |
| 1419 | |
| 1420 | gSFX3DWorld->setListener( this ); |
| 1421 | } |
| 1422 | } |
| 1423 | |
| 1424 | Parent::setControllingClient( client ); |
| 1425 | |
| 1426 | // Update all of the mounted images' shapes so they may |
| 1427 | // optimize their animation threads. |
| 1428 | for (U32 i=0; i<MaxMountedImages; ++i) |
| 1429 | { |
| 1430 | MountedImage& image = mMountedImageList[i]; |
| 1431 | image.updateDoAnimateAllShapes( this ); |
| 1432 | } |
| 1433 | } |
| 1434 | |
| 1435 | void ShapeBase::setControllingObject(ShapeBase* obj) |
| 1436 | { |
nothing calls this directly
no test coverage detected