- disable implicit conversions from float to TAngle

This commit is contained in:
Christoph Oelckers 2022-08-26 00:56:53 +02:00
commit f0fbdba593
66 changed files with 425 additions and 374 deletions

View file

@ -83,8 +83,8 @@ void DBot::Think ()
if (cmd->ucmd.pitch == -32768)
cmd->ucmd.pitch = -32767;
cmd->ucmd.pitch /= ticdup;
actor->Angles.Yaw = oldyaw + DAngle(cmd->ucmd.yaw * ticdup * (360 / 65536.f));
actor->Angles.Pitch = oldpitch - DAngle(cmd->ucmd.pitch * ticdup * (360 / 65536.f));
actor->Angles.Yaw = oldyaw + DAngle::fromDeg(cmd->ucmd.yaw * ticdup * (360 / 65536.f));
actor->Angles.Pitch = oldpitch - DAngle::fromDeg(cmd->ucmd.pitch * ticdup * (360 / 65536.f));
}
if (t_active) t_active--;
@ -118,7 +118,7 @@ void DBot::ThinkForMove (ticcmd_t *cmd)
dist = dest ? player->mo->Distance2D(dest) : 0;
if (missile &&
(!missile->Vel.X || !missile->Vel.Y || !Check_LOS(missile, SHOOTFOV*3/2)))
(!missile->Vel.X || !missile->Vel.Y || !Check_LOS(missile, DAngle::fromDeg(SHOOTFOV*3/2))))
{
sleft = !sleft;
missile = nullptr; //Probably ended its travel.
@ -147,7 +147,7 @@ void DBot::ThinkForMove (ticcmd_t *cmd)
}
//If able to see enemy while avoiding missile, still fire at enemy.
if (enemy && Check_LOS (enemy, SHOOTFOV))
if (enemy && Check_LOS (enemy, DAngle::fromDeg(SHOOTFOV)))
Dofire (cmd); //Order bot to fire current weapon
}
else if (enemy && P_CheckSight (player->mo, enemy, 0)) //Fight!
@ -259,7 +259,7 @@ void DBot::ThinkForMove (ticcmd_t *cmd)
/////
roam:
/////
if (enemy && Check_LOS (enemy, SHOOTFOV*3/2)) //If able to see enemy while avoiding missile , still fire at it.
if (enemy && Check_LOS (enemy, DAngle::fromDeg(SHOOTFOV*3/2))) //If able to see enemy while avoiding missile , still fire at it.
Dofire (cmd); //Order bot to fire current weapon
if (dest && !(dest->flags&MF_SPECIAL) && dest->health < 0)