mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 07:37:01 +00:00
[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:
parent
f817a939e2
commit
675c8c41cf
2 changed files with 8 additions and 3 deletions
|
|
@ -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());
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "11965"
|
||||
#define REVISION_NR "11966"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue