shithub: choc

Download patch

ref: 465a81132c5faeb4ec009e1590cc116a46fb776d
parent: 99a015c36a7abe83af2b63f5ba1721f0f39d209a
parent: c78ca4cf4a5d95b9e0268f43539e61084cdebe9f
author: Mike Swanson <[email protected]>
date: Fri Mar 23 19:03:31 EDT 2018

Merge branch 'abs_call_fixes' of gh:devnexen/chocolate-doom

--- 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;