WEAPONx FLAGS: Difference between revisions

From EDukeWiki
Jump to navigation Jump to search
No edit summary
Fox (talk | contribs)
No edit summary
 
(7 intermediate revisions by 3 users not shown)
Line 1: Line 1:
WEAPONx_FLAGS is a [[gamevar]] that has the power to change several different things about weapons (not projectiles).
'''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:
== Flags ==


{{Weapon flags}}


{| {{prettytable}}
[[Category:Bitfields]]
!Name!!Number!!Description!!
|-
|WEAPON_FLAG_HOLSTER_CLEARS_CLIP
|align="right"|'''1'''
|Holstering clears clip
|-
|WEAPON_FLAG_GLOWS
|align="right"|'''2'''
|Glows
|-
|WEAPON_FLAG_AUTOMATIC
|align="right"|'''4'''
|Automatic
|-
|WEAPON_FLAG_FIREEVERYOTHER
|align="right"|'''8'''
|Fire every other frame
|-
|WEAPON_FLAG_FIREEVERYTHIRD
|align="right"|'''16'''
|Fire every third frame
|-
|WEAPON_FLAG_RANDOMRESTART
|align="right"|'''32'''
|Random restart on automatic
|-
|WEAPON_FLAG_AMMOPERSHOT
|align="right"|'''64'''
|Use ammo per burst (like the Devastator)
|-
|WEAPON_FLAG_BOMB_TRIGGER
|align="right"|'''128'''
|Is a bomb trigger (Pipebomb Detonator)
|-
|WEAPON_FLAG_NOVISIBLE
|align="right"|'''256'''
|Using does NOT cause player to flash the level (clear visibility)
|-
|WEAPON_FLAG_THROWIT
|align="right"|'''512'''
|Use 'throws' the 'shoots' item
|-
|WEAPON_FLAG_CHECKATRELOAD
|align="right"|'''1024'''
|Check weapon availability at 'reload' time
|-
|WEAPON_FLAG_STANDSTILL
|align="right"|'''2048'''
|player should stop jumping
|-
|WEAPON_FLAG_SPAWNTYPE1
|align="right"|'''0'''
|Spawn Type 1 (Pistol shells)
|-
|WEAPON_FLAG_SPAWNTYPE2
|align="right"|'''4096'''
|Spawn Type 2 (Shotgun shells)
|-
|WEAPON_FLAG_SPAWNTYPE3
|align="right"|'''8192'''
|Spawn Type 3 (Chaingun shells)
|-
|WEAPON_FLAG_SEMIAUTO
|align="right"|'''16384'''
|Semi-automatic (cancel button press after each shot)
|-
|WEAPON_FLAG_RELOAD_TIMING
|align="right"|'''32768'''
|Alternate reload sound timing (hack for pistol reload sound timing)
|-
|WEAPON_FLAG_RESET
|align="right"|'''65536'''
|Alternate weapon timing (hack for chaingun and freezer, see player.c)
|}
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]]

Latest revision as of 05:04, 21 February 2020

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

Flags

The following values are used with WEAPONx_FLAGS.

Exposed Value Label Description
No 1 WEAPON_HOLSTER_CLEARS_CLIP Holster key "refills" magazine by removing excess ammo from the player
No 2 WEAPON_GLOWS Controls glowing effect on SHRINKER weapon's crystal, no effect on other weapons, probably breaks shotgun if used with that weapon
No 4 WEAPON_AUTOMATIC Resets kickback_pic to 1 instead of 0 when animation ends
No 8 WEAPON_FIREEVERYOTHER Fires projectiles every frame instead of when kickback_pic is equal to WEAPONx_FIREDELAY. Also alters burst fire behavior so that shots are dispatched once per tic instead of all at once.
No 16 WEAPON_FIREEVERYTHIRD Fires when kickback_pic  % 3 === 0 (every third frame)
No 32 WEAPON_RANDOMRESTART When used with WEAPON_AUTOMATIC, resets kickback_pic to a random value between 1 and 4 instead of 1 when animation ends
No 64 WEAPON_AMMOPERSHOT Use ammo per shot per burst (like the Devastator)
No 128 WEAPON_BOMB_TRIGGER Is a bomb trigger (Pipebomb Detonator)
No 256 WEAPON_NOVISIBLE Using does NOT cause player to flash the level (clear visibility)
No 512 WEAPON_THROWIT Currently unused
No 1024 WEAPON_CHECKATRELOAD Check weapon availability at 'reload' time, only affects weapons with WEAPONx_WORKSLIKE of TRIPBOMB_WEAPON
No 2048 WEAPON_STANDSTILL Stops all player z-axis movement when firing
No 4096 WEAPON_SPAWNTYPE2 Spawn Type 2 (Shotgun shells)
No 8192 WEAPON_SPAWNTYPE3 Spawn Type 3 (Chaingun shells)
No 16384 WEAPON_SEMIAUTO Semi-automatic (cancel button press after each shot)
No 32768 WEAPON_RELOAD_TIMING Alternate formula for reload sound timing, generally used for pistol
No 65536 WEAPON_RESET Resets kickback_pic to 1 instead of 0 at end of firing animation if fire is held
Defines
define WEAPON_HOLSTER_CLEARS_CLIP       0x00000001
define WEAPON_GLOWS                     0x00000002
define WEAPON_AUTOMATIC                 0x00000004
define WEAPON_FIREEVERYOTHER            0x00000008
define WEAPON_FIREEVERYTHIRD            0x00000010
define WEAPON_RANDOMRESTART             0x00000020
define WEAPON_AMMOPERSHOT               0x00000040
define WEAPON_BOMB_TRIGGER              0x00000080
define WEAPON_NOVISIBLE                 0x00000100
define WEAPON_THROWIT                   0x00000200
define WEAPON_CHECKATRELOAD             0x00000400
define WEAPON_STANDSTILL                0x00000800
define WEAPON_SPAWNTYPE2                0x00001000
define WEAPON_SPAWNTYPE3                0x00002000
define WEAPON_SEMIAUTO                  0x00004000
define WEAPON_RELOAD_TIMING             0x00008000
define WEAPON_RESET                     0x00010000