mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-03-11 00:10:46 +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 )
|
||||
|
|
|
|||
|
|
@ -27,9 +27,10 @@
|
|||
#include "platform/profiler.h"
|
||||
#include "console/consoleTypes.h"
|
||||
|
||||
#ifdef TORQUE_EXPERIMENTAL_EC
|
||||
#include "T3D/Components/coreInterfaces.h"
|
||||
|
||||
#include "T3D/Components/Component.h"
|
||||
#endif
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
ProcessObject::ProcessObject()
|
||||
|
|
@ -271,10 +272,12 @@ void ProcessList::advanceObjects()
|
|||
onTickObject(pobj);
|
||||
}
|
||||
|
||||
#ifdef TORQUE_EXPERIMENTAL_EC
|
||||
for (U32 i = 0; i < UpdateInterface::all.size(); i++)
|
||||
{
|
||||
UpdateInterface::all[i]->processTick();
|
||||
}
|
||||
#endif
|
||||
|
||||
mTotalTicks++;
|
||||
|
||||
|
|
|
|||
|
|
@ -36,8 +36,11 @@
|
|||
#include "T3D/gameBase/gameConnection.h"
|
||||
#include "T3D/gameBase/std/stdMoveList.h"
|
||||
#include "T3D/fx/cameraFXMgr.h"
|
||||
|
||||
#ifdef TORQUE_EXPERIMENTAL_EC
|
||||
#include "T3D/Components/coreInterfaces.h"
|
||||
#include "T3D/Components/Component.h"
|
||||
#endif
|
||||
|
||||
MODULE_BEGIN( ProcessList )
|
||||
|
||||
|
|
@ -134,6 +137,7 @@ bool StdClientProcessList::advanceTime( SimTime timeDelta )
|
|||
obj = obj->mProcessLink.next;
|
||||
}
|
||||
|
||||
#ifdef TORQUE_EXPERIMENTAL_EC
|
||||
for (U32 i = 0; i < UpdateInterface::all.size(); i++)
|
||||
{
|
||||
Component *comp = dynamic_cast<Component*>(UpdateInterface::all[i]);
|
||||
|
|
@ -143,6 +147,7 @@ bool StdClientProcessList::advanceTime( SimTime timeDelta )
|
|||
|
||||
UpdateInterface::all[i]->interpolateTick(mLastDelta);
|
||||
}
|
||||
#endif
|
||||
|
||||
// Inform objects of total elapsed delta so they can advance
|
||||
// client side animations.
|
||||
|
|
@ -158,6 +163,7 @@ bool StdClientProcessList::advanceTime( SimTime timeDelta )
|
|||
obj = obj->mProcessLink.next;
|
||||
}
|
||||
|
||||
#ifdef TORQUE_EXPERIMENTAL_EC
|
||||
for (U32 i = 0; i < UpdateInterface::all.size(); i++)
|
||||
{
|
||||
Component *comp = dynamic_cast<Component*>(UpdateInterface::all[i]);
|
||||
|
|
@ -170,6 +176,7 @@ bool StdClientProcessList::advanceTime( SimTime timeDelta )
|
|||
|
||||
UpdateInterface::all[i]->advanceTime(dt);
|
||||
}
|
||||
#endif
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue