[Fix] Changed abs(Vec2::DistanceSquared(thisPos, goalPos)); to fabs(Vec2::DistanceSquared(thisPos, goalPos));

This commit is contained in:
Rtch90 2012-02-18 23:49:13 +00:00
parent 8b92224e72
commit 7ca0ad0d7d
3 changed files with 156 additions and 156 deletions

View File

@ -1,5 +1,5 @@
#include "NPC.h"
#include "../Unuk/Player.h"
#include "../../Unuk/Player.h"
NPC::NPC(LevelGen* mapArg) : Character(mapArg) {
_moveTimer.Start();

View File

@ -19,7 +19,7 @@ bool MapTile::IsGoal(MapTile& tile) {
float MapTile::GoalDistanceEstimate(MapTile& goal) {
Vec2 thisPos(_tile.GetX(), _tile.GetY());
Vec2 goalPos(goal.GetTileX(), goal.GetTileY());
return abs(Vec2::DistanceSquared(thisPos, goalPos));
return fabs(Vec2::DistanceSquared(thisPos, goalPos));
}
float MapTile::GetCost(MapTile& goal) {