Remove warnings warned by Clang
This commit is contained in:
parent
6d0679cbd9
commit
d84c85d40f
14 changed files with 37 additions and 34 deletions
|
|
@ -78,8 +78,8 @@ static void DragonSeek (AActor *actor, angle_t thresh, angle_t turnMax)
|
|||
if (target->flags&MF_SHOOTABLE && pr_dragonseek() < 64)
|
||||
{ // attack the destination mobj if it's attackable
|
||||
AActor *oldTarget;
|
||||
|
||||
if (abs(actor->angle-R_PointToAngle2(actor->x, actor->y,
|
||||
|
||||
if (absangle(actor->angle-R_PointToAngle2(actor->x, actor->y,
|
||||
target->x, target->y)) < ANGLE_45/2)
|
||||
{
|
||||
oldTarget = actor->target;
|
||||
|
|
@ -121,9 +121,9 @@ static void DragonSeek (AActor *actor, angle_t thresh, angle_t turnMax)
|
|||
}
|
||||
angleToSpot = R_PointToAngle2(actor->x, actor->y,
|
||||
mo->x, mo->y);
|
||||
if ((angle_t)abs(angleToSpot-angleToTarget) < bestAngle)
|
||||
if (absangle(angleToSpot-angleToTarget) < bestAngle)
|
||||
{
|
||||
bestAngle = abs(angleToSpot-angleToTarget);
|
||||
bestAngle = absangle(angleToSpot-angleToTarget);
|
||||
bestActor = mo;
|
||||
}
|
||||
}
|
||||
|
|
@ -198,14 +198,14 @@ DEFINE_ACTION_FUNCTION(AActor, A_DragonFlight)
|
|||
}
|
||||
angle = R_PointToAngle2(self->x, self->y, self->target->x,
|
||||
self->target->y);
|
||||
if (abs(self->angle-angle) < ANGLE_45/2 && self->CheckMeleeRange())
|
||||
if (absangle(self->angle-angle) < ANGLE_45/2 && self->CheckMeleeRange())
|
||||
{
|
||||
int damage = pr_dragonflight.HitDice (8);
|
||||
int newdam = P_DamageMobj (self->target, self, self, damage, NAME_Melee);
|
||||
P_TraceBleed (newdam > 0 ? newdam : damage, self->target, self);
|
||||
S_Sound (self, CHAN_WEAPON, self->AttackSound, 1, ATTN_NORM);
|
||||
}
|
||||
else if (abs(self->angle-angle) <= ANGLE_1*20)
|
||||
else if (absangle(self->angle-angle) <= ANGLE_1*20)
|
||||
{
|
||||
self->SetState (self->MissileState);
|
||||
S_Sound (self, CHAN_WEAPON, self->AttackSound, 1, ATTN_NORM);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue