| 775 | } |
| 776 | |
| 777 | void SceneObject::onCameraScopeQuery( NetConnection* connection, CameraScopeQuery* query ) |
| 778 | { |
| 779 | SceneManager* sceneManager = getSceneManager(); |
| 780 | GameConnection* conn = dynamic_cast<GameConnection*> (connection); |
| 781 | if (conn && (query->visibleDistance = conn->getVisibleGhostDistance()) == 0.0f) |
| 782 | if ((query->visibleDistance = sceneManager->getVisibleGhostDistance()) == 0.0f) |
| 783 | query->visibleDistance = sceneManager->getVisibleDistance(); |
| 784 | |
| 785 | // Object itself is in scope. |
| 786 | |
| 787 | if( this->isScopeable() ) |
| 788 | connection->objectInScope( this ); |
| 789 | |
| 790 | // If we're mounted to something, that object is in scope too. |
| 791 | |
| 792 | if( isMounted() ) |
| 793 | connection->objectInScope( mMount.object ); |
| 794 | |
| 795 | // If we're added to a scene graph, let the graph do the scene scoping. |
| 796 | // Otherwise just put everything in the server container in scope. |
| 797 | |
| 798 | if( getSceneManager() ) |
| 799 | getSceneManager()->scopeScene( query, connection ); |
| 800 | else |
| 801 | gServerContainer.findObjects( 0xFFFFFFFF, scopeCallback, connection ); |
| 802 | } |
| 803 | |
| 804 | //----------------------------------------------------------------------------- |
| 805 |
nothing calls this directly
no test coverage detected