- Blood: fixed velocity for ejected shell casings.

This commit is contained in:
Christoph Oelckers 2023-01-21 14:33:42 +01:00
parent 9cc7f90410
commit 19a58ddeb0

View file

@ -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.;