This fixes a bug in clipmove() where clipping against sprites above you was wrong

Because this is a check for sprites above the sprite being moved and not a check for sprites below, the height of the sprite should not be taken into account at all here and the base of the sprite should be used instead.

git-svn-id: https://svn.eduke32.com/eduke32@7404 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
terminx 2019-03-19 17:08:08 +00:00
parent 770b255bff
commit 76863607e3

View file

@ -1108,7 +1108,7 @@ int32_t clipmove(vec3_t *pos, int16_t *sectnum,
{
const int32_t daz = spr->z + spriteheightofs(j, &k, 1);
if (pos->z > daz-k-flordist && pos->z < daz+ceildist)
if (pos->z > daz-k-flordist && pos->z < spr->z + ceildist)
{
get_wallspr_points(spr, &x1, &x2, &y1, &y2);