Fix player being not blocked by sprites lying on an extended floor.

getzrange() returns the floor rather than the sprite if their heights are
equal.  Now, make an exception for extended floors (analogously, ceilings).

git-svn-id: https://svn.eduke32.com/eduke32@2347 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
helixhorned 2012-02-16 19:24:44 +00:00
parent ebbf4d79ce
commit c900e4ef87

View file

@ -13076,8 +13076,26 @@ restart_grand:
if (clipyou != 0)
{
if ((pos->z > daz) && (daz > *ceilz)) { *ceilz = daz; *ceilhit = j+49152; }
if ((pos->z < daz2) && (daz2 < *florz)) { *florz = daz2; *florhit = j+49152; }
if ((pos->z > daz) && (daz > *ceilz
#ifdef YAX_ENABLE
|| (daz == *ceilz && yax_getbunch(clipsectorlist[i], YAX_CEILING)>=0)
#endif
))
{
*ceilz = daz;
*ceilhit = j+49152;
}
if ((pos->z < daz2) && (daz2 < *florz
#ifdef YAX_ENABLE
// can have a floor-sprite laying directly on the floor!
|| (daz2 == *florz && yax_getbunch(clipsectorlist[i], YAX_FLOOR)>=0)
#endif
))
{
*florz = daz2;
*florhit = j+49152;
}
}
}
}