mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-20 15:13:45 +00:00
Merge pull request #2099 from Areloch/RemoveECExperimentalFlag
Removes Entity/Component stuff from being behind an experimental flag.
This commit is contained in:
commit
920a8d2edb
40 changed files with 181 additions and 837 deletions
|
|
@ -330,93 +330,6 @@ void PlayerControllerComponent::updateMove()
|
|||
bool doStandardMove = true;
|
||||
GameConnection* con = mOwner->getControllingClient();
|
||||
|
||||
#ifdef TORQUE_EXTENDED_MOVE
|
||||
// Work with an absolute rotation from the ExtendedMove class?
|
||||
if (con && con->getControlSchemeAbsoluteRotation())
|
||||
{
|
||||
doStandardMove = false;
|
||||
const ExtendedMove* emove = dynamic_cast<const ExtendedMove*>(move);
|
||||
U32 emoveIndex = smExtendedMoveHeadPosRotIndex;
|
||||
if (emoveIndex >= ExtendedMove::MaxPositionsRotations)
|
||||
emoveIndex = 0;
|
||||
|
||||
if (emove->EulerBasedRotation[emoveIndex])
|
||||
{
|
||||
// Head pitch
|
||||
mHead.x += (emove->rotX[emoveIndex] - mLastAbsolutePitch);
|
||||
|
||||
// Do we also include the relative yaw value?
|
||||
if (con->getControlSchemeAddPitchToAbsRot())
|
||||
{
|
||||
F32 x = move->pitch;
|
||||
if (x > M_PI_F)
|
||||
x -= M_2PI_F;
|
||||
|
||||
mHead.x += x;
|
||||
}
|
||||
|
||||
// Constrain the range of mHead.x
|
||||
while (mHead.x < -M_PI_F)
|
||||
mHead.x += M_2PI_F;
|
||||
while (mHead.x > M_PI_F)
|
||||
mHead.x -= M_2PI_F;
|
||||
|
||||
// Rotate (heading) head or body?
|
||||
if (move->freeLook && ((isMounted() && getMountNode() == 0) || (con && !con->isFirstPerson())))
|
||||
{
|
||||
// Rotate head
|
||||
mHead.z += (emove->rotZ[emoveIndex] - mLastAbsoluteYaw);
|
||||
|
||||
// Do we also include the relative yaw value?
|
||||
if (con->getControlSchemeAddYawToAbsRot())
|
||||
{
|
||||
F32 z = move->yaw;
|
||||
if (z > M_PI_F)
|
||||
z -= M_2PI_F;
|
||||
|
||||
mHead.z += z;
|
||||
}
|
||||
|
||||
// Constrain the range of mHead.z
|
||||
while (mHead.z < 0.0f)
|
||||
mHead.z += M_2PI_F;
|
||||
while (mHead.z > M_2PI_F)
|
||||
mHead.z -= M_2PI_F;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Rotate body
|
||||
mRot.z += (emove->rotZ[emoveIndex] - mLastAbsoluteYaw);
|
||||
|
||||
// Do we also include the relative yaw value?
|
||||
if (con->getControlSchemeAddYawToAbsRot())
|
||||
{
|
||||
F32 z = move->yaw;
|
||||
if (z > M_PI_F)
|
||||
z -= M_2PI_F;
|
||||
|
||||
mRot.z += z;
|
||||
}
|
||||
|
||||
// Constrain the range of mRot.z
|
||||
while (mRot.z < 0.0f)
|
||||
mRot.z += M_2PI_F;
|
||||
while (mRot.z > M_2PI_F)
|
||||
mRot.z -= M_2PI_F;
|
||||
}
|
||||
mLastAbsoluteYaw = emove->rotZ[emoveIndex];
|
||||
mLastAbsolutePitch = emove->rotX[emoveIndex];
|
||||
|
||||
// Head bank
|
||||
mHead.y = emove->rotY[emoveIndex];
|
||||
|
||||
// Constrain the range of mHead.y
|
||||
while (mHead.y > M_PI_F)
|
||||
mHead.y -= M_2PI_F;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
MatrixF zRot;
|
||||
zRot.set(EulerF(0.0f, 0.0f, mOwner->getRotation().asEulerF().z));
|
||||
|
||||
|
|
|
|||
|
|
@ -34,7 +34,6 @@
|
|||
#include "lighting/lightQuery.h"
|
||||
#include "scene/sceneManager.h"
|
||||
#include "gfx/bitmap/ddsFile.h"
|
||||
#include "gfx/bitmap/ddsUtils.h"
|
||||
#include "gfx/gfxTextureManager.h"
|
||||
#include "materials/materialFeatureTypes.h"
|
||||
#include "renderInstance/renderImposterMgr.h"
|
||||
|
|
|
|||
|
|
@ -44,10 +44,8 @@
|
|||
#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"
|
||||
|
|
@ -785,7 +783,6 @@ bool GameConnection::getControlCameraFov(F32 * fov)
|
|||
}
|
||||
if (cObj)
|
||||
{
|
||||
#ifdef TORQUE_EXPERIMENTAL_EC
|
||||
if (Entity* ent = dynamic_cast<Entity*>(cObj))
|
||||
{
|
||||
if (CameraInterface* camInterface = ent->getComponent<CameraInterface>())
|
||||
|
|
@ -795,11 +792,9 @@ bool GameConnection::getControlCameraFov(F32 * fov)
|
|||
}
|
||||
else
|
||||
{
|
||||
*fov = cObj->getCameraFov();
|
||||
*fov = cObj->getCameraFov();
|
||||
}
|
||||
#else
|
||||
*fov = cObj->getCameraFov();
|
||||
#endif
|
||||
|
||||
return(true);
|
||||
}
|
||||
|
||||
|
|
@ -819,7 +814,6 @@ bool GameConnection::isValidControlCameraFov(F32 fov)
|
|||
|
||||
if (cObj)
|
||||
{
|
||||
#ifdef TORQUE_EXPERIMENTAL_EC
|
||||
if (Entity* ent = dynamic_cast<Entity*>(cObj))
|
||||
{
|
||||
if (CameraInterface* camInterface = ent->getComponent<CameraInterface>())
|
||||
|
|
@ -831,9 +825,6 @@ bool GameConnection::isValidControlCameraFov(F32 fov)
|
|||
{
|
||||
return cObj->isValidCameraFov(fov);
|
||||
}
|
||||
#else
|
||||
return cObj->isValidCameraFov(fov);
|
||||
#endif
|
||||
}
|
||||
|
||||
return NULL;
|
||||
|
|
@ -851,8 +842,6 @@ bool GameConnection::setControlCameraFov(F32 fov)
|
|||
}
|
||||
if (cObj)
|
||||
{
|
||||
|
||||
#ifdef TORQUE_EXPERIMENTAL_EC
|
||||
F32 newFov = 90.f;
|
||||
if (Entity* ent = dynamic_cast<Entity*>(cObj))
|
||||
{
|
||||
|
|
@ -872,11 +861,6 @@ bool GameConnection::setControlCameraFov(F32 fov)
|
|||
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 )
|
||||
|
|
|
|||
|
|
@ -32,10 +32,8 @@
|
|||
#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()
|
||||
|
|
@ -277,12 +275,10 @@ void ProcessList::advanceObjects()
|
|||
onTickObject(pobj);
|
||||
}
|
||||
|
||||
#ifdef TORQUE_EXPERIMENTAL_EC
|
||||
for (U32 i = 0; i < UpdateInterface::all.size(); i++)
|
||||
{
|
||||
UpdateInterface::all[i]->processTick();
|
||||
}
|
||||
#endif
|
||||
|
||||
mTotalTicks++;
|
||||
|
||||
|
|
|
|||
|
|
@ -37,10 +37,8 @@
|
|||
#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 )
|
||||
|
||||
|
|
@ -137,7 +135,6 @@ 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]);
|
||||
|
|
@ -147,7 +144,6 @@ bool StdClientProcessList::advanceTime( SimTime timeDelta )
|
|||
|
||||
UpdateInterface::all[i]->interpolateTick(mLastDelta);
|
||||
}
|
||||
#endif
|
||||
|
||||
// Inform objects of total elapsed delta so they can advance
|
||||
// client side animations.
|
||||
|
|
@ -163,7 +159,6 @@ 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]);
|
||||
|
|
@ -176,7 +171,6 @@ bool StdClientProcessList::advanceTime( SimTime timeDelta )
|
|||
|
||||
UpdateInterface::all[i]->advanceTime(dt);
|
||||
}
|
||||
#endif
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -36,9 +36,7 @@
|
|||
#include "gui/editor/editorFunctions.h"
|
||||
#endif
|
||||
#include "console/engineAPI.h"
|
||||
#ifdef TORQUE_EXPERIMENTAL_EC
|
||||
#include "T3D/entity.h"
|
||||
#endif
|
||||
|
||||
IMPLEMENT_CONOBJECT(GuiTreeViewCtrl);
|
||||
|
||||
|
|
@ -647,20 +645,6 @@ void GuiTreeViewCtrl::Item::getTooltipText(U32 bufLen, char *buf)
|
|||
|
||||
bool GuiTreeViewCtrl::Item::isParent() const
|
||||
{
|
||||
#ifdef TORQUE_EXPERIMENTAL_EC
|
||||
//We might have a special case with entities
|
||||
//So if our entity either has children, or has some component with the EditorInspect interface, we return true
|
||||
if (mInspectorInfo.mObject)
|
||||
{
|
||||
Entity* e = dynamic_cast<Entity*>(mInspectorInfo.mObject.getObject());
|
||||
if (e)
|
||||
{
|
||||
if (e->size() > 0 || e->getComponentCount() != 0)
|
||||
return true;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
if(mState.test(VirtualParent))
|
||||
{
|
||||
if( !isInspectorData() )
|
||||
|
|
@ -3790,7 +3774,6 @@ void GuiTreeViewCtrl::onMouseDown(const GuiEvent & event)
|
|||
if( !item->isInspectorData() && item->mState.test(Item::VirtualParent) )
|
||||
onVirtualParentExpand(item);
|
||||
|
||||
#ifdef TORQUE_EXPERIMENTAL_EC
|
||||
//Slightly hacky, but I'm not sure of a better setup until we get major update to the editors
|
||||
//We check if our object is an entity, and if it is, we call a 'onInspect' function.
|
||||
//This function is pretty much a special notifier to the entity so if it has any behaviors that do special
|
||||
|
|
@ -3810,7 +3793,6 @@ void GuiTreeViewCtrl::onMouseDown(const GuiEvent & event)
|
|||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
mFlags.set( RebuildVisible );
|
||||
scrollVisible(item);
|
||||
|
|
@ -4558,12 +4540,10 @@ bool GuiTreeViewCtrl::objectSearch( const SimObject *object, Item **item )
|
|||
if ( !pItem )
|
||||
continue;
|
||||
|
||||
#ifdef TORQUE_EXPERIMENTAL_EC
|
||||
//A bit hackish, but we make a special exception here for items that are named 'Components', as they're merely
|
||||
//virtual parents to act as a container to an Entity's components
|
||||
if (pItem->mScriptInfo.mText == StringTable->insert("Components"))
|
||||
continue;
|
||||
#endif
|
||||
|
||||
SimObject *pObj = pItem->getObject();
|
||||
|
||||
|
|
@ -4628,11 +4608,10 @@ bool GuiTreeViewCtrl::onVirtualParentBuild(Item *item, bool bForceFullUpdate)
|
|||
|
||||
// Go through our items and purge those that have disappeared from
|
||||
// the set.
|
||||
#ifdef TORQUE_EXPERIMENTAL_EC
|
||||
|
||||
//Entities will be a special case here, if we're an entity, skip this step
|
||||
if (dynamic_cast<Entity*>(srcObj))
|
||||
return true;
|
||||
#endif
|
||||
|
||||
for( Item* ptr = item->mChild; ptr != NULL; )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -29,11 +29,9 @@
|
|||
#include "gui/containers/guiScrollCtrl.h"
|
||||
#include "gui/editor/inspector/customField.h"
|
||||
|
||||
#ifdef TORQUE_EXPERIMENTAL_EC
|
||||
#include "gui/editor/inspector/entityGroup.h"
|
||||
#include "gui/editor/inspector/mountingGroup.h"
|
||||
#include "gui/editor/inspector/componentGroup.h"
|
||||
#endif
|
||||
|
||||
IMPLEMENT_CONOBJECT(GuiInspector);
|
||||
|
||||
|
|
@ -589,7 +587,6 @@ void GuiInspector::refresh()
|
|||
mGroups.push_back(general);
|
||||
addObject(general);
|
||||
|
||||
#ifdef TORQUE_EXPERIMENTAL_EC
|
||||
//Entity inspector group
|
||||
if (mTargets.first()->getClassRep()->isSubclassOf("Entity"))
|
||||
{
|
||||
|
|
@ -624,7 +621,6 @@ void GuiInspector::refresh()
|
|||
addObject(compGroup);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
// Create the inspector groups for static fields.
|
||||
|
||||
|
|
|
|||
|
|
@ -26,9 +26,7 @@
|
|||
#include "gui/editor/inspector/dynamicField.h"
|
||||
#include "console/engineAPI.h"
|
||||
|
||||
#ifdef TORQUE_EXPERIMENTAL_EC
|
||||
#include "T3D/components/component.h"
|
||||
#endif
|
||||
|
||||
IMPLEMENT_CONOBJECT(GuiInspectorDynamicGroup);
|
||||
|
||||
|
|
@ -126,7 +124,6 @@ bool GuiInspectorDynamicGroup::inspectGroup()
|
|||
SimFieldDictionary * fieldDictionary = target->getFieldDictionary();
|
||||
for(SimFieldDictionaryIterator ditr(fieldDictionary); *ditr; ++ditr)
|
||||
{
|
||||
#ifdef TORQUE_EXPERIMENTAL_EC
|
||||
if (target->getClassRep()->isSubclassOf("Component"))
|
||||
{
|
||||
Component* compTarget = dynamic_cast<Component*>(target);
|
||||
|
|
@ -135,7 +132,7 @@ bool GuiInspectorDynamicGroup::inspectGroup()
|
|||
if (compField)
|
||||
continue;
|
||||
}
|
||||
#endif
|
||||
|
||||
if( i == 0 )
|
||||
{
|
||||
flist.increment();
|
||||
|
|
|
|||
|
|
@ -26,10 +26,8 @@
|
|||
#include "renderInstance/renderPassManager.h"
|
||||
#include "math/util/matrixSet.h"
|
||||
|
||||
#ifdef TORQUE_EXPERIMENTAL_EC
|
||||
#include "T3D/components/render/renderComponentInterface.h"
|
||||
#include "T3D/components/component.h"
|
||||
#endif
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
|
|
@ -108,7 +106,6 @@ void SceneRenderState::renderObjects( SceneObject** objects, U32 numObjects )
|
|||
object->prepRenderImage( this );
|
||||
}
|
||||
|
||||
#ifdef TORQUE_EXPERIMENTAL_EC
|
||||
U32 interfaceCount = RenderComponentInterface::all.size();
|
||||
for (U32 i = 0; i < RenderComponentInterface::all.size(); i++)
|
||||
{
|
||||
|
|
@ -119,7 +116,6 @@ void SceneRenderState::renderObjects( SceneObject** objects, U32 numObjects )
|
|||
RenderComponentInterface::all[i]->prepRenderImage(this);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
PROFILE_END();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue