From 27f95d905c7af21183bfa4fbf4bc64a0176a7464 Mon Sep 17 00:00:00 2001 From: aap Date: Sun, 5 Apr 2020 15:27:30 +0200 Subject: [PATCH] fixed look behind bug --- src/core/Cam.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/Cam.cpp b/src/core/Cam.cpp index b9e8e94e..5b7a53e9 100644 --- a/src/core/Cam.cpp +++ b/src/core/Cam.cpp @@ -627,7 +627,7 @@ CCam::LookBehind(void) DeltaBeta = TargetOrientation - Beta; while(DeltaBeta >= PI) DeltaBeta -= 2*PI; while(DeltaBeta < -PI) DeltaBeta += 2*PI; - if(DirectionWasLooking == LOOKING_BEHIND) + if(DirectionWasLooking != LOOKING_BEHIND) LookBehindCamWasInFront = DeltaBeta <= -HALFPI || DeltaBeta >= HALFPI; if(LookBehindCamWasInFront) TargetOrientation += PI;