shithub: choc

Download patch

ref: 53d3f69c81145f64cd20f35c97062db9d187aa6e
parent: dd913a157ea5b8072d72b712b8d038f2231981ba
author: Turo Lamminen <turol@iki.fi>
date: Thu May 7 13:39:37 EDT 2020

hexen: Fix clang abs warnings in A_DragonFlight

--- a/src/hexen/p_enemy.c
+++ b/src/hexen/p_enemy.c
@@ -2986,13 +2986,13 @@
         }
         angle = R_PointToAngle2(actor->x, actor->y, actor->target->x,
                                 actor->target->y);
-        if (abs(actor->angle - angle) < ANG45 / 2
+        if (abs((int) actor->angle - (int) angle) < ANG45 / 2
             && P_CheckMeleeRange(actor))
         {
             P_DamageMobj(actor->target, actor, actor, HITDICE(8));
             S_StartSound(actor, SFX_DRAGON_ATTACK);
         }
-        else if (abs(actor->angle - angle) <= ANG1 * 20)
+        else if (abs((int) actor->angle - (int) angle) <= ANG1 * 20)
         {
             P_SetMobjState(actor, actor->info->missilestate);
             S_StartSound(actor, SFX_DRAGON_ATTACK);