mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-13 03:33:48 +00:00
Made some tweaks so I'm happy with it.
* Removed #defines * Fall back to using visible distance if ghost distance is not used * Removed ghost distance from level files as it will default * Renamed mConnectionVisibleDistance for consistency
This commit is contained in:
parent
578c4e8f4f
commit
a928d142f7
15 changed files with 21 additions and 100 deletions
|
|
@ -42,10 +42,7 @@
|
|||
#include "math/mathIO.h"
|
||||
#include "math/mTransform.h"
|
||||
#include "T3D/gameBase/gameProcess.h"
|
||||
|
||||
#ifdef GHOSTSCOPING
|
||||
#include "T3D/gameBase/gameConnection.h"
|
||||
#endif
|
||||
|
||||
IMPLEMENT_CONOBJECT(SceneObject);
|
||||
|
||||
|
|
@ -668,15 +665,11 @@ static void scopeCallback( SceneObject* obj, void* conPtr )
|
|||
|
||||
void SceneObject::onCameraScopeQuery( NetConnection* connection, CameraScopeQuery* query )
|
||||
{
|
||||
|
||||
#ifdef GHOSTSCOPING
|
||||
SceneManager* scenemanager = getSceneManager();
|
||||
SceneManager* sceneManager = getSceneManager();
|
||||
GameConnection* conn = dynamic_cast<GameConnection*> (connection);
|
||||
if (conn && conn->getVisibleGhostDistance() == 0.0f)
|
||||
query->visibleDistance = scenemanager->getVisibleGhostDistance();
|
||||
else
|
||||
query->visibleDistance = conn->getVisibleGhostDistance();
|
||||
#endif
|
||||
if (conn && (query->visibleDistance = conn->getVisibleGhostDistance()) == 0.0f)
|
||||
if ((query->visibleDistance = sceneManager->getVisibleGhostDistance()) == 0.0f)
|
||||
query->visibleDistance = sceneManager->getVisibleDistance();
|
||||
|
||||
// Object itself is in scope.
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue