diff --git a/source/games/blood/src/fx.cpp b/source/games/blood/src/fx.cpp index fdbed1e0d..7fa226f23 100644 --- a/source/games/blood/src/fx.cpp +++ b/source/games/blood/src/fx.cpp @@ -329,7 +329,8 @@ void fxSpawnEjectingBrass(DBloodActor* actor, double z, double dist, int rdist) { if (!VanillaMode()) pBrass->spr.Angles.Yaw = RandomAngle(); - double nDist = rdist / 30. + Random2F(((rdist / 4) << 18) / 120, 4); + int iDist = (rdist << 18) / 120 + Random2(((rdist / 4) << 18) / 120); + double nDist = iDist / 65536.; DAngle nAngle = actor->spr.Angles.Yaw + Random2A(56) + DAngle90; pBrass->vel.XY() = nAngle.ToVector() * nDist; pBrass->vel.Z = actor->vel.Z - 2 - Random2(40) / 30.; @@ -351,7 +352,8 @@ void fxSpawnEjectingShell(DBloodActor* actor, double z, double dist, int rdist) { if (!VanillaMode()) pShell->spr.Angles.Yaw = RandomAngle(); - double nDist = rdist / 30. + Random2F(((rdist / 4) << 18) / 120, 4); + int iDist = (rdist << 18) / 120 + Random2(((rdist / 4) << 18) / 120); + double nDist = iDist / 65536.; DAngle nAngle = actor->spr.Angles.Yaw + Random2A(56) + DAngle90; pShell->vel.XY() = nAngle.ToVector() * nDist; pShell->vel.Z = actor->vel.Z - 2 - Random2(28) / 30.;