From 56bc13e6698da2e81d5b68ff487d258917e765e6 Mon Sep 17 00:00:00 2001 From: Mitchell Richters Date: Sun, 18 Sep 2022 19:43:28 +1000 Subject: [PATCH] - Blood: Floatify vel math in `checkCeilHit()`. --- source/games/blood/src/actor.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/source/games/blood/src/actor.cpp b/source/games/blood/src/actor.cpp index 7e0e7e67f..d5ead6525 100644 --- a/source/games/blood/src/actor.cpp +++ b/source/games/blood/src/actor.cpp @@ -4150,21 +4150,18 @@ static void checkCeilHit(DBloodActor* actor) if ((actor2->spr.statnum == kStatThing || actor2->spr.statnum == kStatDude) && (actor->vel.X != 0 || actor->vel.Y != 0 || actor->vel.Z != 0)) { auto adelta = actor2->spr.pos - actor->spr.pos; + actor2->vel.XY() += adelta.XY() * (1. / 4096.); + if (actor2->spr.statnum == kStatThing) { int nType = actor2->spr.type - kThingBase; const THINGINFO* pThingInfo = &thingInfo[nType]; if (pThingInfo->flags & 1) actor2->spr.flags |= 1; if (pThingInfo->flags & 2) actor2->spr.flags |= 4; - // Inlined ? - actor2->add_int_bvel_x(int(adelta.X * 16)); - actor2->add_int_bvel_y(int(adelta.Y * 16)); } else { actor2->spr.flags |= 5; - actor2->add_int_bvel_x(int(adelta.X * 16)); - actor2->add_int_bvel_y(int(adelta.Y * 16)); #ifdef NOONE_EXTENSIONS // add size shroom abilities if ((actor->IsPlayerActor() && isShrinked(actor)) || (actor2->IsPlayerActor() && isGrown(actor2))) {