From 3a877b888b050b2b9fb300233234a56eefb1b8f4 Mon Sep 17 00:00:00 2001 From: xezon <4720891+xezon@users.noreply.github.com> Date: Sun, 8 Feb 2026 15:46:26 +0100 Subject: [PATCH] fix(view): Prevent float division by zero in W3DView::setupWaypointPath() --- .../Source/W3DDevice/GameClient/W3DView.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Core/GameEngineDevice/Source/W3DDevice/GameClient/W3DView.cpp b/Core/GameEngineDevice/Source/W3DDevice/GameClient/W3DView.cpp index 7c7b64d369c..374c84692dc 100644 --- a/Core/GameEngineDevice/Source/W3DDevice/GameClient/W3DView.cpp +++ b/Core/GameEngineDevice/Source/W3DDevice/GameClient/W3DView.cpp @@ -2823,14 +2823,14 @@ void W3DView::setupWaypointPath(Bool orient) Real angle = getAngle(); for (i=1; i= 0.1f) { + angle = WWMath::Acos(dir.X/dirLength); if (dir.Y<0.0f) { angle = -angle; } - // Default camera is rotated 90 degrees, so match. angle -= PI/2; normAngle(angle);