From 9f784e81f81651bed087902f9f3afee113e56148 Mon Sep 17 00:00:00 2001 From: Piotr Dziwinski Date: Tue, 19 Jun 2012 20:11:47 +0200 Subject: Switched to new implementation of the rest of math module - changed structs from D3DVECTOR to Math::Vector and from D3DMATRIX to Math::Matrix - changed functions to new Math namespace functions - moved mainmovie module from graphics to object - added Get and Set to Math::Matrix --- src/object/auto/autoegg.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/object/auto/autoegg.cpp') 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 #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; -- cgit v1.2.3-1-g7c22