[11966] Replace an ASSERT to prevent unnecessairy crashes

GetAngle can be called for self from very many places, not only DB-errors, hence adding the assert is too strong in the moment

Signed-off-by: Schmoozerd <schmoozerd@scriptdev2.com>
This commit is contained in:
Schmoozerd 2012-02-08 14:53:09 +01:00
parent f817a939e2
commit 675c8c41cf
2 changed files with 8 additions and 3 deletions

View file

@ -1199,8 +1199,13 @@ float WorldObject::GetAngle(const WorldObject* obj) const
if (!obj)
return 0.0f;
MANGOS_ASSERT(obj != this || PrintEntryError("GetAngle (for self)"));
// Rework the assert, when more cases where such a call can happen have been fixed
//MANGOS_ASSERT(obj != this || PrintEntryError("GetAngle (for self)"));
if (obj == this)
{
sLog.outError("INVALID CALL for GetAngle for %s", obj->GetGuidStr().c_str());
return 0.0f;
}
return GetAngle(obj->GetPositionX(), obj->GetPositionY());
}

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
#define REVISION_NR "11965"
#define REVISION_NR "11966"
#endif // __REVISION_NR_H__