| 1541 | } |
| 1542 | |
| 1543 | void ShapeBase::setControllingClient( GameConnection* client ) |
| 1544 | { |
| 1545 | if( isGhost() && gSFX3DWorld ) |
| 1546 | { |
| 1547 | if( gSFX3DWorld->getListener() == this && !client && getControllingClient() && getControllingClient()->isConnectionToServer() ) |
| 1548 | { |
| 1549 | // We are the current listener and are no longer a controller object on the |
| 1550 | // connection, so clear our listener status. |
| 1551 | |
| 1552 | gSFX3DWorld->setListener( NULL ); |
| 1553 | } |
| 1554 | else if( client && client->isConnectionToServer() && (getControllingObject() != this) ) |
| 1555 | { |
| 1556 | // We're on the local client and not controlled by another object, so make |
| 1557 | // us the current SFX listener. |
| 1558 | |
| 1559 | gSFX3DWorld->setListener( this ); |
| 1560 | } |
| 1561 | } |
| 1562 | |
| 1563 | Parent::setControllingClient( client ); |
| 1564 | |
| 1565 | // Update all of the mounted images' shapes so they may |
| 1566 | // optimize their animation threads. |
| 1567 | for (U32 i=0; i<MaxMountedImages; ++i) |
| 1568 | { |
| 1569 | MountedImage& image = mMountedImageList[i]; |
| 1570 | image.updateDoAnimateAllShapes( this ); |
| 1571 | } |
| 1572 | } |
| 1573 | |
| 1574 | void ShapeBase::setControllingObject(ShapeBase* obj) |
| 1575 | { |
nothing calls this directly
no test coverage detected