- fix the HitScan call in CanMove.

This was picking an unexpected overload because the second parameter was a float but with an integer-range value.
This commit is contained in:
Christoph Oelckers 2022-09-27 17:10:23 +02:00
parent 180d020620
commit 138ba53ace

View file

@ -134,7 +134,7 @@ bool CanMove(DBloodActor* actor, DBloodActor* target, int nAngle_, int nRange)
GetActorExtents(actor, &top, &bottom);
DVector3 pos = actor->spr.pos;
DVector2 nAngVect = nAngle.ToVector();
HitScan_(actor, pos.Z * zworldtoint, nAngVect.X * (1 << 14), nAngVect.Y * (1 << 14), 0, CLIPMASK0, nRange);
HitScan(actor, pos.Z, DVector3(nAngVect, 0) * 1024, CLIPMASK0, nRange);
double nDist = (actor->spr.pos.XY() - gHitInfo.hitpos.XY()).Length();
if (nDist - (actor->fClipdist()) < nRange)
{