mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-04-22 21:05:39 +00:00
Merge pull request #2190 from Areloch/AssetCodeCleanupRoundOne
Some code cleanup on assets, entities and components, round 1
This commit is contained in:
commit
e18661d861
15 changed files with 59 additions and 41 deletions
|
|
@ -613,6 +613,9 @@ void AnimationComponent::advanceThreads(F32 dt)
|
|||
if (!mOwnerRenderInst)
|
||||
return;
|
||||
|
||||
if (mOwnerShapeInstance == nullptr || !getShape())
|
||||
return;
|
||||
|
||||
for (U32 i = 0; i < MaxScriptThreads; i++)
|
||||
{
|
||||
Thread& st = mAnimationThreads[i];
|
||||
|
|
|
|||
|
|
@ -142,10 +142,12 @@ CollisionComponent::CollisionComponent() : Component()
|
|||
StaticShapeObjectType | VehicleObjectType |
|
||||
VehicleBlockerObjectType | DynamicShapeObjectType | StaticObjectType | EntityObjectType | TriggerObjectType);
|
||||
|
||||
mPhysicsRep = NULL;
|
||||
mPhysicsWorld = NULL;
|
||||
mPhysicsRep = nullptr;
|
||||
mPhysicsWorld = nullptr;
|
||||
|
||||
mTimeoutList = NULL;
|
||||
mTimeoutList = nullptr;
|
||||
|
||||
mAnimated = false;
|
||||
}
|
||||
|
||||
CollisionComponent::~CollisionComponent()
|
||||
|
|
|
|||
|
|
@ -67,6 +67,13 @@ Component::Component()
|
|||
mOriginatingAssetId = StringTable->EmptyString();
|
||||
|
||||
mIsServerObject = true;
|
||||
|
||||
componentIdx = 0;
|
||||
|
||||
mHidden = false;
|
||||
mEnabled = true;
|
||||
|
||||
mDirtyMaskBits = 0;
|
||||
}
|
||||
|
||||
Component::~Component()
|
||||
|
|
@ -535,7 +542,7 @@ const char * Component::getDescriptionText(const char *desc)
|
|||
if (desc == NULL)
|
||||
return NULL;
|
||||
|
||||
char *newDesc;
|
||||
char *newDesc = "";
|
||||
|
||||
// [tom, 1/12/2007] If it isn't a file, just do it the easy way
|
||||
if (!Platform::isFile(desc))
|
||||
|
|
@ -568,7 +575,7 @@ const char * Component::getDescriptionText(const char *desc)
|
|||
}
|
||||
|
||||
str.close();
|
||||
delete stream;
|
||||
//delete stream;
|
||||
|
||||
return newDesc;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -30,6 +30,10 @@ StateMachine::StateMachine()
|
|||
mStartingState = "";
|
||||
|
||||
mCurCreateState = NULL;
|
||||
|
||||
mStateMachineFile = StringTable->EmptyString();
|
||||
|
||||
mCurCreateState = nullptr;
|
||||
}
|
||||
|
||||
StateMachine::~StateMachine()
|
||||
|
|
|
|||
|
|
@ -158,6 +158,8 @@ public:
|
|||
{
|
||||
if (index <= mFields.size())
|
||||
return mFields[index];
|
||||
|
||||
return StateField(); //return a blank one
|
||||
}
|
||||
|
||||
Signal< void(StateMachine*, S32 stateIdx) > onStateChanged;
|
||||
|
|
|
|||
|
|
@ -119,8 +119,11 @@ PlayerControllerComponent::PlayerControllerComponent() : Component()
|
|||
|
||||
mInputVelocity = Point3F(0, 0, 0);
|
||||
|
||||
mPhysicsRep = NULL;
|
||||
mPhysicsWorld = NULL;
|
||||
mPhysicsRep = nullptr;
|
||||
mPhysicsWorld = nullptr;
|
||||
|
||||
mOwnerCollisionInterface = nullptr;
|
||||
mIntegrationCount = 0;
|
||||
}
|
||||
|
||||
PlayerControllerComponent::~PlayerControllerComponent()
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ ImplementEnumType(BatchingMode,
|
|||
//////////////////////////////////////////////////////////////////////////
|
||||
// Constructor/Destructor
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
MeshComponent::MeshComponent() : Component()
|
||||
MeshComponent::MeshComponent() : Component(), mShape(nullptr), mRenderMode(Individual)
|
||||
{
|
||||
mFriendlyName = "Mesh Component";
|
||||
mComponentType = "Render";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue