From 6deb185b46bde9e084429b02510fecf1ebc5fa54 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sun, 14 Aug 2016 22:10:44 +0200 Subject: [PATCH] - fixed another typo in scroller code. Now Scroll_Texture_Model is working properly again. (Note: Whoever designed this function must have been on drugs - its use of the source data in Boom is completely insane.) --- src/p_scroll.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/p_scroll.cpp b/src/p_scroll.cpp index d0a8f4769..52be13d56 100644 --- a/src/p_scroll.cpp +++ b/src/p_scroll.cpp @@ -345,16 +345,12 @@ DScroller::DScroller (double dx, double dy, const line_t *l, int control, int accel, EScrollPos scrollpos) : DThinker (STAT_SCROLLER) { - if (tagManager.GetFirstLineID(l) == 300) - { - int a = 0; - } double x = fabs(l->Delta().X), y = fabs(l->Delta().Y), d; if (y > x) d = x, x = y, y = d; d = x / g_sin(g_atan2(y, x) + M_PI / 2); - x = (-dy * l->Delta().Y + dx * l->Delta().X) / d; - y = (-dx * l->Delta().Y - dy * l->Delta().X) / d; + x = -(dy * l->Delta().Y + dx * l->Delta().X) / d; + y = -(dx * l->Delta().Y - dy * l->Delta().X) / d; m_Type = EScroll::sc_side; m_dx = x;