Getzrange - EDukeWiki

# Getzrange

From EDukeWiki

getzrange <x> <y> <z> <sector> <ceilingz> <ceilinghit> <floorz> <floorhit> <walldist> <clipmask>

Given a starting point and its containing sector, calculate (1) the z coordinates of (2) the objects that would be first hit by a quadratic, floor-aligned sprite pointing parallel to the grid and having side length 2*<walldist>, when travelling in a straight line up- and downwards (respectively for <ceiling...> and <floor...>). The <clipmask> is specified in the same fashion as in hitscan.

<ceilinghit> and <floorhit> can take the following values:

- 16384 + sectnum, if a ceiling or floor was hit first
- 49152 + spritenum, if a sprite was hit first

The behaviour in corner cases (sectnum invalid, x/y/z not in sectnum, etc.) should not be relied upon.

Retrieved from "http://wiki.eduke32.com/w/index.php?title=Getzrange&oldid=9503"