mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-29 04:50:42 +00:00
- SW: Clean up some Q16.16 angle usage within DoPlayerTurnTurret()
.
This commit is contained in:
parent
80ff918b17
commit
00ce61959c
1 changed files with 4 additions and 4 deletions
|
@ -1611,7 +1611,7 @@ DoPlayerTurnVehicleRect(PLAYERp pp, int *x, int *y, int *ox, int *oy)
|
||||||
void
|
void
|
||||||
DoPlayerTurnTurret(PLAYERp pp, float avel)
|
DoPlayerTurnTurret(PLAYERp pp, float avel)
|
||||||
{
|
{
|
||||||
fixed_t diff;
|
lookangle diff;
|
||||||
binangle new_ang;
|
binangle new_ang;
|
||||||
SECTOR_OBJECTp sop = pp->sop;
|
SECTOR_OBJECTp sop = pp->sop;
|
||||||
|
|
||||||
|
@ -1633,11 +1633,11 @@ DoPlayerTurnTurret(PLAYERp pp, float avel)
|
||||||
|
|
||||||
if (sop->limit_ang_center >= 0)
|
if (sop->limit_ang_center >= 0)
|
||||||
{
|
{
|
||||||
diff = getincangleq16(IntToFixed(sop->limit_ang_center), new_ang.asq16());
|
diff = getincanglebam(buildang(sop->limit_ang_center), new_ang);
|
||||||
|
|
||||||
if (labs(diff) >= IntToFixed(sop->limit_ang_delta))
|
if (labs(diff.asbuild()) >= sop->limit_ang_delta)
|
||||||
{
|
{
|
||||||
if (diff < 0)
|
if (diff.asbam() < 0)
|
||||||
new_ang = buildang(sop->limit_ang_center - sop->limit_ang_delta);
|
new_ang = buildang(sop->limit_ang_center - sop->limit_ang_delta);
|
||||||
else
|
else
|
||||||
new_ang = buildang(sop->limit_ang_center + sop->limit_ang_delta);
|
new_ang = buildang(sop->limit_ang_center + sop->limit_ang_delta);
|
||||||
|
|
Loading…
Reference in a new issue