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
|
|
@ -226,9 +226,7 @@ GameConnection::GameConnection()
|
|||
mAddYawToAbsRot = false;
|
||||
mAddPitchToAbsRot = false;
|
||||
|
||||
#ifdef GHOSTSCOPING
|
||||
mConnectionVisibleDistance = 0.0f;
|
||||
#endif
|
||||
mVisibleGhostDistance = 0.0f;
|
||||
|
||||
clearDisplayDevice();
|
||||
}
|
||||
|
|
@ -243,16 +241,16 @@ GameConnection::~GameConnection()
|
|||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
#ifdef GHOSTSCOPING
|
||||
|
||||
void GameConnection::setVisibleGhostDistance(F32 dist)
|
||||
{
|
||||
mConnectionVisibleDistance = dist;
|
||||
mVisibleGhostDistance = dist;
|
||||
}
|
||||
|
||||
F32 GameConnection::getVisibleGhostDistance()
|
||||
{
|
||||
return mConnectionVisibleDistance;
|
||||
return mVisibleGhostDistance;
|
||||
}
|
||||
#endif
|
||||
|
||||
bool GameConnection::canRemoteCreate()
|
||||
{
|
||||
|
|
@ -2215,13 +2213,12 @@ DefineEngineMethod( GameConnection, getControlSchemeAbsoluteRotation, bool, (),,
|
|||
}
|
||||
|
||||
DefineEngineMethod( GameConnection, setVisibleGhostDistance, void, (F32 dist),,
|
||||
"@brief Sets the distance that objects around it will be ghosted.\n\n"
|
||||
"@brief Sets the distance that objects around it will be ghosted. If set to 0, "
|
||||
"it may be defined by the LevelInfo.\n\n"
|
||||
"@dist - is the max distance\n\n"
|
||||
)
|
||||
{
|
||||
#ifdef GHOSTSCOPING
|
||||
object->setVisibleGhostDistance(dist);
|
||||
#endif
|
||||
object->setVisibleGhostDistance(dist);
|
||||
}
|
||||
|
||||
DefineEngineMethod( GameConnection, getVisibleGhostDistance, F32, (),,
|
||||
|
|
@ -2230,9 +2227,5 @@ DefineEngineMethod( GameConnection, getVisibleGhostDistance, F32, (),,
|
|||
"@return S32 of distance.\n\n"
|
||||
)
|
||||
{
|
||||
#ifdef GHOSTSCOPING
|
||||
return object->getVisibleGhostDistance();
|
||||
#else
|
||||
return 0;
|
||||
#endif
|
||||
return object->getVisibleGhostDistance();
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue