Fix some code style
parent
f33ffaf18b
commit
17511ddb6a
|
@ -1093,19 +1093,15 @@ CObject* CTaskGoto::SearchTarget(Math::Vector pos, float margin)
|
||||||
* See issue #732
|
* See issue #732
|
||||||
*/
|
*/
|
||||||
|
|
||||||
CObject *pBest;
|
CObject* pBest = nullptr;
|
||||||
Math::Vector oPos;
|
float min = 1000000.0f;
|
||||||
float dist, min;
|
|
||||||
|
|
||||||
pBest = 0;
|
|
||||||
min = 1000000.0f;
|
|
||||||
for ( CObject* pObj : CObjectManager::GetInstancePointer()->GetAllObjects() )
|
for ( CObject* pObj : CObjectManager::GetInstancePointer()->GetAllObjects() )
|
||||||
{
|
{
|
||||||
if ( !pObj->GetActive() ) continue;
|
if ( !pObj->GetActive() ) continue;
|
||||||
if ( IsObjectBeingTransported(pObj) ) continue; // object transtorted?
|
if ( IsObjectBeingTransported(pObj) ) continue; // object transtorted?
|
||||||
|
|
||||||
oPos = pObj->GetPosition();
|
Math::Vector oPos = pObj->GetPosition();
|
||||||
dist = Math::DistanceProjected(pos, oPos);
|
float dist = Math::DistanceProjected(pos, oPos);
|
||||||
|
|
||||||
if ( dist <= margin && dist <= min )
|
if ( dist <= margin && dist <= min )
|
||||||
{
|
{
|
||||||
|
|
|
@ -19,11 +19,11 @@
|
||||||
|
|
||||||
#include "ui/debug_menu.h"
|
#include "ui/debug_menu.h"
|
||||||
|
|
||||||
|
#include "app/app.h"
|
||||||
|
|
||||||
#include "common/event.h"
|
#include "common/event.h"
|
||||||
#include "common/stringutils.h"
|
#include "common/stringutils.h"
|
||||||
|
|
||||||
#include "app/app.h"
|
|
||||||
|
|
||||||
#include "graphics/engine/lightning.h"
|
#include "graphics/engine/lightning.h"
|
||||||
#include "graphics/engine/terrain.h"
|
#include "graphics/engine/terrain.h"
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue