- Blood: Fix velocity issues in MoveThing(), such as explosive bundles not sliding along the ground.

* Merge with or above `- parts of Blood's MoveThing`.
This commit is contained in:
Mitchell Richters 2022-10-09 15:14:48 +11:00 committed by Christoph Oelckers
parent a6eec404db
commit f69e977411

View file

@ -4693,7 +4693,7 @@ static Collision MoveThing(DBloodActor* actor)
if (bottom >= floorZ)
{
double nVel = actor->vel.XY().Length();
int nVelClipped = min(nVel, FixedToFloat(0x11111));
double nVelClipped = min(nVel, (16. / 15.));
Collision& coll = floorColl;
if (coll.type == kHitSprite)
@ -4707,7 +4707,7 @@ static Collision MoveThing(DBloodActor* actor)
}
if (nVel > 0)
{
actor->vel.XY() *= nVelClipped / nVel;
actor->vel.XY() -= actor->vel.XY() * nVelClipped / nVel;
}
}
if (actor->vel.X != 0 || actor->vel.Y != 0)