diff --git a/source/games/blood/src/animatesprite.cpp b/source/games/blood/src/animatesprite.cpp index 65f377800..5f65ce31f 100644 --- a/source/games/blood/src/animatesprite.cpp +++ b/source/games/blood/src/animatesprite.cpp @@ -488,7 +488,7 @@ static tspritetype* viewAddEffect(tspriteArray& tsprites, int nTSprite, VIEW_EFF pNSprite->pos.XY() += gView->actor->spr.angle.ToVector() * 8; } if ((pPlayer->curWeapon == kWeapLifeLeech) || (pPlayer->curWeapon == kWeapVoodooDoll)) // make lifeleech/voodoo doll always face viewer like sprite - pNSprite->set_int_ang((pNSprite->int_ang() + 512) & 2047); // offset angle 90 degrees + pNSprite->angle += DAngle90; } break; } diff --git a/source/games/blood/src/fx.cpp b/source/games/blood/src/fx.cpp index 2aaa3635a..a58bee4a3 100644 --- a/source/games/blood/src/fx.cpp +++ b/source/games/blood/src/fx.cpp @@ -282,7 +282,7 @@ void fxSpawnBlood(DBloodActor* actor, int) auto bloodactor = gFX.fxSpawnActor(FX_27, actor->sector(), actor->spr.pos, 0); if (bloodactor) { - bloodactor->set_int_ang(1024); + bloodactor->spr.angle = DAngle180; bloodactor->vel.X = Random2F(0x6aaaa); bloodactor->vel.Y = Random2F(0x6aaaa); bloodactor->vel.Z = -Random2F(0x10aaaa) - FixedToFloat(100); @@ -312,7 +312,7 @@ void fxSpawnPodStuff(DBloodActor* actor, int) spawnactor = gFX.fxSpawnActor(FX_54, actor->sector(), actor->spr.pos, 0); if (spawnactor) { - spawnactor->set_int_ang(1024); + spawnactor->spr.angle = DAngle180; spawnactor->vel.X = Random2F(0x6aaaa); spawnactor->vel.Y = Random2F(0x6aaaa); spawnactor->vel.Z = -Random2F(0x10aaaa) - FixedToFloat(100); @@ -336,7 +336,7 @@ void fxSpawnEjectingBrass(DBloodActor* actor, int z, int a3, int a4) if (pBrass) { if (!VanillaMode()) - pBrass->set_int_ang(Random(2047)); + pBrass->spr.angle = RandomAngle(); int nDist = (a4 << 18) / 120 + Random2(((a4 / 4) << 18) / 120); int nAngle = actor->int_ang() + Random2(56) + 512; pBrass->set_int_bvel_x(MulScale(nDist, Cos(nAngle), 30)); @@ -361,7 +361,7 @@ void fxSpawnEjectingShell(DBloodActor* actor, int z, int a3, int a4) if (pShell) { if (!VanillaMode()) - pShell->set_int_ang(Random(2047)); + pShell->spr.angle = RandomAngle(); int nDist = (a4 << 18) / 120 + Random2(((a4 / 4) << 18) / 120); int nAngle = actor->int_ang() + Random2(56) + 512; pShell->set_int_bvel_x(MulScale(nDist, Cos(nAngle), 30)); diff --git a/source/games/blood/src/nnexts.cpp b/source/games/blood/src/nnexts.cpp index 18c213c04..142361814 100644 --- a/source/games/blood/src/nnexts.cpp +++ b/source/games/blood/src/nnexts.cpp @@ -3455,7 +3455,7 @@ void useSectorWindGen(DBloodActor* sourceactor, sectortype* pSector) if ((sourceactor->xspr.data1 & 0x0002)) { while (sourceactor->int_ang() == ang) - sourceactor->set_int_ang(nnExtRandom(-kAng360, kAng360) & 2047); + sourceactor->spr.angle = RandomAngle(); } } else if (sourceactor->spr.cstat & CSTAT_SPRITE_MOVE_FORWARD) sourceactor->spr.angle += mapangle(sourceactor->xspr.data4); diff --git a/source/games/blood/src/player.cpp b/source/games/blood/src/player.cpp index f28d108ef..d41d540dc 100644 --- a/source/games/blood/src/player.cpp +++ b/source/games/blood/src/player.cpp @@ -1503,7 +1503,7 @@ int ActionScan(PLAYER* pPlayer, HitInfo* out) void UpdatePlayerSpriteAngle(PLAYER* pPlayer) { - pPlayer->actor->set_int_ang(pPlayer->angle.ang.Buildang()); + pPlayer->actor->spr.angle = pPlayer->angle.ang; } //--------------------------------------------------------------------------- @@ -1719,7 +1719,7 @@ void ProcessInput(PLAYER* pPlayer) auto spawned = actSpawnDude(pactor, kDudeHand, pPlayer->actor->native_clipdist() << 1, 0); if (spawned) { - spawned->set_int_ang((pPlayer->actor->int_ang() + 1024) & 2047); + spawned->spr.angle += DAngle180; int x = bcos(pPlayer->actor->int_ang()); int y = bsin(pPlayer->actor->int_ang()); spawned->set_int_bvel_x(pPlayer->actor->int_vel().X + MulScale(0x155555, x, 14)); diff --git a/source/games/blood/src/weapon.cpp b/source/games/blood/src/weapon.cpp index 236468c1c..ed8546bfe 100644 --- a/source/games/blood/src/weapon.cpp +++ b/source/games/blood/src/weapon.cpp @@ -1970,7 +1970,7 @@ void FireLifeLeech(int nTrigger, PLAYER* pPlayer) if (missileActor) { missileActor->SetTarget(pPlayer->aimTarget); - missileActor->set_int_ang((nTrigger == 2) ? 1024 : 0); + missileActor->spr.angle = ((nTrigger == 2) ? DAngle180 : nullAngle); } if (checkAmmo2(pPlayer, 8, 1)) UseAmmo(pPlayer, 8, 1);