WEAPONx FLAGS

From EDukeWiki
Revision as of 12:36, 20 April 2009 by TX (talk | contribs)
Jump to navigation Jump to search

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.