Browse Source

ShapeBase Mounting
Added mount transforms to ShapeBase

OTHGMars 11 years ago
parent
commit
b5a957dfdc
1 changed files with 12 additions and 0 deletions
  1. 12 0
      Engine/source/T3D/shapeBase.cpp

+ 12 - 0
Engine/source/T3D/shapeBase.cpp

@@ -1324,6 +1324,12 @@ void ShapeBase::processTick(const Move* move)
       if (mWhiteOut <= 0.0)
       if (mWhiteOut <= 0.0)
          mWhiteOut = 0.0;
          mWhiteOut = 0.0;
    }
    }
+
+   if (isMounted()) {
+      MatrixF mat;
+      mMount.object->getMountTransform( mMount.node, mMount.xfm, &mat );
+      Parent::setTransform(mat);
+   }
 }
 }
 
 
 void ShapeBase::advanceTime(F32 dt)
 void ShapeBase::advanceTime(F32 dt)
@@ -1382,6 +1388,12 @@ void ShapeBase::advanceTime(F32 dt)
             mFadeVal = 1 - mFadeVal;
             mFadeVal = 1 - mFadeVal;
       }
       }
    }
    }
+
+   if (isMounted()) {
+      MatrixF mat;
+      mMount.object->getRenderMountTransform( 0.0f, mMount.node, mMount.xfm, &mat );
+      Parent::setRenderTransform(mat);
+   }
 }
 }
 
 
 void ShapeBase::setControllingClient( GameConnection* client )
 void ShapeBase::setControllingClient( GameConnection* client )