Explorar o código

suggested revision

Azaezel %!s(int64=10) %!d(string=hai) anos
pai
achega
c100d7f932
Modificáronse 1 ficheiros con 2 adicións e 3 borrados
  1. 2 3
      Engine/source/forest/forestWindEmitter.cpp

+ 2 - 3
Engine/source/forest/forestWindEmitter.cpp

@@ -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;
-      if (gc && (gc->getCameraObject()))
+      GameBase *gb = gc ? gc->getCameraObject() : NULL;
+      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;