Core/GameObjects: validate gameobject rotation on startup
This commit is contained in:
1 parent
181d1e2485
commit
cd7eef7945
1 file changed
+6
@@ -2536,6 +2536,12 @@ void ObjectMgr::LoadGameObjects()
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!data.rotation.isUnit())
|
||||
{
|
||||
TC_LOG_ERROR("sql.sql", "Table `gameobject` has gameobject (GUID: %u Entry: %u) with invalid rotation quaternion (non-unit), defaulting to orientation on Z axis only", guid, data.id);
|
||||
data.rotation = QuaternionData::fromEulerAnglesZYX(data.spawnPoint.GetOrientation(), 0.0f, 0.0f);
|
||||
}
|
||||
|
||||
if (sWorld->getBoolConfig(CONFIG_CALCULATE_GAMEOBJECT_ZONE_AREA_DATA))
|
||||
{
|
||||
uint32 zoneId = 0;
|
||||
|
||||
Reference in new issue
Block a user