mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-04-21 04:15:36 +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
|
|
@ -112,9 +112,7 @@ SceneManager::SceneManager( bool isClient )
|
|||
mDisplayTargetResolution( 0, 0 ),
|
||||
mDefaultRenderPass( NULL ),
|
||||
mVisibleDistance( 500.f ),
|
||||
#ifdef GHOSTSCOPING
|
||||
mVisibleGhostDistance(GHOSTSCOPING_DEFAULT_DISTANCE_IF_NOT_IN_MISSION),
|
||||
#endif
|
||||
mVisibleGhostDistance( 0 ),
|
||||
mNearClip( 0.1f ),
|
||||
mAmbientLightColor( ColorF( 0.1f, 0.1f, 0.1f, 1.0f ) ),
|
||||
mZoneManager( NULL )
|
||||
|
|
|
|||
|
|
@ -59,8 +59,6 @@
|
|||
#include "core/util/tSignal.h"
|
||||
#endif
|
||||
|
||||
#include "torqueConfig.h"
|
||||
|
||||
|
||||
class LightManager;
|
||||
class SceneRootZone;
|
||||
|
|
@ -143,9 +141,7 @@ class SceneManager
|
|||
|
||||
F32 mVisibleDistance;
|
||||
|
||||
#ifdef GHOSTSCOPING
|
||||
F32 mVisibleGhostDistance;
|
||||
#endif
|
||||
F32 mNearClip;
|
||||
|
||||
FogData mFogData;
|
||||
|
|
@ -322,10 +318,9 @@ class SceneManager
|
|||
/// Returns the default visible distance for the scene.
|
||||
F32 getVisibleDistance() { return mVisibleDistance; }
|
||||
|
||||
#ifdef GHOSTSCOPING
|
||||
void setVisibleGhostDistance( F32 dist ) { mVisibleGhostDistance = dist; }
|
||||
F32 getVisibleGhostDistance() { return mVisibleGhostDistance;}
|
||||
#endif
|
||||
|
||||
/// Used by LevelInfo to set the default near clip plane
|
||||
/// for rendering the scene.
|
||||
///
|
||||
|
|
|
|||
|
|
@ -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