Fix some code style
parent
f33ffaf18b
commit
17511ddb6a
|
@ -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 )
|
||||
{
|
||||
|
|
|
@ -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"
|
||||
|
||||
|
|
Loading…
Reference in New Issue