- Blood: Repair velocity scaling in ConcussSprite().

* Issue originates back from 645c606e39.
* During initial floatification, the velocity addition was changed a mulscale of 16 to 12, quadrupling the amplification.
* A lot's changed since then, but we can restore the size of the velocity by simply dividing the size value by 4x.
* Turned into a reciprocal as well to avoid division.
* Fixes #860.
This commit is contained in:
Mitchell Richters 2023-03-15 19:40:42 +11:00
parent 39624da390
commit 7da3c62ea8

View file

@ -2574,7 +2574,7 @@ static void ConcussSprite(DBloodActor* source, DBloodActor* actor, const DVector
if (mass > 0)
{
auto tex = TexMan.GetGameTexture(actor->spr.spritetexture());
double size = (tex->GetDisplayWidth() * actor->spr.scale.X * tex->GetDisplayHeight() * actor->spr.scale.Y) / 0x20000;
double size = tex->GetDisplayWidth() * actor->spr.scale.X * tex->GetDisplayHeight() * actor->spr.scale.Y * (1. / 0x100000);
actor->vel += vect * Scale(damage, size, mass);
}
}