From 47d2fd403c7d96ade90225fd3dbb56a848f0357b Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sun, 14 Aug 2016 21:55:20 +0200 Subject: [PATCH] - fixed typos in scroll code. --- src/p_scroll.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/p_scroll.cpp b/src/p_scroll.cpp index b7ed4fc65..d0a8f4769 100644 --- a/src/p_scroll.cpp +++ b/src/p_scroll.cpp @@ -147,8 +147,8 @@ static void RotationComp(const sector_t *sec, int which, double dx, double dy, d } else { - double ca = an.Cos(); - double sa = an.Sin(); + double ca = -an.Cos(); + double sa = -an.Sin(); tdx = dx*ca - dy*sa; tdy = dy*ca + dx*sa; } @@ -345,12 +345,16 @@ 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().Y) / d; + y = (-dx * l->Delta().Y - dy * l->Delta().X) / d; m_Type = EScroll::sc_side; m_dx = x;