Remove a possible NaN-value in WorldObject::HasInArc (thanks to arrai)

+ do some hack'n'slash-work on the CMakeLists with my trusted axe ( I just LOVE being a viking - I get to wield an axe for free!)

--HG--
branch : trunk
This commit is contained in:
click
2010-06-24 17:32:50 +02:00
parent 35aa050db8
commit 0b2dad9c97
8 changed files with 19 additions and 234 deletions
+15
View File
@@ -108,6 +108,21 @@ class MapManager : public Trinity::Singleton<MapManager, Trinity::ClassLevelLock
return IsValidMapCoord(loc.GetMapId(), loc.GetPositionX(), loc.GetPositionY(), loc.GetPositionZ(), loc.GetOrientation());
}
// modulos a radian orientation to the range of 0..2PI
static float NormalizeOrientation(float o)
{
// fmod only supports positive numbers. Thus we have
// to emulate negative numbers
if(o < 0)
{
float mod = o *-1;
mod = fmod(mod, 2.0f*M_PI);
mod = -mod+2.0f*M_PI;
return mod;
}
return fmod(o, 2.0f*M_PI);
}
void DoDelayedMovesAndRemoves();
void LoadTransports();