Fix some code style

dev-buzzingcars
krzys-h 2016-12-27 15:54:52 +01:00
parent f33ffaf18b
commit 17511ddb6a
2 changed files with 6 additions and 10 deletions

View File

@ -1093,19 +1093,15 @@ CObject* CTaskGoto::SearchTarget(Math::Vector pos, float margin)
* See issue #732
*/
CObject *pBest;
Math::Vector oPos;
float dist, min;
pBest = 0;
min = 1000000.0f;
CObject* pBest = nullptr;
float min = 1000000.0f;
for ( CObject* pObj : CObjectManager::GetInstancePointer()->GetAllObjects() )
{
if ( !pObj->GetActive() ) continue;
if ( IsObjectBeingTransported(pObj) ) continue; // object transtorted?
oPos = pObj->GetPosition();
dist = Math::DistanceProjected(pos, oPos);
Math::Vector oPos = pObj->GetPosition();
float dist = Math::DistanceProjected(pos, oPos);
if ( dist <= margin && dist <= min )
{

View File

@ -19,11 +19,11 @@
#include "ui/debug_menu.h"
#include "app/app.h"
#include "common/event.h"
#include "common/stringutils.h"
#include "app/app.h"
#include "graphics/engine/lightning.h"
#include "graphics/engine/terrain.h"