]> git.localhorst.tv Git - blank.git/commitdiff
fix entity pitch clamping
authorDaniel Karbach <daniel.karbach@localhorst.tv>
Fri, 30 Oct 2015 10:34:02 +0000 (11:34 +0100)
committerDaniel Karbach <daniel.karbach@localhorst.tv>
Fri, 30 Oct 2015 10:34:02 +0000 (11:34 +0100)
src/world/world.cpp

index bf2abf3315b03eaff6ce31577caf7d47dbd8f749..4ac765c325635cddfe112a7efaee014ca526454f 100644 (file)
@@ -233,7 +233,7 @@ void EntityState::AdjustPosition() noexcept {
 }
 
 void EntityState::AdjustHeading() noexcept {
-       glm::clamp(pitch, -PI_0p5, PI_0p5);
+       pitch = glm::clamp(pitch, -PI_0p5, PI_0p5);
        while (yaw > PI) {
                yaw -= PI_2p0;
        }