-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
This adds limiting the ghost data to a specific area around the client. #908
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,6 +35,8 @@ | |
#include "console/engineAPI.h" | ||
#include "math/mathIO.h" | ||
|
||
#include "torqueConfig.h" | ||
|
||
|
||
IMPLEMENT_CO_NETOBJECT_V1(LevelInfo); | ||
|
||
|
@@ -77,6 +79,9 @@ static SFXAmbience sDefaultAmbience; | |
LevelInfo::LevelInfo() | ||
: mNearClip( 0.1f ), | ||
mVisibleDistance( 1000.0f ), | ||
#ifdef GHOSTSCOPING | ||
mVisibleGhostDistance (200.0f), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Tabs bad :(. |
||
#endif | ||
mDecalBias( 0.0015f ), | ||
mCanvasClearColor( 255, 0, 255, 255 ), | ||
mSoundAmbience( NULL ), | ||
|
@@ -114,6 +119,9 @@ void LevelInfo::initPersistFields() | |
|
||
addField( "nearClip", TypeF32, Offset( mNearClip, LevelInfo ), "Closest distance from the camera's position to render the world." ); | ||
addField( "visibleDistance", TypeF32, Offset( mVisibleDistance, LevelInfo ), "Furthest distance fromt he camera's position to render the world." ); | ||
#ifdef GHOSTSCOPING | ||
addField( "visibleGhostDistance", TypeF32, Offset( mVisibleGhostDistance, LevelInfo ), "Furthest distance from the camera's position to render players." ); | ||
#endif | ||
addField( "decalBias", TypeF32, Offset( mDecalBias, LevelInfo ), | ||
"NearPlane bias used when rendering Decal and DecalRoad. This should be tuned to the visibleDistance in your level." ); | ||
|
||
|
@@ -300,6 +308,9 @@ void LevelInfo::_updateSceneGraph() | |
|
||
scene->setNearClip( mNearClip ); | ||
scene->setVisibleDistance( mVisibleDistance ); | ||
#ifdef GHOSTSCOPING | ||
scene->setVisibleGhostDistance( mVisibleGhostDistance ); | ||
#endif | ||
|
||
gDecalBias = mDecalBias; | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,6 +36,7 @@ | |
#include "sfx/sfxCommon.h" | ||
#endif | ||
|
||
#include "torqueConfig.h" | ||
|
||
class SFXAmbience; | ||
class SFXSoundscape; | ||
|
@@ -55,6 +56,9 @@ class LevelInfo : public NetObject | |
|
||
F32 mVisibleDistance; | ||
|
||
#ifdef GHOSTSCOPING | ||
F32 mVisibleGhostDistance; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. More tab, would prefer it to be removed please! There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Getting picky…. Sheesh! I’ll fix them in a couple There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Getting? Always have been! |
||
#endif | ||
F32 mDecalBias; | ||
|
||
ColorI mCanvasClearColor; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reason behind change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes it gets ride of the jitters on the edge of the camera view when objects are on the edges
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got it. I'm modifying this PR to get rid of the
#define
s and fall back tovisibleDistance
if no ghost distance is defined. Acceptable?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds fine
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See #1018, and in particular this commit for what I changed in your code.