mirror of
https://github.com/DrBeef/Raze.git
synced 2024-11-15 08:52:00 +00:00
- SW: Make better use of some TAngle backend utilities.
This commit is contained in:
parent
13ea55b4cb
commit
782fb08209
3 changed files with 3 additions and 3 deletions
|
@ -1101,7 +1101,7 @@ void CameraView(PLAYER* pp, int *tx, int *ty, int *tz, sectortype** tsect, DAngl
|
|||
while (auto actor = it.Next())
|
||||
{
|
||||
ang = VecToAngle(*tx - actor->int_pos().X, *ty - actor->int_pos().Y);
|
||||
ang_test = (DAngle::fromBuild(actor->int_ang()) - ang).Normalized180() < DAngle::fromBuild(actor->spr.lotag);
|
||||
ang_test = deltaangle(ang, DAngle::fromBuild(actor->int_ang())) < DAngle::fromBuild(actor->spr.lotag);
|
||||
|
||||
FAFcansee_test =
|
||||
(FAFcansee(actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z, actor->sector(), *tx, *ty, *tz, pp->cursector) ||
|
||||
|
|
|
@ -1551,7 +1551,7 @@ void DoPlayerTurnTurret(PLAYER* pp, float avel)
|
|||
|
||||
if (sop->limit_ang_center >= nullAngle)
|
||||
{
|
||||
diff = (new_ang - sop->limit_ang_center).Normalized180();
|
||||
diff = deltaangle(sop->limit_ang_center, new_ang);
|
||||
|
||||
if (abs(diff) >= sop->limit_ang_delta)
|
||||
{
|
||||
|
|
|
@ -2801,7 +2801,7 @@ void DoAutoTurretObject(SECTOR_OBJECT* sop)
|
|||
|
||||
if (sop->limit_ang_center >= nullAngle)
|
||||
{
|
||||
diff = (DAngle::fromBuild(sop->ang) - sop->limit_ang_center).Normalized180();
|
||||
diff = deltaangle(sop->limit_ang_center, DAngle::fromBuild(sop->ang));
|
||||
|
||||
if (abs(diff) >= sop->limit_ang_delta)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue