suggested revision

This commit is contained in:
Azaezel 2015-08-06 21:56:46 -05:00
parent af38320300
commit c100d7f932

View file

@ -521,10 +521,9 @@ void ForestWindEmitter::_renderEmitterInfo( ObjectRenderInst *ri, SceneRenderSta
{ {
// If the camera is close to the sphere, shrink the sphere so it remains visible. // If the camera is close to the sphere, shrink the sphere so it remains visible.
GameConnection* gc = GameConnection::getConnectionToServer(); GameConnection* gc = GameConnection::getConnectionToServer();
GameBase* gb; GameBase *gb = gc ? gc->getCameraObject() : NULL;
if (gc && (gc->getCameraObject())) if (gb)
{ {
gb = gc->getCameraObject();
F32 camDist = (gb->getPosition() - getPosition()).len(); F32 camDist = (gb->getPosition() - getPosition()).len();
if ( camDist < mWindRadius ) if ( camDist < mWindRadius )
useRadius = camDist; useRadius = camDist;