From 7da3c62ea8bf12b3b21c342c08a66e677f697408 Mon Sep 17 00:00:00 2001 From: Mitchell Richters Date: Wed, 15 Mar 2023 19:40:42 +1100 Subject: [PATCH] - Blood: Repair velocity scaling in `ConcussSprite()`. * Issue originates back from 645c606e396b1a757319070511699735f76f864c. * 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. --- source/games/blood/src/actor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/games/blood/src/actor.cpp b/source/games/blood/src/actor.cpp index 017ff11d6..dcbba241b 100644 --- a/source/games/blood/src/actor.cpp +++ b/source/games/blood/src/actor.cpp @@ -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); } }