Skip to content

Commit

Permalink
- Blood: fixed velocity for ejected shell casings.
Browse files Browse the repository at this point in the history
  • Loading branch information
coelckers committed Jan 21, 2023
1 parent 9cc7f90 commit 19a58dd
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions source/games/blood/src/fx.cpp
Expand Up @@ -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.;
Expand All @@ -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.;
Expand Down

0 comments on commit 19a58dd

Please sign in to comment.