From d10cf4faf52734dc48b7fe7d4865610bce018e0a Mon Sep 17 00:00:00 2001
From: Monster Iestyn <iestynjealous@ntlworld.com>
Date: Sat, 29 May 2021 22:54:58 +0100
Subject: [PATCH] A_Custom3DRotate: don't scale hspeed and vspeed - they are
 angular speeds, not linear!

(I added the scaling to this action somewhere between 7-9 years ago, and somehow never knew I made this mistake until now, welp.)
---
 src/p_enemy.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/p_enemy.c b/src/p_enemy.c
index 3b13fe295a..b90a87cc03 100644
--- a/src/p_enemy.c
+++ b/src/p_enemy.c
@@ -9899,8 +9899,8 @@ void A_Custom3DRotate(mobj_t *actor)
 
 	const fixed_t radius = FixedMul(loc1lw*FRACUNIT, actor->scale);
 	const fixed_t hOff = FixedMul(loc1up*FRACUNIT, actor->scale);
-	const fixed_t hspeed = FixedMul(loc2up*FRACUNIT/10, actor->scale);
-	const fixed_t vspeed = FixedMul(loc2lw*FRACUNIT/10, actor->scale);
+	const fixed_t hspeed = loc2up*FRACUNIT/10; // Monster's note (29/05/21): DO NOT SCALE, this is an angular speed!
+	const fixed_t vspeed = loc2lw*FRACUNIT/10; // ditto
 
 	if (LUA_CallAction(A_CUSTOM3DROTATE, actor))
 		return;
-- 
GitLab