mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-15 16:44:36 +00:00
commit
963ef1ecdb
15 changed files with 130 additions and 104 deletions
|
|
@ -495,13 +495,6 @@ void Camera::processTick(const Move* move)
|
||||||
|
|
||||||
if ( isMounted() )
|
if ( isMounted() )
|
||||||
{
|
{
|
||||||
// Fetch Mount Transform.
|
|
||||||
MatrixF mat;
|
|
||||||
mMount.object->getMountTransform( mMount.node, mMount.xfm, &mat );
|
|
||||||
|
|
||||||
// Apply.
|
|
||||||
setTransform( mat );
|
|
||||||
|
|
||||||
// Update SceneContainer.
|
// Update SceneContainer.
|
||||||
updateContainer();
|
updateContainer();
|
||||||
return;
|
return;
|
||||||
|
|
@ -868,16 +861,7 @@ void Camera::interpolateTick(F32 dt)
|
||||||
Parent::interpolateTick(dt);
|
Parent::interpolateTick(dt);
|
||||||
|
|
||||||
if ( isMounted() )
|
if ( isMounted() )
|
||||||
{
|
|
||||||
// Fetch Mount Transform.
|
|
||||||
MatrixF mat;
|
|
||||||
mMount.object->getRenderMountTransform( dt, mMount.node, mMount.xfm, &mat );
|
|
||||||
|
|
||||||
// Apply.
|
|
||||||
setRenderTransform( mat );
|
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
|
||||||
|
|
||||||
Point3F rot = mDelta.rot + mDelta.rotVec * dt;
|
Point3F rot = mDelta.rot + mDelta.rotVec * dt;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -590,7 +590,7 @@ void GameBase::onMount( SceneObject *obj, S32 node )
|
||||||
// Are we mounting to a GameBase object?
|
// Are we mounting to a GameBase object?
|
||||||
GameBase *gbaseObj = dynamic_cast<GameBase*>( obj );
|
GameBase *gbaseObj = dynamic_cast<GameBase*>( obj );
|
||||||
|
|
||||||
if ( gbaseObj && gbaseObj->getControlObject() != this )
|
if ( gbaseObj && gbaseObj->getControlObject() != this && gbaseObj->getControllingObject() != this)
|
||||||
processAfter( gbaseObj );
|
processAfter( gbaseObj );
|
||||||
|
|
||||||
if (!isGhost()) {
|
if (!isGhost()) {
|
||||||
|
|
|
||||||
|
|
@ -556,6 +556,9 @@ void Item::processTick(const Move* move)
|
||||||
{
|
{
|
||||||
Parent::processTick(move);
|
Parent::processTick(move);
|
||||||
|
|
||||||
|
if ( isMounted() )
|
||||||
|
return;
|
||||||
|
|
||||||
//
|
//
|
||||||
if (mCollisionObject && !--mCollisionTimeout)
|
if (mCollisionObject && !--mCollisionTimeout)
|
||||||
mCollisionObject = 0;
|
mCollisionObject = 0;
|
||||||
|
|
@ -606,6 +609,8 @@ void Item::processTick(const Move* move)
|
||||||
void Item::interpolateTick(F32 dt)
|
void Item::interpolateTick(F32 dt)
|
||||||
{
|
{
|
||||||
Parent::interpolateTick(dt);
|
Parent::interpolateTick(dt);
|
||||||
|
if ( isMounted() )
|
||||||
|
return;
|
||||||
|
|
||||||
// Client side interpolation
|
// Client side interpolation
|
||||||
Point3F pos = delta.pos + delta.posVec * dt;
|
Point3F pos = delta.pos + delta.posVec * dt;
|
||||||
|
|
@ -1365,6 +1370,8 @@ void Item::buildConvex(const Box3F& box, Convex* convex)
|
||||||
void Item::advanceTime(F32 dt)
|
void Item::advanceTime(F32 dt)
|
||||||
{
|
{
|
||||||
Parent::advanceTime(dt);
|
Parent::advanceTime(dt);
|
||||||
|
if ( isMounted() )
|
||||||
|
return;
|
||||||
|
|
||||||
if( mRotate )
|
if( mRotate )
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -442,22 +442,12 @@ void SpawnSphere::unpackUpdate(NetConnection * con, BitStream * stream)
|
||||||
|
|
||||||
void SpawnSphere::processTick( const Move *move )
|
void SpawnSphere::processTick( const Move *move )
|
||||||
{
|
{
|
||||||
if ( isServerObject() && isMounted() )
|
Parent::processTick( move );
|
||||||
{
|
|
||||||
MatrixF mat( true );
|
|
||||||
mMount.object->getRenderMountTransform( 0.f, mMount.node, mMount.xfm, &mat );
|
|
||||||
setTransform( mat );
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void SpawnSphere::advanceTime( F32 timeDelta )
|
void SpawnSphere::advanceTime( F32 timeDelta )
|
||||||
{
|
{
|
||||||
if ( isMounted() )
|
Parent::advanceTime( timeDelta );
|
||||||
{
|
|
||||||
MatrixF mat( true );
|
|
||||||
mMount.object->getRenderMountTransform( 0.f, mMount.node, mMount.xfm, &mat );
|
|
||||||
setTransform( mat );
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void SpawnSphere::initPersistFields()
|
void SpawnSphere::initPersistFields()
|
||||||
|
|
|
||||||
|
|
@ -5316,10 +5316,10 @@ void Player::setPosition(const Point3F& pos,const Point3F& rot)
|
||||||
MatrixF mat;
|
MatrixF mat;
|
||||||
if (isMounted()) {
|
if (isMounted()) {
|
||||||
// Use transform from mounted object
|
// Use transform from mounted object
|
||||||
MatrixF nmat,zrot;
|
//MatrixF nmat,zrot;
|
||||||
mMount.object->getMountTransform( mMount.node, mMount.xfm, &nmat );
|
mMount.object->getMountTransform( mMount.node, mMount.xfm, &mat );
|
||||||
zrot.set(EulerF(0.0f, 0.0f, rot.z));
|
//zrot.set(EulerF(0.0f, 0.0f, rot.z));
|
||||||
mat.mul(nmat,zrot);
|
//mat.mul(nmat,zrot);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
mat.set(EulerF(0.0f, 0.0f, rot.z));
|
mat.set(EulerF(0.0f, 0.0f, rot.z));
|
||||||
|
|
@ -5338,10 +5338,10 @@ void Player::setRenderPosition(const Point3F& pos, const Point3F& rot, F32 dt)
|
||||||
MatrixF mat;
|
MatrixF mat;
|
||||||
if (isMounted()) {
|
if (isMounted()) {
|
||||||
// Use transform from mounted object
|
// Use transform from mounted object
|
||||||
MatrixF nmat,zrot;
|
//MatrixF nmat,zrot;
|
||||||
mMount.object->getRenderMountTransform( dt, mMount.node, mMount.xfm, &nmat );
|
mMount.object->getRenderMountTransform( dt, mMount.node, mMount.xfm, &mat );
|
||||||
zrot.set(EulerF(0.0f, 0.0f, rot.z));
|
//zrot.set(EulerF(0.0f, 0.0f, rot.z));
|
||||||
mat.mul(nmat,zrot);
|
//mat.mul(nmat,zrot);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
EulerF orient(0.0f, 0.0f, rot.z);
|
EulerF orient(0.0f, 0.0f, rot.z);
|
||||||
|
|
|
||||||
|
|
@ -732,6 +732,8 @@ void RigidShape::onRemove()
|
||||||
void RigidShape::processTick(const Move* move)
|
void RigidShape::processTick(const Move* move)
|
||||||
{
|
{
|
||||||
Parent::processTick(move);
|
Parent::processTick(move);
|
||||||
|
if ( isMounted() )
|
||||||
|
return;
|
||||||
|
|
||||||
// Warp to catch up to server
|
// Warp to catch up to server
|
||||||
if (mDelta.warpCount < mDelta.warpTicks)
|
if (mDelta.warpCount < mDelta.warpTicks)
|
||||||
|
|
@ -795,6 +797,8 @@ void RigidShape::processTick(const Move* move)
|
||||||
void RigidShape::interpolateTick(F32 dt)
|
void RigidShape::interpolateTick(F32 dt)
|
||||||
{
|
{
|
||||||
Parent::interpolateTick(dt);
|
Parent::interpolateTick(dt);
|
||||||
|
if ( isMounted() )
|
||||||
|
return;
|
||||||
|
|
||||||
if(dt == 0.0f)
|
if(dt == 0.0f)
|
||||||
setRenderPosition(mDelta.pos, mDelta.rot[1]);
|
setRenderPosition(mDelta.pos, mDelta.rot[1]);
|
||||||
|
|
@ -814,6 +818,9 @@ void RigidShape::advanceTime(F32 dt)
|
||||||
|
|
||||||
updateFroth(dt);
|
updateFroth(dt);
|
||||||
|
|
||||||
|
if ( isMounted() )
|
||||||
|
return;
|
||||||
|
|
||||||
// Update 3rd person camera offset. Camera update is done
|
// Update 3rd person camera offset. Camera update is done
|
||||||
// here as it's a client side only animation.
|
// here as it's a client side only animation.
|
||||||
mCameraOffset -=
|
mCameraOffset -=
|
||||||
|
|
|
||||||
|
|
@ -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 )
|
||||||
|
|
|
||||||
|
|
@ -232,22 +232,6 @@ void StaticShape::processTick(const Move* move)
|
||||||
setImageTriggerState(0,move->trigger[0]);
|
setImageTriggerState(0,move->trigger[0]);
|
||||||
setImageTriggerState(1,move->trigger[1]);
|
setImageTriggerState(1,move->trigger[1]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isMounted()) {
|
|
||||||
MatrixF mat;
|
|
||||||
mMount.object->getMountTransform( mMount.node, mMount.xfm, &mat );
|
|
||||||
Parent::setTransform(mat);
|
|
||||||
Parent::setRenderTransform(mat);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void StaticShape::interpolateTick(F32 delta)
|
|
||||||
{
|
|
||||||
if (isMounted()) {
|
|
||||||
MatrixF mat;
|
|
||||||
mMount.object->getRenderMountTransform( delta, mMount.node, mMount.xfm, &mat );
|
|
||||||
Parent::setRenderTransform(mat);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void StaticShape::setTransform(const MatrixF& mat)
|
void StaticShape::setTransform(const MatrixF& mat)
|
||||||
|
|
|
||||||
|
|
@ -75,7 +75,6 @@ public:
|
||||||
bool onNewDataBlock(GameBaseData *dptr, bool reload);
|
bool onNewDataBlock(GameBaseData *dptr, bool reload);
|
||||||
|
|
||||||
void processTick(const Move *move);
|
void processTick(const Move *move);
|
||||||
void interpolateTick(F32 delta);
|
|
||||||
void setTransform(const MatrixF &mat);
|
void setTransform(const MatrixF &mat);
|
||||||
|
|
||||||
U32 packUpdate (NetConnection *conn, U32 mask, BitStream *stream);
|
U32 packUpdate (NetConnection *conn, U32 mask, BitStream *stream);
|
||||||
|
|
|
||||||
|
|
@ -520,10 +520,15 @@ void TSStatic::reSkin()
|
||||||
|
|
||||||
void TSStatic::processTick( const Move *move )
|
void TSStatic::processTick( const Move *move )
|
||||||
{
|
{
|
||||||
AssertFatal( mPlayAmbient && mAmbientThread, "TSSTatic::adanceTime called with nothing to play." );
|
if ( isServerObject() && mPlayAmbient && mAmbientThread )
|
||||||
|
|
||||||
if ( isServerObject() )
|
|
||||||
mShapeInstance->advanceTime( TickSec, mAmbientThread );
|
mShapeInstance->advanceTime( TickSec, mAmbientThread );
|
||||||
|
|
||||||
|
if ( isMounted() )
|
||||||
|
{
|
||||||
|
MatrixF mat( true );
|
||||||
|
mMount.object->getMountTransform(mMount.node, mMount.xfm, &mat );
|
||||||
|
setTransform( mat );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void TSStatic::interpolateTick( F32 delta )
|
void TSStatic::interpolateTick( F32 delta )
|
||||||
|
|
@ -532,14 +537,20 @@ void TSStatic::interpolateTick( F32 delta )
|
||||||
|
|
||||||
void TSStatic::advanceTime( F32 dt )
|
void TSStatic::advanceTime( F32 dt )
|
||||||
{
|
{
|
||||||
AssertFatal( mPlayAmbient && mAmbientThread, "TSSTatic::advanceTime called with nothing to play." );
|
if ( mPlayAmbient && mAmbientThread )
|
||||||
|
mShapeInstance->advanceTime( dt, mAmbientThread );
|
||||||
mShapeInstance->advanceTime( dt, mAmbientThread );
|
|
||||||
|
if ( isMounted() )
|
||||||
|
{
|
||||||
|
MatrixF mat( true );
|
||||||
|
mMount.object->getRenderMountTransform( dt, mMount.node, mMount.xfm, &mat );
|
||||||
|
setRenderTransform( mat );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void TSStatic::_updateShouldTick()
|
void TSStatic::_updateShouldTick()
|
||||||
{
|
{
|
||||||
bool shouldTick = mPlayAmbient && mAmbientThread;
|
bool shouldTick = (mPlayAmbient && mAmbientThread) || isMounted();
|
||||||
|
|
||||||
if ( isTicking() != shouldTick )
|
if ( isTicking() != shouldTick )
|
||||||
setProcessTick( shouldTick );
|
setProcessTick( shouldTick );
|
||||||
|
|
@ -708,12 +719,15 @@ void TSStatic::onScaleChanged()
|
||||||
else
|
else
|
||||||
_updatePhysics();
|
_updatePhysics();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
setMaskBits( ScaleMask );
|
||||||
}
|
}
|
||||||
|
|
||||||
void TSStatic::setTransform(const MatrixF & mat)
|
void TSStatic::setTransform(const MatrixF & mat)
|
||||||
{
|
{
|
||||||
Parent::setTransform(mat);
|
Parent::setTransform(mat);
|
||||||
setMaskBits( TransformMask );
|
if ( !isMounted() )
|
||||||
|
setMaskBits( TransformMask );
|
||||||
|
|
||||||
if ( mPhysicsRep )
|
if ( mPhysicsRep )
|
||||||
mPhysicsRep->setTransform( mat );
|
mPhysicsRep->setTransform( mat );
|
||||||
|
|
@ -734,9 +748,15 @@ U32 TSStatic::packUpdate(NetConnection *con, U32 mask, BitStream *stream)
|
||||||
{
|
{
|
||||||
U32 retMask = Parent::packUpdate(con, mask, stream);
|
U32 retMask = Parent::packUpdate(con, mask, stream);
|
||||||
|
|
||||||
mathWrite( *stream, getTransform() );
|
if ( stream->writeFlag( mask & TransformMask ) )
|
||||||
mathWrite( *stream, getScale() );
|
mathWrite( *stream, getTransform() );
|
||||||
stream->writeString( mShapeName );
|
|
||||||
|
if ( stream->writeFlag( mask & ScaleMask ) )
|
||||||
|
{
|
||||||
|
// Only write one bit if the scale is one.
|
||||||
|
if ( stream->writeFlag( mObjScale != Point3F::One ) )
|
||||||
|
mathWrite( *stream, mObjScale );
|
||||||
|
}
|
||||||
|
|
||||||
if ( stream->writeFlag( mask & UpdateCollisionMask ) )
|
if ( stream->writeFlag( mask & UpdateCollisionMask ) )
|
||||||
stream->write( (U32)mCollisionType );
|
stream->write( (U32)mCollisionType );
|
||||||
|
|
@ -744,17 +764,21 @@ U32 TSStatic::packUpdate(NetConnection *con, U32 mask, BitStream *stream)
|
||||||
if ( stream->writeFlag( mask & SkinMask ) )
|
if ( stream->writeFlag( mask & SkinMask ) )
|
||||||
con->packNetStringHandleU( stream, mSkinNameHandle );
|
con->packNetStringHandleU( stream, mSkinNameHandle );
|
||||||
|
|
||||||
stream->write( (U32)mDecalType );
|
if (stream->writeFlag(mask & AdvancedStaticOptionsMask))
|
||||||
|
{
|
||||||
|
stream->writeString(mShapeName);
|
||||||
|
stream->write((U32)mDecalType);
|
||||||
|
|
||||||
stream->writeFlag( mAllowPlayerStep );
|
stream->writeFlag(mAllowPlayerStep);
|
||||||
stream->writeFlag( mMeshCulling );
|
stream->writeFlag(mMeshCulling);
|
||||||
stream->writeFlag( mUseOriginSort );
|
stream->writeFlag(mUseOriginSort);
|
||||||
|
|
||||||
stream->write( mRenderNormalScalar );
|
stream->write(mRenderNormalScalar);
|
||||||
|
|
||||||
stream->write( mForceDetail );
|
stream->write(mForceDetail);
|
||||||
|
|
||||||
stream->writeFlag( mPlayAmbient );
|
stream->writeFlag(mPlayAmbient);
|
||||||
|
}
|
||||||
|
|
||||||
if ( stream->writeFlag(mUseAlphaFade) )
|
if ( stream->writeFlag(mUseAlphaFade) )
|
||||||
{
|
{
|
||||||
|
|
@ -777,14 +801,25 @@ void TSStatic::unpackUpdate(NetConnection *con, BitStream *stream)
|
||||||
{
|
{
|
||||||
Parent::unpackUpdate(con, stream);
|
Parent::unpackUpdate(con, stream);
|
||||||
|
|
||||||
MatrixF mat;
|
if ( stream->readFlag() ) // TransformMask
|
||||||
Point3F scale;
|
{
|
||||||
mathRead( *stream, &mat );
|
MatrixF mat;
|
||||||
mathRead( *stream, &scale );
|
mathRead( *stream, &mat );
|
||||||
setScale( scale);
|
setTransform(mat);
|
||||||
setTransform(mat);
|
setRenderTransform(mat);
|
||||||
|
}
|
||||||
|
|
||||||
mShapeName = stream->readSTString();
|
if ( stream->readFlag() ) // ScaleMask
|
||||||
|
{
|
||||||
|
if ( stream->readFlag() )
|
||||||
|
{
|
||||||
|
VectorF scale;
|
||||||
|
mathRead( *stream, &scale );
|
||||||
|
setScale( scale );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
setScale( Point3F::One );
|
||||||
|
}
|
||||||
|
|
||||||
if ( stream->readFlag() ) // UpdateCollisionMask
|
if ( stream->readFlag() ) // UpdateCollisionMask
|
||||||
{
|
{
|
||||||
|
|
@ -812,17 +847,20 @@ void TSStatic::unpackUpdate(NetConnection *con, BitStream *stream)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
stream->read( (U32*)&mDecalType );
|
if (stream->readFlag()) // AdvancedStaticOptionsMask
|
||||||
|
{
|
||||||
|
mShapeName = stream->readSTString();
|
||||||
|
|
||||||
mAllowPlayerStep = stream->readFlag();
|
stream->read((U32*)&mDecalType);
|
||||||
mMeshCulling = stream->readFlag();
|
|
||||||
mUseOriginSort = stream->readFlag();
|
|
||||||
|
|
||||||
stream->read( &mRenderNormalScalar );
|
mAllowPlayerStep = stream->readFlag();
|
||||||
|
mMeshCulling = stream->readFlag();
|
||||||
|
mUseOriginSort = stream->readFlag();
|
||||||
|
|
||||||
stream->read( &mForceDetail );
|
stream->read(&mRenderNormalScalar);
|
||||||
|
|
||||||
mPlayAmbient = stream->readFlag();
|
stream->read(&mForceDetail);
|
||||||
|
}
|
||||||
|
|
||||||
mUseAlphaFade = stream->readFlag();
|
mUseAlphaFade = stream->readFlag();
|
||||||
if (mUseAlphaFade)
|
if (mUseAlphaFade)
|
||||||
|
|
@ -1160,6 +1198,19 @@ void TSStaticPolysoupConvex::getFeatures(const MatrixF& mat,const VectorF& n, Co
|
||||||
// All done!
|
// All done!
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void TSStatic::onMount( SceneObject *obj, S32 node )
|
||||||
|
{
|
||||||
|
Parent::onMount(obj, node);
|
||||||
|
_updateShouldTick();
|
||||||
|
}
|
||||||
|
|
||||||
|
void TSStatic::onUnmount( SceneObject *obj, S32 node )
|
||||||
|
{
|
||||||
|
Parent::onUnmount( obj, node );
|
||||||
|
setMaskBits( TransformMask );
|
||||||
|
_updateShouldTick();
|
||||||
|
}
|
||||||
|
|
||||||
//------------------------------------------------------------------------
|
//------------------------------------------------------------------------
|
||||||
//These functions are duplicated in tsStatic and shapeBase.
|
//These functions are duplicated in tsStatic and shapeBase.
|
||||||
//They each function a little differently; but achieve the same purpose of gathering
|
//They each function a little differently; but achieve the same purpose of gathering
|
||||||
|
|
|
||||||
|
|
@ -218,6 +218,8 @@ public:
|
||||||
void onScaleChanged();
|
void onScaleChanged();
|
||||||
void prepRenderImage( SceneRenderState *state );
|
void prepRenderImage( SceneRenderState *state );
|
||||||
void inspectPostApply();
|
void inspectPostApply();
|
||||||
|
virtual void onMount( SceneObject *obj, S32 node );
|
||||||
|
virtual void onUnmount( SceneObject *obj, S32 node );
|
||||||
|
|
||||||
/// The type of mesh data use for collision queries.
|
/// The type of mesh data use for collision queries.
|
||||||
MeshType getCollisionType() const { return mCollisionType; }
|
MeshType getCollisionType() const { return mCollisionType; }
|
||||||
|
|
|
||||||
|
|
@ -632,13 +632,6 @@ void TurretShape::processTick(const Move* move)
|
||||||
if (!isGhost())
|
if (!isGhost())
|
||||||
updateAnimation(TickSec);
|
updateAnimation(TickSec);
|
||||||
|
|
||||||
if (isMounted()) {
|
|
||||||
MatrixF mat;
|
|
||||||
mMount.object->getMountTransform( mMount.node, mMount.xfm, &mat );
|
|
||||||
ShapeBase::setTransform(mat);
|
|
||||||
ShapeBase::setRenderTransform(mat);
|
|
||||||
}
|
|
||||||
|
|
||||||
updateMove(move);
|
updateMove(move);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -679,19 +672,11 @@ void TurretShape::advanceTime(F32 dt)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// If there is a recoil or image-based thread then
|
|
||||||
// we also need to update the nodes.
|
|
||||||
if (mRecoilThread || mImageStateThread)
|
|
||||||
updateNodes = true;
|
|
||||||
|
|
||||||
Parent::advanceTime(dt);
|
Parent::advanceTime(dt);
|
||||||
|
|
||||||
updateAnimation(dt);
|
updateAnimation(dt);
|
||||||
|
|
||||||
if (updateNodes)
|
_setRotation(mRot);
|
||||||
{
|
|
||||||
_updateNodes(mRot);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void TurretShape::setTransform( const MatrixF& mat )
|
void TurretShape::setTransform( const MatrixF& mat )
|
||||||
|
|
|
||||||
|
|
@ -859,6 +859,8 @@ void Vehicle::processTick(const Move* move)
|
||||||
PROFILE_SCOPE( Vehicle_ProcessTick );
|
PROFILE_SCOPE( Vehicle_ProcessTick );
|
||||||
|
|
||||||
Parent::processTick(move);
|
Parent::processTick(move);
|
||||||
|
if ( isMounted() )
|
||||||
|
return;
|
||||||
|
|
||||||
// Warp to catch up to server
|
// Warp to catch up to server
|
||||||
if (mDelta.warpCount < mDelta.warpTicks)
|
if (mDelta.warpCount < mDelta.warpTicks)
|
||||||
|
|
@ -929,6 +931,8 @@ void Vehicle::interpolateTick(F32 dt)
|
||||||
PROFILE_SCOPE( Vehicle_InterpolateTick );
|
PROFILE_SCOPE( Vehicle_InterpolateTick );
|
||||||
|
|
||||||
Parent::interpolateTick(dt);
|
Parent::interpolateTick(dt);
|
||||||
|
if ( isMounted() )
|
||||||
|
return;
|
||||||
|
|
||||||
if(dt == 0.0f)
|
if(dt == 0.0f)
|
||||||
setRenderPosition(mDelta.pos, mDelta.rot[1]);
|
setRenderPosition(mDelta.pos, mDelta.rot[1]);
|
||||||
|
|
|
||||||
|
|
@ -945,7 +945,8 @@ void SceneObject::setProcessTick( bool t )
|
||||||
|
|
||||||
if ( mProcessTick )
|
if ( mProcessTick )
|
||||||
{
|
{
|
||||||
plUnlink();
|
if ( !getMountedObjectCount() )
|
||||||
|
plUnlink(); // Only unlink if there is nothing mounted to us
|
||||||
mProcessTick = false;
|
mProcessTick = false;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
||||||
|
|
@ -77,4 +77,4 @@ if(isFile("./gameObjects/GameObjectManager.cs"))
|
||||||
{
|
{
|
||||||
exec("./gameObjects/GameObjectManager.cs");
|
exec("./gameObjects/GameObjectManager.cs");
|
||||||
execGameObjects();
|
execGameObjects();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue