From b796a5fed6833768313824ff07be7420af3ff12c Mon Sep 17 00:00:00 2001 From: Randy Heit Date: Wed, 6 Apr 2016 08:44:46 -0500 Subject: [PATCH 1/3] Fixed: segangle is only 16-bits, so AngleToFloat won't work on it directly --- src/p_setup.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/p_setup.cpp b/src/p_setup.cpp index c7395208e..89ca3a799 100644 --- a/src/p_setup.cpp +++ b/src/p_setup.cpp @@ -1314,7 +1314,7 @@ void P_LoadSegs (MapData * map) // errors _can_ cause firelines. DAngle ptp_angle = (li->v2->fPos() - li->v1->fPos()).Angle(); - DAngle seg_angle = AngleToFloat(segangle); + DAngle seg_angle = AngleToFloat(segangle << 16); DAngle delta_angle = absangle(ptp_angle, seg_angle); if (delta_angle >= 1.) From b93d4a796ad4be1831d0a5fd4775fcc2ff1c9a66 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Wed, 6 Apr 2016 17:27:49 +0200 Subject: [PATCH 2/3] - fixed angles for am_rotate. --- src/am_map.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/am_map.cpp b/src/am_map.cpp index d84da2ebd..58082a7bf 100644 --- a/src/am_map.cpp +++ b/src/am_map.cpp @@ -2645,7 +2645,7 @@ void AM_drawPlayers () pt.y = pos.Y; if (am_rotate == 1 || (am_rotate == 2 && viewactive)) { - angle = 90.; + angle = -90.; AM_rotatePoint (&pt.x, &pt.y); } else @@ -2806,7 +2806,7 @@ void AM_drawThings () if (frame->Texture[0] != frame->Texture[1]) angle += 180. / 16; if (am_rotate == 1 || (am_rotate == 2 && viewactive)) { - angle += players[consoleplayer].camera->Angles.Yaw - 90.; + angle += players[consoleplayer].camera->Angles.Yaw + 90.; } rotation = int((angle.Normalized360() * (16. / 360.)).Degrees); @@ -2830,7 +2830,7 @@ void AM_drawThings () if (am_rotate == 1 || (am_rotate == 2 && viewactive)) { AM_rotatePoint (&p.x, &p.y); - angle += -players[consoleplayer].camera->Angles.Yaw + 90.; + angle += -players[consoleplayer].camera->Angles.Yaw - 90.; } color = AMColors[AMColors.ThingColor]; From b774fed93e524256f45c7f2a518e71c1b9d3cf00 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Wed, 6 Apr 2016 18:46:52 +0200 Subject: [PATCH 3/3] - fixed: P_DrawSplash2's z-velocity was too high. This code was ported from the 2005 floating point version, at one point it replaced 128 with 0.5, but 128 as a fixed point value needs to be 1/512. as a floating point value. --- src/p_effect.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/p_effect.cpp b/src/p_effect.cpp index 249ba80f9..422fec6f1 100644 --- a/src/p_effect.cpp +++ b/src/p_effect.cpp @@ -587,7 +587,7 @@ void P_DrawSplash2 (int count, const DVector3 &pos, DAngle angle, int updown, in break; } - zvel = -0.5; + zvel = -1./512.; zspread = updown ? -6000 / 65536. : 6000 / 65536.; zadd = (updown == 2) ? 128 : 0;