diff --git a/Source/Game/Globals/ObjectManager.cs b/Source/Game/Globals/ObjectManager.cs index d30a9830e..13eef2715 100644 --- a/Source/Game/Globals/ObjectManager.cs +++ b/Source/Game/Globals/ObjectManager.cs @@ -4214,6 +4214,12 @@ namespace Game continue; } + if (!(Math.Abs(Quaternion.Dot(data.rotation, data.rotation) - 1) < 1e-5)) + { + Log.outError(LogFilter.Sql, $"Table `gameobject` has gameobject (GUID: {guid} Entry: {data.Id}) with invalid rotation quaternion (non-unit), defaulting to orientation on Z axis only"); + data.rotation = Quaternion.CreateFromRotationMatrix(Extensions.fromEulerAnglesZYX(data.spawnPoint.GetOrientation(), 0f, 0f)); + } + if (WorldConfig.GetBoolValue(WorldCfg.CalculateGameobjectZoneAreaData)) { PhasingHandler.InitDbVisibleMapId(phaseShift, data.terrainSwapMap);