WEAPONx FLAGS: Difference between revisions

From EDukeWiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 7: Line 7:
!Name!!Number!!Description!!
!Name!!Number!!Description!!
|-
|-
|WEAPON_FLAG_HOLSTER_CLEARS_CLIP
|WEAPON_HOLSTER_CLEARS_CLIP
|align="right"|'''1'''
|align="right"|'''1'''
|Holstering clears clip
|Holstering clears clip
|-
|-
|WEAPON_FLAG_GLOWS
|WEAPON_GLOWS
|align="right"|'''2'''
|align="right"|'''2'''
|Glows
|Glows
|-
|-
|WEAPON_FLAG_AUTOMATIC
|WEAPON_AUTOMATIC
|align="right"|'''4'''
|align="right"|'''4'''
|Automatic
|Automatic
|-
|-
|WEAPON_FLAG_FIREEVERYOTHER
|WEAPON_FIREEVERYOTHER
|align="right"|'''8'''
|align="right"|'''8'''
|Fire every other frame
|Fire every other frame
|-
|-
|WEAPON_FLAG_FIREEVERYTHIRD
|WEAPON_FIREEVERYTHIRD
|align="right"|'''16'''
|align="right"|'''16'''
|Fire every third frame
|Fire every third frame
|-
|-
|WEAPON_FLAG_RANDOMRESTART
|WEAPON_RANDOMRESTART
|align="right"|'''32'''
|align="right"|'''32'''
|Random restart on automatic
|Random restart on automatic
|-
|-
|WEAPON_FLAG_AMMOPERSHOT
|WEAPON_AMMOPERSHOT
|align="right"|'''64'''
|align="right"|'''64'''
|Use ammo per burst (like the Devastator)
|Use ammo per burst (like the Devastator)
|-
|-
|WEAPON_FLAG_BOMB_TRIGGER
|WEAPON_BOMB_TRIGGER
|align="right"|'''128'''
|align="right"|'''128'''
|Is a bomb trigger (Pipebomb Detonator)
|Is a bomb trigger (Pipebomb Detonator)
|-
|-
|WEAPON_FLAG_NOVISIBLE
|WEAPON_NOVISIBLE
|align="right"|'''256'''
|align="right"|'''256'''
|Using does NOT cause player to flash the level (clear visibility)
|Using does NOT cause player to flash the level (clear visibility)
|-
|-
|WEAPON_FLAG_THROWIT
|WEAPON_THROWIT
|align="right"|'''512'''
|align="right"|'''512'''
|Use 'throws' the 'shoots' item
|Currently unused
|-
|-
|WEAPON_FLAG_CHECKATRELOAD
|WEAPON_CHECKATRELOAD
|align="right"|'''1024'''
|align="right"|'''1024'''
|Check weapon availability at 'reload' time
|Check weapon availability at 'reload' time
|-
|-
|WEAPON_FLAG_STANDSTILL
|WEAPON_STANDSTILL
|align="right"|'''2048'''
|align="right"|'''2048'''
|player should stop jumping
|player should stop jumping
|-
|-
|WEAPON_FLAG_SPAWNTYPE1
|WEAPON_SPAWNTYPE1
|align="right"|'''0'''
|align="right"|'''0'''
|Spawn Type 1 (Pistol shells)
|Spawn Type 1 (Pistol shells)
|-
|-
|WEAPON_FLAG_SPAWNTYPE2
|WEAPON_SPAWNTYPE2
|align="right"|'''4096'''
|align="right"|'''4096'''
|Spawn Type 2 (Shotgun shells)
|Spawn Type 2 (Shotgun shells)
|-
|-
|WEAPON_FLAG_SPAWNTYPE3
|WEAPON_SPAWNTYPE3
|align="right"|'''8192'''
|align="right"|'''8192'''
|Spawn Type 3 (Chaingun shells)
|Spawn Type 3 (Chaingun shells)
|-
|-
|WEAPON_FLAG_SEMIAUTO
|WEAPON_SEMIAUTO
|align="right"|'''16384'''
|align="right"|'''16384'''
|Semi-automatic (cancel button press after each shot)
|Semi-automatic (cancel button press after each shot)
|-
|-
|WEAPON_FLAG_RELOAD_TIMING
|WEAPON_RELOAD_TIMING
|align="right"|'''32768'''
|align="right"|'''32768'''
|Alternate reload sound timing (hack for pistol reload sound timing)
|Alternate formula for reload sound timing (used for pistol reload sound timing)
|-
|-
|WEAPON_FLAG_RESET
|WEAPON_RESET
|align="right"|'''65536'''
|align="right"|'''65536'''
|Alternate weapon timing (hack for chaingun and freezer, see player.c)
|Resets [kickback_pic]] to 1 instead of 0 at the end of the firing animation if fire is held
|}
|}
WEAPONx_FLAGS is a bitfield, so you can add the individual flags together in the manner of [[cstat]] and [[orientation]].
WEAPONx_FLAGS is a bitfield, so you can add the individual flags together in the manner of [[cstat]] and [[orientation]].


[[Category:Pre-defined gamevars]]
[[Category:Pre-defined gamevars]]

Revision as of 11:36, 20 April 2009

WEAPONx_FLAGS is a gamevar that has the power to change several different things about weapons (not projectiles).

The flag values for WEAPONx_FLAGS are:


Name Number Description
WEAPON_HOLSTER_CLEARS_CLIP 1 Holstering clears clip
WEAPON_GLOWS 2 Glows
WEAPON_AUTOMATIC 4 Automatic
WEAPON_FIREEVERYOTHER 8 Fire every other frame
WEAPON_FIREEVERYTHIRD 16 Fire every third frame
WEAPON_RANDOMRESTART 32 Random restart on automatic
WEAPON_AMMOPERSHOT 64 Use ammo per burst (like the Devastator)
WEAPON_BOMB_TRIGGER 128 Is a bomb trigger (Pipebomb Detonator)
WEAPON_NOVISIBLE 256 Using does NOT cause player to flash the level (clear visibility)
WEAPON_THROWIT 512 Currently unused
WEAPON_CHECKATRELOAD 1024 Check weapon availability at 'reload' time
WEAPON_STANDSTILL 2048 player should stop jumping
WEAPON_SPAWNTYPE1 0 Spawn Type 1 (Pistol shells)
WEAPON_SPAWNTYPE2 4096 Spawn Type 2 (Shotgun shells)
WEAPON_SPAWNTYPE3 8192 Spawn Type 3 (Chaingun shells)
WEAPON_SEMIAUTO 16384 Semi-automatic (cancel button press after each shot)
WEAPON_RELOAD_TIMING 32768 Alternate formula for reload sound timing (used for pistol reload sound timing)
WEAPON_RESET 65536 Resets [kickback_pic]] to 1 instead of 0 at the end of the firing animation if fire is held

WEAPONx_FLAGS is a bitfield, so you can add the individual flags together in the manner of cstat and orientation.