diff --git a/source/games/blood/src/actor.h b/source/games/blood/src/actor.h index cccdf3f2d..8ba4f80c4 100644 --- a/source/games/blood/src/actor.h +++ b/source/games/blood/src/actor.h @@ -255,11 +255,13 @@ int actGetRespawnTime(DBloodActor *pSprite); bool actCheckRespawn(DBloodActor *pSprite); void actFireVector(DBloodActor* shooter, double offset, double zoffset, DVector3 dv, VECTOR_TYPE vectorType); +[[deprecated]] inline void actFireVector(DBloodActor* pShooter, int a2, int a3, int a4, int a5, int a6, VECTOR_TYPE vectorType) { // Yay, yet another fixed point format... :( actFireVector(pShooter, a2 * inttoworld, a3 * zinttoworld, DVector3(FixedToFloat<14>(a4), FixedToFloat<14>(a5), FixedToFloat<14>(a6)), vectorType); } +[[deprecated]] inline void actFireVectorf(DBloodActor *pShooter, int a2, double a3, int a4, int a5, int a6, VECTOR_TYPE vectorType) { actFireVector(pShooter, a2, a3 * zworldtoint, a4, a5, a6, vectorType); diff --git a/source/games/blood/src/player.cpp b/source/games/blood/src/player.cpp index 26c81160e..ab5f1b249 100644 --- a/source/games/blood/src/player.cpp +++ b/source/games/blood/src/player.cpp @@ -2278,7 +2278,7 @@ int UseAmmo(PLAYER* pPlayer, int nAmmoType, int nDec) void voodooTarget(PLAYER* pPlayer) { DBloodActor* actor = pPlayer->actor; - int v4 = pPlayer->aim.dz; + double aimz = pPlayer->aim.dz / 16384.; double dz = pPlayer->zWeapon - pPlayer->actor->spr.pos.Z; if (UseAmmo(pPlayer, 9, 0) < 8) { @@ -2287,10 +2287,10 @@ void voodooTarget(PLAYER* pPlayer) } for (int i = 0; i < 4; i++) { - int ang1 = (pPlayer->voodooVar1 + pPlayer->vodooVar2) & 2047; - actFireVectorf(actor, 0, dz, bcos(ang1), bsin(ang1), v4, kVectorVoodoo10); - int ang2 = (pPlayer->voodooVar1 + 2048 - pPlayer->vodooVar2) & 2047; - actFireVectorf(actor, 0, dz, bcos(ang2), bsin(ang2), v4, kVectorVoodoo10); + DAngle ang1 = DAngle::fromBuild(pPlayer->voodooVar1 + pPlayer->vodooVar2); + actFireVector(actor, 0, dz, DVector3(ang1.ToVector(), aimz), kVectorVoodoo10); + DAngle ang2 = DAngle::fromBuild(pPlayer->voodooVar1 - pPlayer->vodooVar2); + actFireVector(actor, 0, dz, DVector3(ang1.ToVector(), aimz), kVectorVoodoo10); } pPlayer->voodooTargets = ClipLow(pPlayer->voodooTargets - 1, 0); }