- Blood: fixed bad damage scaling in ConcussSprite

This uses the square of the distance, so the factor between Build's Q28.4 format and floats is not 16, but 16*16 = 256.
This commit is contained in:
Christoph Oelckers 2023-04-08 10:46:35 +02:00
parent 307276a276
commit 7554808104

View file

@ -2544,9 +2544,8 @@ void actInit(TArray<DBloodActor*>& actors)
static void ConcussSprite(DBloodActor* source, DBloodActor* actor, const DVector3& pos, double damage)
{
auto vect = actor->spr.pos - pos;
double dist2 = vect.LengthSquared() + 0x4000;
damage *= 0x4000 / dist2;
double dist2 = vect.LengthSquared() + 0x400;
damage *= 0x400 / dist2;
if (actor->spr.flags & kPhysMove)
{