mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-15 16:44:36 +00:00
add a setControllingClient method to vehicles referencing the shapebase class direct.
fix shapebase::setControllingClient swap getControllingObject() test
This commit is contained in:
parent
54a2235128
commit
d960f941e1
3 changed files with 6 additions and 1 deletions
|
|
@ -1572,7 +1572,7 @@ void ShapeBase::setControllingClient( GameConnection* client )
|
||||||
|
|
||||||
gSFX3DWorld->setListener( NULL );
|
gSFX3DWorld->setListener( NULL );
|
||||||
}
|
}
|
||||||
else if( client && client->isConnectionToServer() && !getControllingObject() )
|
else if( client && client->isConnectionToServer() && (getControllingObject() != this) )
|
||||||
{
|
{
|
||||||
// We're on the local client and not controlled by another object, so make
|
// We're on the local client and not controlled by another object, so make
|
||||||
// us the current SFX listener.
|
// us the current SFX listener.
|
||||||
|
|
|
||||||
|
|
@ -1376,6 +1376,10 @@ void Vehicle::unpackUpdate(NetConnection *con, BitStream *stream)
|
||||||
setEnergyLevel(stream->readFloat(8) * mDataBlock->maxEnergy);
|
setEnergyLevel(stream->readFloat(8) * mDataBlock->maxEnergy);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Vehicle::setControllingClient(GameConnection* client)
|
||||||
|
{
|
||||||
|
ShapeBase::setControllingClient(client);
|
||||||
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -171,6 +171,7 @@ class Vehicle : public RigidShape
|
||||||
void readPacketData (GameConnection * conn, BitStream *stream);
|
void readPacketData (GameConnection * conn, BitStream *stream);
|
||||||
U32 packUpdate (NetConnection *conn, U32 mask, BitStream *stream);
|
U32 packUpdate (NetConnection *conn, U32 mask, BitStream *stream);
|
||||||
void unpackUpdate(NetConnection *conn, BitStream *stream);
|
void unpackUpdate(NetConnection *conn, BitStream *stream);
|
||||||
|
void setControllingClient(GameConnection* connection);
|
||||||
|
|
||||||
void updateLiftoffDust( F32 dt );
|
void updateLiftoffDust( F32 dt );
|
||||||
void updateDamageSmoke( F32 dt );
|
void updateDamageSmoke( F32 dt );
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue