mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-13 03:33:48 +00:00
Ensure that inclusion of any entity/component stuff is properly bracketed with the preprocessor check.
This commit is contained in:
parent
749ac4efc2
commit
b04ad52b5d
7 changed files with 75 additions and 6 deletions
|
|
@ -38,8 +38,11 @@
|
|||
#include "T3D/gameBase/gameConnectionEvents.h"
|
||||
#include "console/engineAPI.h"
|
||||
#include "math/mTransform.h"
|
||||
|
||||
#ifdef TORQUE_EXPERIMENTAL_EC
|
||||
#include "T3D/Entity.h"
|
||||
#include "T3D/Components/coreInterfaces.h"
|
||||
#endif
|
||||
|
||||
#ifdef TORQUE_HIFI_NET
|
||||
#include "T3D/gameBase/hifi/hifiMoveList.h"
|
||||
|
|
@ -733,6 +736,7 @@ bool GameConnection::getControlCameraFov(F32 * fov)
|
|||
}
|
||||
if (cObj)
|
||||
{
|
||||
#ifdef TORQUE_EXPERIMENTAL_EC
|
||||
if (Entity* ent = dynamic_cast<Entity*>(cObj))
|
||||
{
|
||||
if (CameraInterface* camInterface = ent->getComponent<CameraInterface>())
|
||||
|
|
@ -744,6 +748,9 @@ bool GameConnection::getControlCameraFov(F32 * fov)
|
|||
{
|
||||
*fov = cObj->getCameraFov();
|
||||
}
|
||||
#else
|
||||
*fov = cObj->getCameraFov();
|
||||
#endif
|
||||
return(true);
|
||||
}
|
||||
|
||||
|
|
@ -763,6 +770,7 @@ bool GameConnection::isValidControlCameraFov(F32 fov)
|
|||
|
||||
if (cObj)
|
||||
{
|
||||
#ifdef TORQUE_EXPERIMENTAL_EC
|
||||
if (Entity* ent = dynamic_cast<Entity*>(cObj))
|
||||
{
|
||||
if (CameraInterface* camInterface = ent->getComponent<CameraInterface>())
|
||||
|
|
@ -774,6 +782,9 @@ bool GameConnection::isValidControlCameraFov(F32 fov)
|
|||
{
|
||||
return cObj->isValidCameraFov(fov);
|
||||
}
|
||||
#else
|
||||
return cObj->isValidCameraFov(fov);
|
||||
#endif
|
||||
}
|
||||
|
||||
return NULL;
|
||||
|
|
@ -791,6 +802,8 @@ bool GameConnection::setControlCameraFov(F32 fov)
|
|||
}
|
||||
if (cObj)
|
||||
{
|
||||
|
||||
#ifdef TORQUE_EXPERIMENTAL_EC
|
||||
F32 newFov = 90.f;
|
||||
if (Entity* ent = dynamic_cast<Entity*>(cObj))
|
||||
{
|
||||
|
|
@ -806,10 +819,15 @@ bool GameConnection::setControlCameraFov(F32 fov)
|
|||
}
|
||||
else
|
||||
{
|
||||
// allow shapebase to clamp fov to its datablock values
|
||||
cObj->setCameraFov(mClampF(fov, MinCameraFov, MaxCameraFov));
|
||||
newFov = cObj->getCameraFov();
|
||||
}
|
||||
#else
|
||||
// allow shapebase to clamp fov to its datablock values
|
||||
cObj->setCameraFov(mClampF(fov, MinCameraFov, MaxCameraFov));
|
||||
F32 newFov = cObj->getCameraFov();
|
||||
}
|
||||
#endif
|
||||
|
||||
// server fov of client has 1degree resolution
|
||||
if( S32(newFov) != S32(mCameraFov) || newFov != fov )
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue