Skip to content

static anaylsis results: shapebase - #1801

Merged
Areloch merged 2 commits into
TorqueGameEngines:developmentfrom
Azaezel:alpha41/ShapeBaseStaticAnalysis
Aug 6, 2026
Merged

static anaylsis results: shapebase#1801
Areloch merged 2 commits into
TorqueGameEngines:developmentfrom
Azaezel:alpha41/ShapeBaseStaticAnalysis

Conversation

@Azaezel

@Azaezel Azaezel commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

if( !mDataBlock->debris )
{
mDataBlock->debris = new DebrisData;
-This was spinning up a new default debris per datablock at blowup usage time. so just referenced a static one.

-Forgot to clone the mAIControllData for the copy constructor, leading to unassigned behaviour.

-Sim::findObject( debrisID, debris ); doesn't need called twice bck to back -Neither does updateMass();

-Make sure there is a mControllingObject before we call mControllingObject->mMount.object

-Make sure there is a mShapeInstance in all variants of ShapeBase::getNodeTransform -Likewise with getTargetName(index);

-Be consistent with the return for getLastClipName()

-Properly clean up the mTypeMask if you try to assign an AIController and it fails. mTypeMask |= ~AIObjectType; actually flips everything but that one on.
the proper formulation is mTypeMask &= ~AIObjectType;

Azaezel added 2 commits July 30, 2026 21:11
   if( !mDataBlock->debris )
   {
      mDataBlock->debris = new DebrisData;
-This was spinning up a new default debris per datablock at blowup usage time. so just referenced a static one.

-Forgot to clone the mAIControllData for the copy constructor, leading to unassigned behaviour.

-Sim::findObject( debrisID, debris ); doesn't need called twice bck to back
-Neither does updateMass();

-Make sure there *is* a mControllingObject before we call mControllingObject->mMount.object

-Make sure there is a mShapeInstance in all variants of ShapeBase::getNodeTransform
-Likewise with  getTargetName(index);

-Be consistent with the return for getLastClipName()

-Properly clean up the mTypeMask if you try to assign an AIController and it fails.    mTypeMask |= ~AIObjectType; actually flips everything *but* that one on.
the proper formulation is mTypeMask &= ~AIObjectType;
@Areloch
Areloch merged commit fb1f161 into TorqueGameEngines:development Aug 6, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants