This adds limiting the ghost data to a specific area around the client.

By default it is not included in the build, you must #define GHOSTSCOPING in the torqueConfig.h to enable it.
The distance can be set via the mission file by adding

visibleGhostDistance = "1000";

Or if it is not set in the mission file it will default to what is defined in torqueConfig.h #defined as GHOSTSCOPING_DEFAULT_DISTANCE_IF_NOT_IN_MISSION

The mission default distance can be overridden on a per connection basis by using gameconnection:setVisibleGhostDistance and gameconnection:getVisibleGhostDistance

The logic for setting the scoping distance was moved from shapebase in the original design to SceneObject so that it will affect cameras, players, etc.
This commit is contained in:
Vincent Gee 2014-11-05 23:14:39 -05:00
parent 378a933894
commit 55bdfe5dc3
15 changed files with 138 additions and 1 deletions

View file

@ -40,7 +40,6 @@
// For player object bounds workaround.
#include "T3D/player.h"
extern bool gEditingMission;
@ -113,6 +112,9 @@ SceneManager::SceneManager( bool isClient )
mDisplayTargetResolution( 0, 0 ),
mDefaultRenderPass( NULL ),
mVisibleDistance( 500.f ),
#ifdef GHOSTSCOPING
mVisibleGhostDistance(GHOSTSCOPING_DEFAULT_DISTANCE_IF_NOT_IN_MISSION),
#endif
mNearClip( 0.1f ),
mAmbientLightColor( ColorF( 0.1f, 0.1f, 0.1f, 1.0f ) ),
mZoneManager( NULL )