mirror of
https://github.com/mangosfour/server.git
synced 2025-12-17 07:37:03 +00:00
[10104] Cleaned up WorldObject::HasInArc
This commit is contained in:
parent
593f1e81b9
commit
11372496e5
3 changed files with 22 additions and 10 deletions
|
|
@ -112,6 +112,21 @@ class MANGOS_DLL_DECL MapManager : public MaNGOS::Singleton<MapManager, MaNGOS::
|
|||
return IsValidMapCoord(loc.mapid,loc.coord_x,loc.coord_y,loc.coord_z,loc.orientation);
|
||||
}
|
||||
|
||||
// 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_F);
|
||||
mod = -mod+2.0f*M_PI_F;
|
||||
return mod;
|
||||
}
|
||||
return fmod(o, 2.0f*M_PI_F);
|
||||
}
|
||||
|
||||
void RemoveAllObjectsInRemoveList();
|
||||
|
||||
void LoadTransports();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue