Getzrange: Difference between revisions
Jump to navigation
Jump to search
Helixhorned (talk | contribs) created getzrange, only signature for now |
Helixhorned (talk | contribs) first edit. I hope that I got everything right. |
||
Line 1: | Line 1: | ||
'''getzrange''' <x> <y> <z> <sector> ''<ceilingz>'' ''<ceilinghit>'' ''<floorz>'' ''<floorhit>'' <walldist> < | '''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:<br> | |||
* 16384 + sectnum, if a ceiling or floor was hit first<br> | |||
* 49152 + spritenum, if a sprite was hit first<br> | |||
The behaviour in corner cases (sectnum invalid, x/y/z not in sectnum, etc.) should not be relied upon. |
Revision as of 12:47, 7 March 2011
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.