summaryrefslogtreecommitdiffstats
path: root/src/object/auto/autoegg.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/object/auto/autoegg.cpp')
-rw-r--r--src/object/auto/autoegg.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/object/auto/autoegg.cpp b/src/object/auto/autoegg.cpp
index c6400f8..56a2899 100644
--- a/src/object/auto/autoegg.cpp
+++ b/src/object/auto/autoegg.cpp
@@ -20,6 +20,7 @@
#include <d3d.h>
#include "common/struct.h"
+#include "math/geometry.h"
#include "graphics/d3d/d3dengine.h"
#include "math/old/d3dmath.h"
#include "common/event.h"
@@ -283,7 +284,7 @@ CObject* CAutoEgg::SearchAlien()
{
CObject* pObj;
CObject* pBest;
- D3DVECTOR cPos, oPos;
+ Math::Vector cPos, oPos;
ObjectType type;
float dist, min;
int i;
@@ -305,7 +306,7 @@ CObject* CAutoEgg::SearchAlien()
type != OBJECT_WORM ) continue;
oPos = pObj->RetPosition(0);
- dist = Length2d(oPos, cPos);
+ dist = Math::DistanceProjected(oPos, cPos);
if ( dist < 8.0f && dist < min )
{
min = dist;