Clipmove: Difference between revisions
Hendricks266 (talk | contribs) This wiki is about CON scripting, not the source code. |
Hendricks266 (talk | contribs) mNo edit summary |
||
Line 1: | Line 1: | ||
'''clipmove''' <''return''> <''x''> <''y''> <z> <''sectnum''> <xvect> <yvect> <walldist> <flordist> <ceildist> <clipmask> | '''clipmove''' <''return''> <''x''> <''y''> <z> <''sectnum''> <xvect> <yvect> <walldist> <flordist> <ceildist> <clipmask><br> | ||
'''clipmovenoslide''' <''return''> <''x''> <''y''> <z> <''sectnum''> <xvect> <yvect> <walldist> <flordist> <ceildist> <clipmask> | '''clipmovenoslide''' <''return''> <''x''> <''y''> <z> <''sectnum''> <xvect> <yvect> <walldist> <flordist> <ceildist> <clipmask> | ||
Revision as of 20:47, 30 March 2014
clipmove <return> <x> <y> <z> <sectnum> <xvect> <yvect> <walldist> <flordist> <ceildist> <clipmask>
clipmovenoslide <return> <x> <y> <z> <sectnum> <xvect> <yvect> <walldist> <flordist> <ceildist> <clipmask>
Calculates the movement of any object, starting from position (<x>, <y>, <z>) and sector <sectnum>, in any direction at velocity (<xvect>, <yvect>), keeping the object will a distance <walldist> from walls, <flordist> from floors, and <ceildist> from ceilings.
<clipmask> is a mask that tells whether the object should be clipped to or not. The lower 16 bits are bitwise ANDed with wall[].cstat and the higher 16 bits are bitwise ANDed with sprite[].cstat.
If <return>, <x>, <y>, and <sectnum> are gamevars, they will be modified with the result of the calculation.
<return> value:
0 (touched nothing) 32768+wallnum (wall first touched) 49152+spritenum (sprite first touched)