ZScript constants
Jump to navigation
Jump to search
This is a list of ZScript_data_types#Constants globally available in ZScript. Many more constants are defined in specific classes and can be obtained by prefixing them with the respective class name.
This is for reference only. The most up-to-date information can be found in GZDoom itself, in constants.zs.
Constant name | Constant value | Description |
---|---|---|
TICRATE | 35 | The number of tics per second. This is made into a constant with the hope that eventually variable ticrate might become a thing in GZDoom. |
FLAG_NO_CHANGE | -1 | for flag changer functions |
MAXPLAYERS | 8 | Maximum possible number of players in multiplayer. This might change in the future if support for game modes with higher player count is added. |
DEFMELEERANGE | 64 | Default range for melee attacks. |
SAWRANGE | (64.+(1./65536.)) | Range for A_Saw. Uses meleerange + 1 so the puff doesn't skip the flash. (Clarificaton needed) |
MISSILERANGE | (32*64) | Equals to 2048. Default maximum distance for monster hitscan attacks. |
PLAYERMISSILERANGE | 8192 | Default maximum distance for player hitscan attacks. This is double what the original Doom engine used. |
HR_SHADOW | (0x6800 / 65536.) | This translucency value produces the closest match to Heretic's TINTTAB. ~40% of the value of the overlaid image shows through. |
HX_SHADOW | (0x9800 / 65536.) | Hexen's TINTTAB is the same as Heretic's, just reversed. |
HX_ALTSHADOW | (0x6800 / 65536.) | |
M_E | 2.7182818284590452354 | e |
M_LOG2E | 1.4426950408889634074 | log_2 e |
M_LOG10E | 0.43429448190325182765 | log_10 e |
M_LN2 | 0.69314718055994530942 | log_e 2 |
M_LN10 | 2.30258509299404568402 | log_e 10 |
M_PI | 3.14159265358979323846 | pi |
M_PI_2 | 1.57079632679489661923 | pi/2 |
M_PI_4 | 0.78539816339744830962 | pi/4 |
M_1_PI | 0.31830988618379067154 | 1/pi |
M_2_PI | 0.63661977236758134308 | 2/pi |
M_2_SQRTPI | 1.12837916709551257390 | 2/sqrt(pi) |
M_SQRT2 | 1.41421356237309504880 | sqrt(2) |
M_SQRT1_2 | 0.70710678118654752440 | 1/sqrt(2) |
WATER_SINK_FACTOR | 0.125 | Used by Actor virtual function FallAndSink |
WATER_SINK_SMALL_FACTOR | 0.25 | |
WATER_SINK_SPEED | 0.5 | |
WATER_JUMP_SPEED | 3.5 |