Htflags: Difference between revisions

From EDukeWiki
Jump to navigation Jump to search
No edit summary
add label names
Line 1: Line 1:
A per-actor property, this controls special flags for sprites. The values are:
A per-actor property, this controls special flags for sprites. In the following listing, whenever a label for a value is defined in the global CON namespace by default, it is shown after the numeric value:


'''1'''  - Generates a shadow. See [[spriteshadow]].<br />
'''1'''  - SFLAG_SHADOW - Generates a shadow. See [[spriteshadow]].<br />
'''2'''  - Turns [[spritepal|palette]] 6 whenever night vision goggles are used. See [[spritenvg]].<br />
'''2'''  - SFLAG_NVG - Turns [[spritepal|palette]] 6 whenever night vision goggles are used. See [[spritenvg]].<br />
'''4'''  - The sprite's shade is unaffected by the shade of its sector. See [[spritenoshade]].<br />
'''4'''  - SFLAG_NOSHADE - The sprite's shade is unaffected by the shade of its sector. See [[spritenoshade]].<br />
'''8'''  - Is a [[defineprojectile|projectile]].<br />
'''8'''  - Is a [[defineprojectile|projectile]].<br />
'''16'''  - Prevents teleporting. The sprite is not entered into the [[decal deletion queue]].<br />
'''16'''  - Prevents teleporting. The sprite is not entered into the [[decal deletion queue]].<br />
'''32'''  - Is an enemy. See [[useractor]].<br />
'''32'''  - SFLAG_BADGUY - Is an enemy. See [[useractor]].<br />
'''64'''  - Sprite will be insusceptible to floor palette of sector containing this sprite. See [[spritenopal]].<br />
'''64'''  - SFLAG_NOPAL - Sprite will be insusceptible to floor palette of sector containing this sprite. See [[spritenopal]].<br />
'''128''' - Sprite will not be run through [[event]] code.<br />
'''128''' - SFLAG_NOEVENTS - Sprite will not be run through [[event]] code.<br />
'''256''' - Sprite will not emit hardcoded Polymer-based lights.<br />
'''256''' - SFLAG_NOLIGHT - Sprite will not emit hardcoded Polymer-based lights.<br />
'''512''' - called SPRITE_USEACTIVATOR in actors.h, internal?<br />
'''512''' - SFLAG_USEACTIVATOR - ''needs description''<br />
'''1024''' - called SPRITE_NULL in actors.h, internal?<br />
'''1024''' - internal, do not use<br />
'''2048''' - Sprite will skip x/y "[[clipmove]]()" . This skips objects checking for collisions with other actors to increase performance. Useful for particle effects.
'''2048''' - SFLAG_NOCLIP - Sprite will call "[[clipmove]]()" with a [[clipmask]] of 0, skipping collision detection with other sprites to increase performance. (Specifically, to prevent runtime behavior that is quadratic with the number of sprites.) Useful for particle effects.<br />
SFLAG_SMOOTHMOVE - ''needs description''<br />
SFLAG_NOTELEPORT - ''needs description''<br />


'''htflags''' is a [[bitfield]], so add together the values you want and then set htflags to the sum.<br/>
'''htflags''' is a [[bitfield]], so add together the values you want and then set htflags to the sum.<br/>

Revision as of 09:12, 14 March 2013

A per-actor property, this controls special flags for sprites. In the following listing, whenever a label for a value is defined in the global CON namespace by default, it is shown after the numeric value:

1 - SFLAG_SHADOW - Generates a shadow. See spriteshadow.
2 - SFLAG_NVG - Turns palette 6 whenever night vision goggles are used. See spritenvg.
4 - SFLAG_NOSHADE - The sprite's shade is unaffected by the shade of its sector. See spritenoshade.
8 - Is a projectile.
16 - Prevents teleporting. The sprite is not entered into the decal deletion queue.
32 - SFLAG_BADGUY - Is an enemy. See useractor.
64 - SFLAG_NOPAL - Sprite will be insusceptible to floor palette of sector containing this sprite. See spritenopal.
128 - SFLAG_NOEVENTS - Sprite will not be run through event code.
256 - SFLAG_NOLIGHT - Sprite will not emit hardcoded Polymer-based lights.
512 - SFLAG_USEACTIVATOR - needs description
1024 - internal, do not use
2048 - SFLAG_NOCLIP - Sprite will call "clipmove()" with a clipmask of 0, skipping collision detection with other sprites to increase performance. (Specifically, to prevent runtime behavior that is quadratic with the number of sprites.) Useful for particle effects.
SFLAG_SMOOTHMOVE - needs description
SFLAG_NOTELEPORT - needs description

htflags is a bitfield, so add together the values you want and then set htflags to the sum.
This member can also be set using the per-sprite form of the spriteflags command.