From 0ebf4958b93b418fa467546184c23e6cc6eba8e7 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sat, 15 Apr 2017 00:48:22 +0200 Subject: [PATCH] - fixed pitch calculation for camera actors. For compatibility with Hexen format they need to treat the pitch arg as a signed byte. --- wadsrc/static/zscript/shared/camera.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/wadsrc/static/zscript/shared/camera.txt b/wadsrc/static/zscript/shared/camera.txt index abb394745e..f19d90d253 100644 --- a/wadsrc/static/zscript/shared/camera.txt +++ b/wadsrc/static/zscript/shared/camera.txt @@ -36,7 +36,8 @@ class SecurityCamera : Actor if (args[1]) Delta /= 2; Acc = 0.; - Pitch = clamp(args[0], -89, 89); + int arg = (args[0] << 24) >> 24; // make sure the value has the intended sign. + Pitch = clamp(arg, -89, 89); Range = args[1]; }