shithub: choc

Download patch

ref: c78ca4cf4a5d95b9e0268f43539e61084cdebe9f
parent: 8e4125eb688fe489d3ea9bf261769ce0d9125abd
author: David Carlier <[email protected]>
date: Sun Oct 1 05:25:51 EDT 2017

fixing a handful of abs calls parameter

--- a/src/doom/r_segs.c
+++ b/src/doom/r_segs.c
@@ -396,7 +396,7 @@
     
     // calculate rw_distance for scale calculation
     rw_normalangle = curline->angle + ANG90;
-    offsetangle = abs(rw_normalangle-rw_angle1);
+    offsetangle = abs((int)rw_normalangle-(int)rw_angle1);
     
     if (offsetangle > ANG90)
 	offsetangle = ANG90;
--- a/src/hexen/a_action.c
+++ b/src/hexen/a_action.c
@@ -200,10 +200,9 @@
     if (!netgame)
     {
         pmo = players[consoleplayer].mo;
-        if (P_CheckSight(actor, pmo) && (abs(R_PointToAngle2(pmo->x,
-                                                             pmo->y, actor->x,
-                                                             actor->y) -
-                                             pmo->angle) <= ANG45))
+        if (P_CheckSight(actor, pmo)
+	  && (abs((int)R_PointToAngle2(pmo->x, pmo->y, actor->x, actor->y)
+           - (int)pmo->angle) <= ANG45))
         {                       // Previous state (pottery bit waiting state)
             P_SetMobjState(actor, actor->state - &states[0] - 1);
         }
@@ -221,11 +220,9 @@
                 continue;
             }
             pmo = players[i].mo;
-            if (P_CheckSight(actor, pmo) && (abs(R_PointToAngle2(pmo->x,
-                                                                 pmo->y,
-                                                                 actor->x,
-                                                                 actor->y) -
-                                                 pmo->angle) <= ANG45))
+            if (P_CheckSight(actor, pmo) 
+              && (abs((int)R_PointToAngle2(pmo->x, pmo->y, actor->x, actor->y)
+               - (int)pmo->angle) <= ANG45))
             {                   // Previous state (pottery bit waiting state)
                 P_SetMobjState(actor, actor->state - &states[0] - 1);
                 return;