diff --git a/source/games/exhumed/src/lavadude.cpp b/source/games/exhumed/src/lavadude.cpp index 64f184785..d50f60a80 100644 --- a/source/games/exhumed/src/lavadude.cpp +++ b/source/games/exhumed/src/lavadude.cpp @@ -286,7 +286,7 @@ void AILavaDude::Tick(RunListEvent* ev) ChangeActorSect(pActor, pSector); pActor->spr.pos = pos; - pActor->set_int_ang((pActor->int_ang() + ((RandomWord() & 0x3FF) + 1024)) & kAngleMask); + pActor->spr.angle += DAngle180 + DAngle::fromBuild(RandomWord() & 0x3FF); pActor->VelFromAngle(); break; } @@ -297,7 +297,7 @@ void AILavaDude::Tick(RunListEvent* ev) if (coll.type == kHitWall) { - pActor->set_int_ang((pActor->int_ang() + ((RandomWord() & 0x3FF) + 1024)) & kAngleMask); + pActor->spr.angle += DAngle180 + DAngle::fromBuild(RandomWord() & 0x3FF); pActor->VelFromAngle(); break; } diff --git a/source/games/exhumed/src/lion.cpp b/source/games/exhumed/src/lion.cpp index 20e09462f..f0d9fc110 100644 --- a/source/games/exhumed/src/lion.cpp +++ b/source/games/exhumed/src/lion.cpp @@ -168,7 +168,7 @@ void AILion::Damage(RunListEvent* ev) PlotCourseToSprite(pActor, pTarget); pActor->nAction = 5; pActor->nCount = RandomSize(3); - pActor->set_int_ang((pActor->int_ang() - (RandomSize(1) << 8)) + (RandomSize(1) << 8)); // NOTE: no angle mask in original code + pActor->spr.angle += DAngle::fromBuild((- (RandomSize(1) << 8)) + (RandomSize(1) << 8)); // NOTE: no angle mask in original code } else { @@ -272,8 +272,6 @@ void AILion::Tick(RunListEvent* ev) { PlotCourseToSprite(pActor, pTarget); - int nAng = pActor->int_ang() & 0xFFF8; - if (pActor->spr.cstat & CSTAT_SPRITE_INVISIBLE) { pActor->vel.XY() = pActor->spr.angle.ToVector() * 2048; diff --git a/source/games/exhumed/src/mummy.cpp b/source/games/exhumed/src/mummy.cpp index 50f60e228..1b26286e7 100644 --- a/source/games/exhumed/src/mummy.cpp +++ b/source/games/exhumed/src/mummy.cpp @@ -257,7 +257,7 @@ void AIMummy::Tick(RunListEvent* ev) { case kHitWall: { - pActor->set_int_ang((pActor->int_ang() + ((RandomWord() & 0x3FF) + 1024)) & kAngleMask); + pActor->spr.angle += DAngle180 + DAngle::fromBuild(RandomWord() & 0x3FF); pActor->VelFromAngle(-2); return; } diff --git a/source/games/exhumed/src/object.cpp b/source/games/exhumed/src/object.cpp index 4723760e8..c8f1c2c06 100644 --- a/source/games/exhumed/src/object.cpp +++ b/source/games/exhumed/src/object.cpp @@ -1251,7 +1251,7 @@ void AITrap::Tick(RunListEvent* ev) { if (nType == 15) { - pBullet->set_int_ang((pBullet->int_ang() - 512) & kAngleMask); + pBullet->spr.angle -= DAngle90; D3PlayFX(StaticSound[kSound32], pBullet); } else diff --git a/source/games/exhumed/src/player.cpp b/source/games/exhumed/src/player.cpp index c5d14a361..950f66a85 100644 --- a/source/games/exhumed/src/player.cpp +++ b/source/games/exhumed/src/player.cpp @@ -2705,7 +2705,7 @@ DEFINE_ACTION_FUNCTION(_ExhumedPlayer, IsUnderwater) DEFINE_ACTION_FUNCTION(_ExhumedPlayer, GetAngle) { PARAM_SELF_STRUCT_PROLOGUE(Player); - ACTION_RETURN_INT(self->pActor->int_ang()); + ACTION_RETURN_INT(self->pActor->spr.angle.Buildang()); } diff --git a/source/games/exhumed/src/queen.cpp b/source/games/exhumed/src/queen.cpp index 4531517a3..9b91ad04a 100644 --- a/source/games/exhumed/src/queen.cpp +++ b/source/games/exhumed/src/queen.cpp @@ -658,7 +658,6 @@ void BuildQueenHead(int nQueen) DExhumedActor* pActor = QueenList[nQueen].pActor; if (!pActor) return; - int nAngle = pActor->int_ang(); auto pSector = pActor->sector(); auto pActor2 = insertActor(pSector, 121); @@ -674,7 +673,7 @@ void BuildQueenHead(int nQueen) pActor2->spr.pal = 0; pActor2->spr.xoffset = 0; pActor2->spr.yoffset = 0; - pActor2->set_int_ang(nAngle); + pActor2->spr.angle = pActor->spr.angle; nVelShift = 2; SetHeadVel(pActor2); diff --git a/source/games/exhumed/src/rex.cpp b/source/games/exhumed/src/rex.cpp index 59287a5f9..9d8009d2a 100644 --- a/source/games/exhumed/src/rex.cpp +++ b/source/games/exhumed/src/rex.cpp @@ -203,9 +203,9 @@ void AIRex::Tick(RunListEvent* ev) { if (pTarget == nullptr) { - auto nAngle = pActor->int_ang(); // make backup of this variable + auto nAngle = pActor->spr.angle; pActor->pTarget = FindPlayer(pActor, 60); - pActor->set_int_ang(nAngle); + pActor->spr.angle = nAngle; } else { diff --git a/source/games/exhumed/src/spider.cpp b/source/games/exhumed/src/spider.cpp index 347034e32..57edcf4b9 100644 --- a/source/games/exhumed/src/spider.cpp +++ b/source/games/exhumed/src/spider.cpp @@ -297,7 +297,7 @@ void AISpider::Tick(RunListEvent* ev) { case kHitWall: { - spp->set_int_ang((spp->int_ang() + 256) & 0x7EF); + spp->spr.angle += DAngle45; spp->VelFromAngle(); return; }