- fixed neartag's trace vector maintenance for sprite hits.

The trace vector needs to be shortened so that further checks only find items in front of the sprite.
This commit is contained in:
Christoph Oelckers 2022-11-04 13:23:01 +01:00
parent 77ae3b3b71
commit 73deae88ce

View file

@ -1155,10 +1155,11 @@ void neartag(const DVector3& pos, sectortype* startsect, DAngle angle, HitInfoBa
{
factor = newfactor;
result.hitActor = actor;
v = spot - pos;
// return distance to sprite in a separate variable because there is
// no means to determine what is for if both a sprite and wall are found.
// no means to determine what it is for if both a sprite and wall are found.
// Only SW's NearTagList actually uses it.
result.hitpos.Y = (spot - pos).XY().Length();
result.hitpos.Y = v.XY().Length();
}
}
}