Core/SAI: Added new error for wrong target orientation value
This commit is contained in:
1 parent
402ac71ee8
commit
0a897616da
1 file changed
+4
@@ -295,6 +295,10 @@ void SmartAIMgr::LoadSmartAIFromDB()
|
||||
|
||||
bool SmartAIMgr::IsTargetValid(SmartScriptHolder const& e)
|
||||
{
|
||||
if (std::abs(e.target.o) > 2 * float(M_PI))
|
||||
TC_LOG_ERROR("sql.sql", "SmartAIMgr: Entry %d SourceType %u Event %u Action %u has abs(`target.o`) > 2*PI (orientation is expressed in radians)",
|
||||
e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType());
|
||||
|
||||
if (e.GetActionType() == SMART_ACTION_INSTALL_AI_TEMPLATE)
|
||||
return true; // AI template has special handling
|
||||
switch (e.GetTargetType())
|
||||
|
||||
Reference in new issue
Block a user