Merge pull request #870 from eightyeight/fix-ear-transform

Andrew's fix for ear transform with detached camera
This commit is contained in:
Daniel Buckmaster 2014-10-28 14:39:09 +11:00
commit 74e328d09b

View file

@ -91,7 +91,9 @@ void SFX3DObject::getEarTransform( MatrixF& transform ) const
if ( !shapeInstance ) if ( !shapeInstance )
{ {
// Just in case. // Just in case.
transform = mObject->getTransform(); GameConnection* connection = dynamic_cast<GameConnection *>(NetConnection::getConnectionToServer());
if ( !connection || !connection->getControlCameraTransform( 0.0f, &transform ) )
transform = mObject->getTransform();
return; return;
} }