Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions Engine/source/T3D/gameBase/gameBase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -666,7 +666,8 @@ void GameBase::onMount( SceneObject *obj, S32 node )

if (!isGhost()) {
setMaskBits(MountedMask);
mDataBlock->onMount_callback( this, obj, node );
if (mDataBlock)
mDataBlock->onMount_callback( this, obj, node );
}
}

Expand All @@ -681,7 +682,8 @@ void GameBase::onUnmount( SceneObject *obj, S32 node )

if (!isGhost()) {
setMaskBits(MountedMask);
mDataBlock->onUnmount_callback( this, obj, node );
if (mDataBlock)
mDataBlock->onUnmount_callback( this, obj, node );
}
}

Expand Down
10 changes: 1 addition & 9 deletions Engine/source/scene/sceneObject.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1220,7 +1220,7 @@ void SceneObject::resolveMountPID()
if ( mMountPID )
{
SceneObject *obj = dynamic_cast< SceneObject* >( mMountPID->getObject() );
if ( obj != mMount.object)
if (obj && obj != mMount.object)
obj->mountObject( this, mMount.node, mMount.xfm );
}
}
Expand Down Expand Up @@ -1678,15 +1678,7 @@ void SceneObject::PerformUpdatesForChildren(MatrixF mat){
// parent have moved
void SceneObject::updateChildTransform(){
if (getParent() != NULL){
MatrixF one;
MatrixF two;
MatrixF three;
MatrixF four;
MatrixF mat;
one= getTransform();
two = getParent()->getTransform();
one.affineInverse();
four.mul(two,one);
mat.mul(getParent()->mLastXform,getTransform());
setTransform(mat);
}
Expand Down
2 changes: 2 additions & 0 deletions Engine/source/sim/netObject.h
Original file line number Diff line number Diff line change
Expand Up @@ -411,9 +411,11 @@ class NetObject : public SimGroup

/// @}
protected:
#ifdef TORQUE_AFX_ENABLED
U16 mScope_id;
U16 mScope_refs;
bool mScope_registered;
#endif
virtual void onScopeIdChange() { }
public:
enum { SCOPE_ID_BITS = 14 };
Expand Down
Loading