diff --git a/Build/Compilers/BCC/zcommon.bcs b/Build/Compilers/BCC/zcommon.bcs
new file mode 100644
index 0000000000000000000000000000000000000000..ce5b00de6eeaa1ad335fcfd3e82ee6d494c50151
--- /dev/null
+++ b/Build/Compilers/BCC/zcommon.bcs
@@ -0,0 +1,3 @@
+#include "std.acs"
+
+import upmost: region = std;
\ No newline at end of file
diff --git a/Build/Compilers/Nodebuilders/ZenNode b/Build/Compilers/Nodebuilders/ZenNode
new file mode 100644
index 0000000000000000000000000000000000000000..7361b969c981d9ef3c2d6547178ebdea0b76c335
Binary files /dev/null and b/Build/Compilers/Nodebuilders/ZenNode differ
diff --git a/Build/Compilers/Nodebuilders/glbsp b/Build/Compilers/Nodebuilders/glbsp
new file mode 100644
index 0000000000000000000000000000000000000000..6a601dee7bb9ffa1bb85da57686959c1d2e6263c
Binary files /dev/null and b/Build/Compilers/Nodebuilders/glbsp differ
diff --git a/Build/Compilers/Nodebuilders/zdbsp b/Build/Compilers/Nodebuilders/zdbsp
new file mode 100644
index 0000000000000000000000000000000000000000..a3d2d409eb5e6df174e73051a437890f75a6dd16
Binary files /dev/null and b/Build/Compilers/Nodebuilders/zdbsp differ
diff --git a/Build/Compilers/ZDoom/acc.exe b/Build/Compilers/ZDoom/acc.exe
index 7534f775fe61e685fee10c497f8b584070dea0e2..a9707c4146dc1682ac94f0dc0ca6edeca0cc740f 100755
Binary files a/Build/Compilers/ZDoom/acc.exe and b/Build/Compilers/ZDoom/acc.exe differ
diff --git a/Build/Compilers/ZDoom/zcommon.acs b/Build/Compilers/ZDoom/zcommon.acs
index 7a43ef933b49170b48dafaac63892ddf660a9d6c..5cdec5d6982b5caac1ef61615f2fa1e78d857552 100755
--- a/Build/Compilers/ZDoom/zcommon.acs
+++ b/Build/Compilers/ZDoom/zcommon.acs
@@ -1,15 +1,15 @@
-
-//**************************************************************************
-//**
-//** zcommon.acs
-//**
-//**************************************************************************
-
-// If you are not using the -h command line switch and do not want to use
-// WadAuthor's error checker, you can uncomment the following line to shave
-// a few bytes off the size of compiled scripts.
-//#nowadauthor
-
-#include "zspecial.acs"
-#include "zdefs.acs"
-#include "zwvars.acs"
+
+//**************************************************************************
+//**
+//** zcommon.acs
+//**
+//**************************************************************************
+
+// If you are not using the -h command line switch and do not want to use
+// WadAuthor's error checker, you can uncomment the following line to shave
+// a few bytes off the size of compiled scripts.
+//#nowadauthor
+
+#include "zspecial.acs"
+#include "zdefs.acs"
+#include "zwvars.acs"
diff --git a/Build/Compilers/ZDoom/zdefs.acs b/Build/Compilers/ZDoom/zdefs.acs
index 3f24b6145c4354bd1b821ce4e80c1bd874515809..4b14847e354472c043bd2bc61afdaf2ff90d9805 100755
--- a/Build/Compilers/ZDoom/zdefs.acs
+++ b/Build/Compilers/ZDoom/zdefs.acs
@@ -1,1150 +1,1183 @@
-//**************************************************************************
-//**
-//** zdefs.acs
-//**
-//** Common definitions for use when compiling ACS scripts for ZDoom
-//**
-//**************************************************************************
-
-#define TRUE                    1
-#define FALSE                   0
-#define ON                      1
-#define OFF                     0
-#define YES                     1
-#define NO                      0
-
-#define LINE_FRONT              0
-#define LINE_BACK               1
-
-#define SIDE_FRONT              0
-#define SIDE_BACK               1
-
-#define TEXTURE_TOP             0
-#define TEXTURE_MIDDLE          1
-#define TEXTURE_BOTTOM          2
-
-// same information as combinable bit flags
-#define TEXFLAG_TOP				1
-#define TEXFLAG_MIDDLE			2
-#define TEXFLAG_BOTTOM			4
-#define TEXFLAG_ADDOFFSET		8
-
-#define GAME_SINGLE_PLAYER      0
-#define GAME_NET_COOPERATIVE    1
-#define GAME_NET_DEATHMATCH     2
-#define GAME_TITLE_MAP		3
-
-// Classes are only useful with Hexen
-#define CLASS_FIGHTER           0
-#define CLASS_CLERIC            1
-#define CLASS_MAGE              2
-
-#define SKILL_VERY_EASY         0
-#define SKILL_EASY              1
-#define SKILL_NORMAL            2
-#define SKILL_HARD              3
-#define SKILL_VERY_HARD         4
-
-#define BLOCK_NOTHING           0
-#define BLOCK_CREATURES         1
-#define BLOCK_EVERYTHING        2
-#define BLOCK_RAILING			3
-#define BLOCK_PLAYERS			4
-
-#define SCROLL                  0
-#define CARRY                   1
-#define SCROLL_AND_CARRY        2
-
-// Means-of-death for Sector_SetDamage --------------------------------------
-
-#define MOD_UNKNOWN             0
-#define MOD_ROCKET              5
-#define MOD_R_SPLASH            6
-#define MOD_PLASMARIFLE         7
-#define MOD_BFG_BOOM            8
-#define MOD_BFG_SPLASH          9
-#define MOD_CHAINSAW            10
-#define MOD_SSHOTGUN            11
-#define MOD_WATER               12
-#define MOD_SLIME               13
-#define MOD_LAVA                14
-#define MOD_CRUSH               15
-#define MOD_TELEFRAG            16
-#define MOD_FALLING             17
-#define MOD_SUICIDE             18
-#define MOD_BARREL              19
-#define MOD_EXIT                20
-#define MOD_SPLASH              21
-#define MOD_HIT                 22
-#define MOD_RAILGUN		23
-#define MOD_ICE			24
-#define MOD_DISINTEGRATE	25
-#define MOD_POISON		26
-#define MOD_ELECTRIC		27
-
-// Return values for PlayMovie ----------------------------------------------
-
-#define MOVIE_Played            0
-#define MOVIE_Played_NoVideo    1
-#define MOVIE_Played_Aborted    2
-#define MOVIE_Failed           -1
-
-
-// Player properties --------------------------------------------------------
-
-#define PROP_FROZEN                     0
-#define PROP_NOTARGET                   1
-#define PROP_INSTANTWEAPONSWITCH        2
-#define PROP_FLY			3
-#define PROP_TOTALLYFROZEN		4
-#define PROP_BUDDHA			16
-
-// The following properties correspond to powers given by certain items
-#define PROP_INVULNERABILITY		5
-#define PROP_STRENGTH			6
-#define PROP_INVISIBILITY		7
-#define PROP_RADIATIONSUIT		8
-#define PROP_ALLMAP			9
-#define PROP_INFRARED			10
-#define PROP_WEAPONLEVEL2		11
-#define PROP_FLIGHT			12
-#define PROP_SPEED			15
-
-// Player input -------------------------------------------------------------
-
-// These are the original inputs sent by the player.
-#define INPUT_OLDBUTTONS		0
-#define INPUT_BUTTONS			1
-#define INPUT_PITCH				2
-#define INPUT_YAW				3
-#define INPUT_ROLL				4
-#define INPUT_FORWARDMOVE		5
-#define INPUT_SIDEMOVE			6
-#define INPUT_UPMOVE			7
-
-// These are the inputs, as modified by P_PlayerThink().
-// Most of the time, these will match the original inputs, but
-// they can be different if a player is frozen or using a
-// chainsaw.
-#define MODINPUT_OLDBUTTONS		8
-#define MODINPUT_BUTTONS		9
-#define MODINPUT_PITCH			10
-#define MODINPUT_YAW			11
-#define MODINPUT_ROLL			12
-#define MODINPUT_FORWARDMOVE	13
-#define MODINPUT_SIDEMOVE		14
-#define MODINPUT_UPMOVE			15
-
-// Player buttons -----------------------------------------------------------
-
-#define BT_ATTACK				1
-#define BT_USE					2
-#define BT_JUMP					4
-#define BT_CROUCH				8
-#define BT_TURN180				16
-#define BT_ALTATTACK			32
-#define BT_RELOAD				64
-#define BT_ZOOM					128
-
-#define BT_SPEED				256
-#define BT_STRAFE				512
-
-#define BT_MOVERIGHT			1024
-#define BT_MOVELEFT				2048
-#define BT_BACK					4096
-#define BT_FORWARD				8192
-#define BT_RIGHT				16384
-#define BT_LEFT					32768
-#define BT_LOOKUP				65536
-#define BT_LOOKDOWN				131072
-#define BT_MOVEUP				262144
-#define BT_MOVEDOWN				524288
-#define BT_SHOWSCORES			1048576
-
-// Do whatever you want with these.
-#define BT_USER1				2097152
-#define BT_USER2				4194304
-#define BT_USER3				8388608
-#define BT_USER4				16777216
-
-// Text colors --------------------------------------------------------------
-
-#define CR_UNTRANSLATED         -1
-#define CR_BRICK                0
-#define CR_TAN                  1
-#define CR_GRAY                 2
-#define CR_GREY                 2
-#define CR_GREEN                3
-#define CR_BROWN                4
-#define CR_GOLD                 5
-#define CR_RED                  6
-#define CR_BLUE                 7
-#define CR_ORANGE               8
-#define CR_WHITE                9
-#define CR_YELLOW               10
-#define CR_BLACK				12
-#define CR_LIGHTBLUE			13
-#define CR_CREAM				14
-#define CR_OLIVE				15
-#define CR_DARKGREEN			16
-#define CR_DARKRED				17
-#define CR_DARKBROWN			18
-#define CR_PURPLE				19
-#define CR_DARKGRAY				20
-#define CR_DARKGREY				20
-#define CR_CYAN					21
-#define CR_ICE					22
-#define CR_FIRE					23
-#define CR_SAPPHIRE				24
-#define CR_TEAL					25
-
-// HUD message types --------------------------------------------------------
-
-#define HUDMSG_PLAIN		0
-#define HUDMSG_FADEOUT		1
-#define HUDMSG_TYPEON		2
-#define HUDMSG_FADEINOUT	3
-
-// OR this with one of the above to log the hudmessage to the console.
-// i.e. instead of HUDMSG_PLAIN, you can use HUDMSG_PLAIN | HUDMSG_LOG
-#define HUDMSG_LOG					0x80000000
-
-// OR this with one of the above if the color you passed is a string
-// instead of one of the CR_ constants.
-#define HUDMSG_COLORSTRING			0x40000000
-
-// OR this with one of the above to use additive blending when drawing the
-// HUD message.
-#define HUDMSG_ADDBLEND				0x20000000
-
-// OR this with one of the above to use the extra alpha parameter
-#define HUDMSG_ALPHA				0x10000000
-
-// Or this with one of the above to not wrap lines
-#define HUDMSG_NOWRAP				0x08000000
-
-// HUD message layers; these are not flags
-#define HUDMSG_LAYER_OVERHUD		0x00000000
-#define HUDMSG_LAYER_UNDERHUD		0x00001000
-#define HUDMSG_LAYER_OVERMAP		0x00002000
-
-// HUD message visibility flags
-#define HUDMSG_NOTWITH3DVIEW		0x00010000
-#define HUDMSG_NOTWITHFULLMAP		0x00020000
-#define HUDMSG_NOTWITHOVERLAYMAP	0x00040000
-
-
-// "Scripted" Marine weapon types -------------------------------------------
-
-#define MARINEWEAPON_Dummy		0
-#define MARINEWEAPON_Fist		1
-#define MARINEWEAPON_BerserkFist	2
-#define MARINEWEAPON_Chainsaw		3
-#define MARINEWEAPON_Pistol		4
-#define MARINEWEAPON_Shotgun		5
-#define MARINEWEAPON_SuperShotgun	6
-#define MARINEWEAPON_Chaingun		7
-#define MARINEWEAPON_RocketLauncher	8
-#define MARINEWEAPON_PlasmaRifle	9
-#define MARINEWEAPON_Railgun		10
-#define MARINEWEAPON_BFG		11
-
-// Actor properties you can get/set -----------------------------------------
-
-#define APROP_Health		0
-#define APROP_Speed			1
-#define APROP_Damage		2
-#define APROP_Alpha			3
-#define APROP_RenderStyle	4
-#define APROP_SeeSound		5	// Sounds can only be set, not gotten
-#define APROP_AttackSound	6
-#define APROP_PainSound		7
-#define APROP_DeathSound	8
-#define APROP_ActiveSound	9
-#define APROP_Ambush		10
-#define APROP_Invulnerable	11
-#define APROP_JumpZ			12
-#define APROP_ChaseGoal		13
-#define APROP_Frightened	14
-#define APROP_Gravity		15
-#define APROP_Friendly		16
-#define APROP_SpawnHealth	17
-#define APROP_Dropped		18
-#define APROP_Notarget		19
-#define APROP_Species		20
-#define APROP_Nametag		21
-#define APROP_Score			22
-#define APROP_Notrigger		23
-#define APROP_DamageFactor	24
-#define APROP_MasterTID 	25
-#define APROP_TargetTID 	26
-#define APROP_TracerTID 	27
-#define APROP_Waterlevel	28
-#define APROP_ScaleX        29
-#define APROP_ScaleY        30
-#define APROP_Dormant		31
-#define APROP_Mass			32
-#define APROP_Accuracy      33
-#define APROP_Stamina       34
-#define APROP_Height		35
-#define APROP_Radius		36
-#define APROP_Reactiontime	37
-#define APROP_MeleeRange	38
-#define APROP_ViewHeight	39
-#define APROP_AttackZOffset	40
-#define APROP_StencilColor	41
-#define APROP_Friction		42
-#define APROP_DamageMultiplier	43
-#define APROP_MaxStepHeight 44
-#define APROP_MaxDropOffHeight 45
-#define APROP_DamageType	46
-
-// New to Eternity
-#define APROP_Counter0      100
-#define APROP_Counter1      101
-#define APROP_Counter2      102
-#define APROP_Counter3      103
-#define APROP_Counter4      104
-#define APROP_Counter5      105
-#define APROP_Counter6      106
-#define APROP_Counter7      107
-
-// Render Styles ------------------------------------------------------------
-
-#define STYLE_None			0	// Do not draw
-#define STYLE_Normal		1	// Normal; just copy the image to the screen
-#define STYLE_Fuzzy			2	// Draw silhouette using "fuzz" effect
-#define STYLE_SoulTrans		3	// Draw translucent with amount in r_transsouls
-#define STYLE_OptFuzzy		4	// Draw as fuzzy, translucent or shadow, based on user preference
-#define STYLE_Stencil		5	// Draw as solid color
-#define STYLE_AddStencil	6	// Draw as additive solid color
-#define STYLE_AddShaded		7	// 
-#define STYLE_Translucent	64	// Draw translucent
-#define STYLE_Add			65	// Draw additive
-#define STYLE_Shaded		66	// 
-#define STYLE_TranslucentStencil 67
-#define STYLE_Shadow		68	// Draw dark translucent stencil
-#define STYLE_Subtract  69  // Draw subtractive
-
-// Properties you can use with GetLevelInfo() -------------------------------
-
-#define LEVELINFO_PAR_TIME		0
-#define LEVELINFO_CLUSTERNUM		1
-#define LEVELINFO_LEVELNUM		2
-#define LEVELINFO_TOTAL_SECRETS		3
-#define LEVELINFO_FOUND_SECRETS		4
-#define LEVELINFO_TOTAL_ITEMS		5
-#define LEVELINFO_FOUND_ITEMS		6
-#define LEVELINFO_TOTAL_MONSTERS	7
-#define LEVELINFO_KILLED_MONSTERS	8
-#define LEVELINFO_SUCK_TIME		9
-
-// Properties you can use with GetPlayerInfo() ------------------------------
-
-#define PLAYERINFO_TEAM			0
-#define PLAYERINFO_AIMDIST		1
-#define PLAYERINFO_COLOR		2
-#define PLAYERINFO_GENDER		3
-#define PLAYERINFO_NEVERSWITCH	4
-#define PLAYERINFO_MOVEBOB		5
-#define PLAYERINFO_STILLBOB		6
-#define PLAYERINFO_PLAYERCLASS	7
-#define PLAYERINFO_FOV			8
-#define PLAYERINFO_DESIREDFOV	9
-
-
-// Flags for ReplaceTextures ------------------------------------------------
-
-#define NOT_BOTTOM				1
-#define NOT_MIDDLE				2
-#define NOT_TOP					4
-#define NOT_FLOOR				8
-#define NOT_CEILING				16
-
-// Flags for SectorDamage ---------------------------------------------------
-
-#define DAMAGE_PLAYERS				1
-#define DAMAGE_NONPLAYERS			2
-#define DAMAGE_IN_AIR				4
-#define DAMAGE_SUBCLASSES_PROTECT	8
-#define DAMAGE_NO_ARMOR			16
-
-// Flags for MorphActor -----------------------------------------------------
-
-#define MRF_OLDEFFECTS			0x00000000
-#define MRF_ADDSTAMINA			0x00000001
-#define MRF_FULLHEALTH			0x00000002
-#define MRF_UNDOBYTOMEOFPOWER	0x00000004
-#define MRF_UNDOBYCHAOSDEVICE	0x00000008
-#define MRF_FAILNOTELEFRAG		0x00000010
-#define MRF_FAILNOLAUGH			0x00000020
-#define MRF_WHENINVULNERABLE	0x00000040
-#define MRF_LOSEACTUALWEAPON	0x00000080
-#define MRF_NEWTIDBEHAVIOUR		0x00000100
-#define MRF_UNDOBYDEATH			0x00000200
-#define MRF_UNDOBYDEATHFORCED	0x00000400
-#define MRF_UNDOBYDEATHSAVES	0x00000800
-#define MRF_UNDOALWAYS			0x00001000
-#define MRF_TRANSFERTRANSLATION 0x00002000
-
-// Shared spawnable things from Hexen. You can spawn these in the other -----
-// games if you provide sprites for them, otherwise they'll be invisible. ---
-
-#define T_ROCK1                 41
-#define T_ROCK2                 42
-#define T_ROCK3                 43
-#define T_DIRT1                 44
-#define T_DIRT2                 45
-#define T_DIRT3                 46
-#define T_DIRT4                 47
-#define T_DIRT5                 48
-#define T_DIRT6                 49
-#define T_STAINEDGLASS1         54
-#define T_STAINEDGLASS2         55
-#define T_STAINEDGLASS3         56
-#define T_STAINEDGLASS4         57
-#define T_STAINEDGLASS5         58
-#define T_STAINEDGLASS6         59
-#define T_STAINEDGLASS7         60
-#define T_STAINEDGLASS8         61
-#define T_STAINEDGLASS9         62
-#define T_STAINEDGLASS0         63
-
-// Doom Spawnable things (used for thingcount() and thing spawners) ---------
-
-#define T_NONE                  0
-#define T_SHOTGUY               1
-#define T_CHAINGUY              2
-#define T_BARON                 3
-#define T_ZOMBIE                4
-#define T_IMP                   5
-#define T_ARACHNOTRON           6
-#define T_SPIDERMASTERMIND      7
-#define T_DEMON                 8
-#define T_SPECTRE               9
-#define T_IMPFIREBALL           10
-#define T_CLIP                  11
-#define T_SHELLS                12
-#define T_CACODEMON             19
-#define T_REVENANT              20
-#define T_BRIDGE                21
-#define T_ARMORBONUS            22
-#define T_STIMPACK              23
-#define T_MEDKIT                24
-#define T_SOULSPHERE            25
-#define T_SHOTGUN               27
-#define T_CHAINGUN              28
-#define T_ROCKETLAUNCHER        29
-#define T_PLASMAGUN             30
-#define T_BFG                   31
-#define T_CHAINSAW              32
-#define T_SUPERSHOTGUN          33
-#define T_PLASMABOLT            51
-#define T_TRACER                53
-#define T_GREENARMOR            68
-#define T_BLUEARMOR             69
-#define T_CELL                  75
-#define T_BLUEKEYCARD           85
-#define T_REDKEYCARD            86
-#define T_YELLOWKEYCARD         87
-#define T_YELLOWSKULLKEY        88
-#define T_REDSKULLKEY           89
-#define T_BLUESKULLKEY          90
-#define T_TEMPLARGEFLAME        98
-#define T_STEALTHBARON          100
-#define T_STEALTHKNIGHT         101
-#define T_STEALTHZOMBIE         102
-#define T_STEALTHSHOTGUY        103
-
-#define T_LOSTSOUL              110
-#define T_VILE                  111
-#define T_MANCUBUS              112
-#define T_HELLKNIGHT            113
-#define T_CYBERDEMON            114
-#define T_PAINELEMENTAL         115
-#define T_WOLFSS                116
-#define T_STEALTHARACHNOTRON    117
-#define T_STEALTHVILE           118
-#define T_STEALTHCACODEMON      119
-#define T_STEALTHCHAINGUY       120
-#define T_STEALTHSERGEANT       121
-#define T_STEALTHIMP            122
-#define T_STEALTHMANCUBUS       123
-#define T_STEALTHREVENANT       124
-#define T_BARREL                125
-#define T_CACODEMONSHOT         126
-#define T_ROCKET                127
-#define T_BFGSHOT               128
-#define T_ARACHNOTRONPLASMA     129
-#define T_BLOOD                 130
-#define T_PUFF                  131
-#define T_MEGASPHERE            132
-#define T_INVULNERABILITY       133
-#define T_BERSERK               134
-#define T_INVISIBILITY          135
-#define T_IRONFEET              136
-#define T_COMPUTERMAP           137
-#define T_LIGHTAMP              138
-#define T_AMMOBOX               139
-#define T_ROCKETAMMO            140
-#define T_ROCKETBOX             141
-#define T_BATTERY               142
-#define T_SHELLBOX              143
-#define T_BACKPACK              144
-#define T_GUTS                  145
-#define T_BLOODPOOL             146
-#define T_BLOODPOOL1            147
-#define T_BLOODPOOL2            148
-#define T_FLAMINGBARREL         149
-#define T_BRAINS                150
-#define T_SCRIPTEDMARINE	151
-#define T_HEALTHBONUS           152
-#define T_MANCUBUSSHOT		153
-#define T_BARONBALL		154
-
-// Heretic Spawnable things (used for thingcount() and thing spawners) ------
-
-#define T_CLINK                 1
-#define T_MUMMYLEADER           2
-#define T_BEAST                 3
-#define T_MUMMY                 4
-//#define T_IMP                 5   // Defined above
-#define T_KNIGHT                6
-#define T_IMPLEADER             7
-#define T_MUMMYGHOST            8
-#define T_MUMMYLEADERGHOST      9
-//#define T_IMPFIREBALL         10
-#define T_WIMPYWANDAMMO         11
-#define T_HEFTYWANDAMMO         12
-#define T_ITEMEGG               14
-#define T_ITEMFLIGHT            15
-#define T_ITEMTELEPORT          18
-#define T_WIZARD                19
-#define T_IRONLICH              20
-#define T_ITEMHEALTHPOTION      23
-#define T_ITEMHEALTHFLASH       24	// incorrect name but keep it for compatibility
-#define T_ITEMHEALTHFLASK       24
-#define T_ITEMHEALTHFULL        25
-#define T_CROSSBOW              27
-#define T_BLASTER               28
-#define T_PHOENIXROD            29
-#define T_SKULLROD              30
-#define T_MACE                  31
-#define T_GAUNTLETS             32
-#define T_WIMPYCROSSBOWAMMO     33
-#define T_HEFTYCROSSBOWAMMO     34
-#define T_WIMPYMACEAMMO         35
-#define T_HEFTYMACEAMMO         36
-#define T_WIMPYBLASTERAMMO      37
-#define T_HEFTYBLASTERAMMO      38
-#define T_MORPHBLAST            40
-#define T_SHIELD1               68
-#define T_SHIELD2               69
-#define T_ITEMTIMEBOMB          72
-#define T_ITEMTORCH             73
-#define T_BLUEKEY               85
-#define T_GREENKEY              86
-#define T_YELLOWKEY             87
-
-#define T_SOUND_WIND            110
-#define T_SOUND_WATERFALL       111
-
-#define T_BEASTBALL             120
-#define T_FEATHER               121
-#define T_CHICKEN               122
-#define T_VOLCANOBALL           123
-#define T_TINYVOLCANOBALL       124
-#define T_POD                   125
-#define T_PODGENERATOR          126
-#define T_KNIGHTAXE             127
-#define T_KNIGHTBLOODAXE        128
-#define T_KNIGHTGHOST           129
-#define T_MUMMYHEAD             131
-#define T_SNAKE                 132
-#define T_ITEMINVULNERABILITY   133
-#define T_ITEMTOME              134
-#define T_ITEMINVISIBILITY      135
-#define T_ITEMBAGOFHOLDING      136
-#define T_ITEMALLMAP            137
-#define T_SNAKEPROJECTILE       138
-#define T_SNAKEPROJECTILEBIG    139
-#define T_WIZARDSHOT            140
-
-#define T_DSPARILTELEPORTDEST   141
-#define T_DSPARILONSERPENT      142
-#define T_DSPARILALONE          143
-#define T_SERPENTFIREBALL       144
-#define T_DSPARILBLUESHOT       145
-#define T_DSPARILWIZARDSPAWNER  146
-
-#define T_CROSSBOWMAINBLAST     147
-#define T_CROSSBOWMINIBLAST     148
-#define T_CROSSBOWPOWERBLAST    149
-#define T_VOLCANO               150
-#define T_POWERWANDMINIBLAST    151
-#define T_POWERWANDBIGGERBLAST  152
-#define T_DEATHBALL             153
-#define T_NOGRAVITYMACEBALL     154
-#define T_BOUNCYMACEBALL        155
-#define T_HEAVYMACEBALL         156
-#define T_RIPPER                157
-#define T_WIMPYSKULLRODAMMO     158
-#define T_HEFTYSKULLRODAMMO     159
-#define T_SKULLRODBLAST         160
-#define T_WIMPYPHOENIXRODAMMO   161
-#define T_HEFTYPHOENIXRODAMMO   162
-#define T_PHOENIXSHOT           163
-#define T_IRONLICHBLUESHOT      164
-#define T_WHIRLWIND             165
-#define T_REDTELEGLITTER        166
-#define T_BLUETELEGLITTER       167
-
-// Hexen Spawnable things (used for thingcount() and thing spawners) ------
-
-#define T_CENTAUR				1
-#define T_CENTAURLEADER			2
-#define T_DEMON1				3
-#define T_ETTIN					4
-#define T_FIREGARGOYLE			5
-#define T_WATERLURKER			6
-#define T_WATERLURKERLEADER		7
-#define T_WRAITH				8
-#define T_WRAITHBURIED			9
-#define T_FIREBALL1				10
-#define T_MANA1					11
-#define T_MANA2					12
-#define T_ITEMBOOTS				13
-#define T_ITEMPORK				14
-#define T_ITEMSUMMON			16
-#define T_ITEMTPORTOTHER		17
-#define T_BISHOP				19
-#define T_ICEGOLEM				20
-#define T_DRAGONSKINBRACERS		22
-#define T_ITEMBOOSTMANA			26
-#define T_FIGHTERAXE			27
-#define T_FIGHTERHAMMER			28
-#define T_FIGHTERSWORD1			29
-#define T_FIGHTERSWORD2			30
-#define T_FIGHTERSWORD3			31
-#define T_CLERICSTAFF			32
-#define T_CLERICHOLY1			33
-#define T_CLERICHOLY2			34
-#define T_CLERICHOLY3			35
-#define T_MAGESHARDS			36
-#define T_MAGESTAFF1			37
-#define T_MAGESTAFF2			38
-#define T_MAGESTAFF3			39
-#define T_ARROW					50
-#define T_DART					51
-#define T_POISONDART			52
-#define T_RIPPERBALL			53
-#define T_BLADE					64
-#define T_ICESHARD				65
-#define T_FLAME_SMALL			66
-#define T_FLAME_LARGE			67
-#define T_MESHARMOR				68
-#define T_FALCONSHIELD			69
-#define T_PLATINUMHELM			70
-#define T_AMULETOFWARDING		71
-#define T_ITEMFLECHETTE			72
-#define T_ITEMREPULSION			74
-#define T_MANA3					75
-#define T_PUZZSKULL				76
-#define T_PUZZGEMBIG			77
-#define T_PUZZGEMRED			78
-#define T_PUZZGEMGREEN1			79
-#define T_PUZZGEMGREEN2			80
-#define T_PUZZGEMBLUE1			81
-#define T_PUZZGEMBLUE2			82
-#define T_PUZZBOOK1				83
-#define T_PUZZBOOK2				84
-#define T_METALKEY				85
-#define T_SMALLMETALKEY			86
-#define T_AXEKEY				87
-#define T_FIREKEY				88
-#define T_EMERALDKEY			89
-#define T_MACEKEY				90
-#define T_SILVERKEY				91
-#define T_RUSTYKEY				92
-#define T_HORNKEY				93
-#define T_SERPENTKEY			94
-#define T_WATERDRIP				95
-#define T_TEMPSMALLFLAME		96
-#define T_PERMSMALLFLAME		97
-#define T_PERMLARGEFLAME		99
-#define T_DEMON_MASH			100
-#define T_DEMON2_MASH			101
-#define T_ETTIN_MASH			102
-#define T_CENTAUR_MASH			103
-#define T_THRUSTSPIKEUP			104
-#define T_THRUSTSPIKEDOWN		105
-#define T_FLESH_DRIP1			106
-#define T_FLESH_DRIP2			107
-#define T_SPARK_DRIP			108
-
-
-// Flags returned by ClassifyActor
-
-#define ACTOR_NONE				0
-#define ACTOR_WORLD				1
-#define ACTOR_PLAYER			2
-#define ACTOR_BOT				4
-#define ACTOR_VOODOODOLL		8
-#define ACTOR_MONSTER			16
-#define ACTOR_ALIVE				32
-#define ACTOR_DEAD				64
-#define ACTOR_MISSILE			128
-#define ACTOR_GENERIC			256
-
-
-// Physical volumes for SoundSequenceOnSector
-
-#define SECSEQ_FLOOR			1
-#define SECSEQ_CEILING			2
-#define SECSEQ_FULLHEIGHT		3
-#define SECSEQ_INTERIOR			4
-
-// Channels for PlaySound and StopSound
-
-#define CHAN_AUTO				0
-#define CHAN_WEAPON				1
-#define CHAN_VOICE				2
-#define CHAN_ITEM				3
-#define CHAN_BODY				4
-#define CHAN_5					5
-#define CHAN_6					6
-#define CHAN_7					7
-
-// Modifier flags for PlaySound
-
-#define CHAN_LISTENERZ			8
-#define CHAN_MAYBE_LOCAL		16
-#define CHAN_UI					32
-#define CHAN_NOPAUSE			64
-
-// Standard attenuation values for PlaySound
-
-#define ATTN_NONE				0		// full volume the entire level
-#define ATTN_NORM				1.0
-#define ATTN_IDLE				1.001
-#define ATTN_STATIC				3.0		// dimish very rapidly with distance
-
-// Identifiers for PlayActorSound
-
-#define SOUND_See				0
-#define SOUND_Attack			1
-#define SOUND_Pain				2
-#define SOUND_Death				3
-#define SOUND_Active			4
-#define SOUND_Use				5
-#define SOUND_Bounce			6
-#define SOUND_WallBounce		7
-#define SOUND_CrushPain			8
-#define SOUND_Howl				9
-
-// Flags for SpawnDecal
-
-#define SDF_ABSANGLE			1
-#define SDF_PERMANENT			2
-
-// Actor pointer selectors
-
-#DEFINE	AAPTR_DEFAULT 0
-#DEFINE	AAPTR_NULL 0x1
-#DEFINE	AAPTR_TARGET 0x2
-#DEFINE	AAPTR_MASTER 0x4
-#DEFINE	AAPTR_TRACER 0x8
-
-#DEFINE	AAPTR_PLAYER_GETTARGET 0x10
-#DEFINE	AAPTR_PLAYER_GETCONVERSATION 0x20
-
-#DEFINE	AAPTR_PLAYER1 0x40
-#DEFINE	AAPTR_PLAYER2 0x80
-#DEFINE	AAPTR_PLAYER3 0x100
-#DEFINE	AAPTR_PLAYER4 0x200
-#DEFINE	AAPTR_PLAYER5 0x400
-#DEFINE	AAPTR_PLAYER6 0x800
-#DEFINE	AAPTR_PLAYER7 0x1000
-#DEFINE	AAPTR_PLAYER8 0x2000
-
-#DEFINE AAPTR_FRIENDPLAYER 0x4000
-#DEFINE AAPTR_GET_LINETARGET 0x8000
-
-// Actor pointer operation flags
-
-#DEFINE PTROP_UNSAFETARGET 1
-#DEFINE PTROP_UNSAFEMASTER 2
-#DEFINE PTROP_NOSAFEGUARDS PTROP_UNSAFETARGET |PTROP_UNSAFEMASTER 
-
-// Line activation flags
-
-#define SPAC_Cross			1		// when player crosses line
-#define SPAC_Use			2		// when player uses line
-#define SPAC_MCross			4		// when monster crosses line
-#define SPAC_Impact			8		// when projectile hits line
-#define SPAC_Push			16		// when player pushes line
-#define SPAC_PCross			32		// when projectile crosses line
-#define SPAC_UseThrough		64		// when player uses line (doesn't block)
-#define SPAC_AnyCross		128		// when anything without the TELEPORT flag crosses the line
-#define SPAC_MUse			256		// monsters can use
-#define SPAC_MPush			512		// monsters can push
-#define SPAC_UseBack		1024	// can be used from the back side
-
-#define SPAC_None			0
-
-// GetArmorInfo
-
-#define ARMORINFO_CLASSNAME		0
-#define ARMORINFO_SAVEAMOUNT		1
-#define ARMORINFO_SAVEPERCENT		2
-#define ARMORINFO_MAXABSORB		3
-#define ARMORINFO_MAXFULLABSORB		4
-#define ARMORINFO_ACTUALSAVEAMOUNT	5
-
-// ==========================================================================
-// Skulltag Definitions
-// ==========================================================================
-
-// Skulltag Teams -----------------------------------------------------------
-#define TEAM_BLUE				0
-#define TEAM_RED				1
-#define NO_TEAM					2
-
-// Team properties ----------------------------------------------------------
-#define TPROP_Name				0
-#define TPROP_Score				1
-#define TPROP_IsValid			2
-#define TPROP_NumPlayers		3
-#define TPROP_NumLivePlayers	4
-#define TPROP_TextColor			5
-#define TPROP_PlayerStartNum	6
-#define TPROP_Spread			7
-#define TPROP_Carrier			8
-#define TPROP_Assister			9
-#define TPROP_FragCount			10
-#define TPROP_DeathCount		11
-#define TPROP_WinCount			12
-#define TPROP_PointCount		13
-#define TPROP_ReturnTics		14
-#define TPROP_TeamItem			15
-#define TPROP_WinnerTheme		16
-#define TPROP_LoserTheme		17
-
-// Skulltag Invasion --------------------------------------------------------
-#define IS_WAITINGFORPLAYERS	0
-#define IS_FIRSTCOUNTDOWN		1
-#define IS_INPROGRESS			2
-#define IS_BOSSFIGHT			3
-#define IS_WAVECOMPLETE			4
-#define IS_COUNTDOWN			5
-
-
-#define T_GRENADE				216
-#define T_BFG10KSHOT			217
-#define T_DARKIMPFIREBALL		218
-#define T_CACOLANTERNSHOT		219
-#define T_ABADDONSHOT			221
-
-// Skulltag Monsters --------------------------------------------------------
-#define T_DARKIMP				155
-#define T_BLOODDEMON			156
-#define T_SSGGUY				157
-#define T_HECTEBUS				158
-#define T_CACOLANTERN			159
-#define T_BELPHEGOR				215
-#define T_ABADDON				220
-
-// Skulltag Weapons ---------------------------------------------------------
-#define T_PISTOL				162
-#define T_GRENADELAUNCHER		163
-#define T_RAILGUN				164
-#define T_BFG10000				165
-#define T_MINIGUN				214
-
-// Skulltag Armor/Health Items ----------------------------------------------
-#define T_MAXHEALTHBONUS		166
-#define T_MAXARMORBONUS			167
-#define T_REDARMOR				168
-
-// Skulltag Powerups --------------------------------------------------------
-#define T_TURBOSPHERE			169
-#define T_ANTIGRAVBELT			170
-#define T_TIMEFREEZER			171
-#define T_INFRAGOGGLES			172
-#define T_INFRATRACKER			173
-#define T_TRANSLUCENCY			174
-#define T_DOOMSPHERE			175
-#define T_RANDOMPOWERUP			176
-
-// Skulltag Flags -----------------------------------------------------------
-#define T_BLUEFLAG				177
-#define T_REDFLAG				178
-#define T_WHITEFLAG				179
-
-// Skulltag Runes -----------------------------------------------------------
-#define T_STRENGTH				180
-#define T_RAGE					181
-#define T_DRAIN					182
-#define T_SPREAD				183
-#define T_RESISTANCE			184
-#define T_REGENERATION			185
-#define T_PROSPERITY			186
-#define T_REFLECTION			187
-#define T_HIGHJUMP				188
-#define T_HASTE					189
-
-// Zandronum database additions ---------------------------------------------
-#define DB_ORDER_ASC			0
-#define DB_ORDER_DESC			1
-
-// Events when you have input grabbed
-
-#define EV_KeyDown				1	// data1: unshifted ASCII, data2: shifted ASCII
-#define EV_KeyRepeat			2	// data1: unshifted ASCII, data2: shifted ASCII
-#define EV_KeyUp				3	// data1: unshifted ASCII, data2: shifted ASCII
-#define EV_Char					4	// data1: translated character for text input
-#define EV_MouseMove			5	// data1: x, data2: y
-#define EV_LButtonDown			6
-#define EV_LButtonUp			7
-#define EV_LButtonDblClick		8
-#define EV_MButtonDown			9
-#define EV_MButtonUp			10
-#define EV_MButtonDblClick		11
-#define EV_RButtonDown			12
-#define EV_RButtonUp			13
-#define EV_RButtonDblClick		14
-#define EV_WheelDown			15
-#define EV_WheelUp				16
-
-// Key modifiers (or'd with event type)
-
-#define GKM_SHIFT				256
-#define GKM_CTRL				512
-#define GKM_ALT					1024
-
-// Button modifiers are only valid for EV_MouseMove events
-
-#define GKM_LBUTTON				2048
-#define GKM_MBUTTON				4096
-#define GKM_RBUTTON				8192
-
-// Special codes for some GUI keys, including a few real ASCII codes.
-
-#define GK_PGDN			1
-#define GK_PGUP			2
-#define GK_HOME			3
-#define GK_END			4
-#define GK_LEFT			5
-#define GK_RIGHT		6
-#define GK_ALERT		7		// ASCII bell
-#define GK_BACKSPACE	8		// ASCII
-#define GK_TAB			9		// ASCII
-#define GK_LINEFEED		10		// ASCII
-#define GK_DOWN			10
-#define GK_VTAB			11		// ASCII
-#define GK_UP			11
-#define GK_FORMFEED		12		// ASCII
-#define GK_RETURN		13		// ASCII
-#define GK_F1			14
-#define GK_F2			15
-#define GK_F3			16
-#define GK_F4			17
-#define GK_F5			18
-#define GK_F6			19
-#define GK_F7			20
-#define GK_F8			21
-#define GK_F9			22
-#define GK_F10			23
-#define GK_F11			24
-#define GK_F12			25
-#define GK_DEL			26
-#define GK_ESCAPE		27		// ASCII
-#define GK_FREE1		28
-#define GK_FREE2		29
-#define GK_FREE3		30
-#define GK_CESCAPE		31		// color escape
-
-#define CHANGELEVEL_KEEPFACING 1
-#define CHANGELEVEL_RESETINVENTORY 2
-#define CHANGELEVEL_NOMONSTERS 4
-#define CHANGELEVEL_CHANGESKILL 8
-#define CHANGELEVEL_NOINTERMISSION 16
-#define CHANGELEVEL_RESETHEALTH	32
-#define CHANGELEVEL_PRERAISEWEAPON 64
-
-#define NO_CHANGE 32767.0
-
-#define SECF_SILENT 1
-#define SECF_NOFALLINGDAMAGE 2
-#define SECF_FLOORDROP 4
-#define SECF_NORESPAWN 8
-#define SECF_FRICTION 16
-#define SECF_PUSH 32
-#define SECF_SILENTMOVE 64
-#define SECF_DMGTERRAINFX	128
-#define SECF_DMGENDGODMODE 256
-#define SECF_DMGENDLEVEL 512
-#define SECF_DMGHAZARD 1024
-
-#define BLOCKF_CREATURES 1
-#define BLOCKF_MONSTERS 2
-#define BLOCKF_PLAYERS 4
-#define BLOCKF_FLOATERS 8
-#define BLOCKF_PROJECTILES 16
-#define BLOCKF_EVERYTHING 32
-#define BLOCKF_RAILING 64
-#define BLOCKF_USE 128
-#define BLOCKF_SIGHT 256
-#define BLOCKF_HITSCAN 512
-#define BLOCKF_SOUND 1024
-
-#define FOGP_DENSITY 0
-#define FOGP_OUTSIDEDENSITY 1
-#define FOGP_SKYFOG 2
-
-#define PRINTNAME_LEVELNAME -1
-#define PRINTNAME_LEVEL -2
-#define PRINTNAME_SKILL -3
-#define PRINTNAME_NEXTLEVEL -4
-#define PRINTNAME_NEXTSECRET -5
-
-#define CSF_NOFAKEFLOORS 1
-#define CSF_NOBLOCKALL 2
-
-#define FHF_NORANDOMPUFFZ	1
-#define FHF_NOIMPACTDECAL	2
-
-// PickActor flags
-
-#define	PICKAF_FORCETID			1
-#define	PICKAF_RETURNTID		2
-
-// magic value to set the ice translation through ACS
-#define TRANSLATION_ICE 0x100007
-
-// Actor flags
-#define MF_SPECIAL          0x00000001
-#define MF_SOLID            0x00000002
-#define MF_SHOOTABLE        0x00000004
-#define MF_NOSECTOR         0x00000008
-#define MF_NOBLOCKMAP       0x00000010
-#define MF_AMBUSH           0x00000020
-#define MF_JUSTHIT          0x00000040
-#define MF_JUSTATTACKED     0x00000080
-#define MF_SPAWNCEILING     0x00000100
-#define MF_NOGRAVITY        0x00000200
-#define MF_DROPOFF          0x00000400
-#define MF_PICKUP           0x00000800
-#define MF_NOCLIP           0x00001000
-#define MF_INCHASE          0x00002000
-#define MF_FLOAT            0x00004000
-#define MF_TELEPORT         0x00008000
-#define MF_MISSILE          0x00010000
-#define MF_DROPPED          0x00020000
-#define MF_SHADOW           0x00040000
-#define MF_NOBLOOD          0x00080000
-#define MF_CORPSE           0x00100000
-#define MF_INFLOAT          0x00200000
-#define MF_INBOUNCE         0x00200000
-#define MF_COUNTKILL        0x00400000
-#define MF_COUNTITEM        0x00800000
-#define MF_SKULLFLY         0x01000000
-#define MF_NOTDMATCH        0x02000000
-#define MF_SPAWNSOUNDSOURCE 0x04000000
-#define MF_FRIENDLY         0x08000000
-#define MF_UNMORPHED        0x10000000
-#define MF_NOLIFTDROP       0x20000000
-#define MF_STEALTH          0x40000000
-#define MF_ICECORPSE        0x80000000
-
-// Linedef flags
-#define ML_BLOCKING            0x00000001
-#define ML_BLOCKMONSTERS       0x00000002
-#define ML_TWOSIDED            0x00000004
-#define ML_DONTPEGTOP          0x00000008
-#define ML_DONTPEGBOTTOM       0x00000010
-#define ML_SECRET              0x00000020
-#define ML_SOUNDBLOCK          0x00000040
-#define ML_DONTDRAW            0x00000080
-#define ML_MAPPED              0x00000100
-#define ML_REPEAT_SPECIAL      0x00000200
-#define ML_ADDTRANS            0x00000400
-#define ML_MONSTERSCANACTIVATE 0x00002000
-#define ML_BLOCK_PLAYERS       0x00004000
-#define ML_BLOCKEVERYTHING     0x00008000
-#define ML_ZONEBOUNDARY        0x00010000
-#define ML_RAILING             0x00020000
-#define ML_BLOCK_FLOATERS      0x00040000
-#define ML_CLIP_MIDTEX         0x00080000
-#define ML_WRAP_MIDTEX         0x00100000
-#define ML_3DMIDTEX            0x00200000
-#define ML_CHECKSWITCHRANGE    0x00400000
-#define ML_FIRSTSIDEONLY       0x00800000
-#define ML_BLOCKPROJECTILE     0x01000000
-#define ML_BLOCKUSE            0x02000000
-#define ML_BLOCKSIGHT          0x04000000
-#define ML_BLOCKHITSCAN        0x08000000
-
-#define QF_RELATIVE		1
-#define QF_SCALEDOWN		1 << 1
-#define QF_SCALEUP		1 << 2
-#define QF_MAX			1 << 3
-#define QF_FULLINTENSITY	1 << 4
-#define QF_WAVE			1 << 5
-
-#define WARPF_ABSOLUTEOFFSET 0x1
-#define WARPF_ABSOLUTEANGLE 0x2
-#define WARPF_USECALLERANGLE 0x4
-#define WARPF_NOCHECKPOSITION 0x8
-#define WARPF_INTERPOLATE 0x10
-#define WARPF_WARPINTERPOLATION 0x20
-#define WARPF_COPYINTERPOLATION 0x40
-#define WARPF_STOP 0x80
-#define WARPF_TOFLOOR 0x100
-#define WARPF_TESTONLY 0x200
-#define WARPF_ABSOLUTEPOSITION 0x400
-#define WARPF_BOB 0x800
-#define WARPF_MOVEPTR 0x1000
-#define WARPF_USEPTR 0x2000
-#define WARPF_COPYVELOCITY 0x4000
-#define WARPF_COPYPITCH 0x8000
-
-#define CPXF_ANCESTOR    (1 << 0)
-#define CPXF_LESSOREQUAL (1 << 1)
-#define CPXF_NOZ         (1 << 2)
-#define CPXF_COUNTDEAD   (1 << 3)
-#define CPXF_DEADONLY    (1 << 4)
-#define CPXF_EXACT       (1 << 5)
-#define CPXF_SETTARGET   (1 << 6)
-#define CPXF_SETMASTER   (1 << 7)
-#define CPXF_SETTRACER   (1 << 8)
-#define CPXF_FARTHEST    (1 << 9)
-#define CPXF_CLOSEST     (1 << 10)
-#define CPXF_SETONPTR    (1 << 11)
-#define CPXF_CHECKSIGHT  (1 << 12)
-
-#define SECPART_Floor 0
-#define SECPART_Ceiling 1
-#define SECPART_3D 2
-
-// For Line_SetAutomapFlags; These are or'd together
-#define AMLF_Secret		(1 << 0)
-#define AMLF_DontDraw		(1 << 1)
-#define AMLF_Mapped		(1 << 2)
-#define AMLF_Revealed		(1 << 3)
-
-// For Line_SetAutomapStyle
-#define AMLS_Default		0
-#define AMLS_OneSided		1
-#define AMLS_TwoSided		2
-#define AMLS_FloorDiff		3
-#define AMLS_CeilingDiff	4
-#define AMLS_ExtraFloor		5
-#define AMLS_Special		6
-#define AMLS_Secret		7
-#define AMLS_NotSeen		8
-#define AMLS_Locked		9
-#define AMLS_IntraTeleport	10
-#define AMLS_InterTeleport	11
-#define AMLS_UnexploredSecret	12
-#define AMLS_Portal		13
+//**************************************************************************
+//**
+//** zdefs.acs
+//**
+//** Common definitions for use when compiling ACS scripts for ZDoom
+//**
+//**************************************************************************
+
+#define TRUE                    1
+#define FALSE                   0
+#define ON                      1
+#define OFF                     0
+#define YES                     1
+#define NO                      0
+
+#define LINE_FRONT              0
+#define LINE_BACK               1
+
+#define SIDE_FRONT              0
+#define SIDE_BACK               1
+
+#define TEXTURE_TOP             0
+#define TEXTURE_MIDDLE          1
+#define TEXTURE_BOTTOM          2
+
+// same information as combinable bit flags
+#define TEXFLAG_TOP				1
+#define TEXFLAG_MIDDLE			2
+#define TEXFLAG_BOTTOM			4
+#define TEXFLAG_ADDOFFSET		8
+
+#define GAME_SINGLE_PLAYER      0
+#define GAME_NET_COOPERATIVE    1
+#define GAME_NET_DEATHMATCH     2
+#define GAME_TITLE_MAP		3
+
+// Classes are only useful with Hexen
+#define CLASS_FIGHTER           0
+#define CLASS_CLERIC            1
+#define CLASS_MAGE              2
+
+#define SKILL_VERY_EASY         0
+#define SKILL_EASY              1
+#define SKILL_NORMAL            2
+#define SKILL_HARD              3
+#define SKILL_VERY_HARD         4
+
+#define BLOCK_NOTHING           0
+#define BLOCK_CREATURES         1
+#define BLOCK_EVERYTHING        2
+#define BLOCK_RAILING			3
+#define BLOCK_PLAYERS			4
+
+#define SCROLL                  0
+#define CARRY                   1
+#define SCROLL_AND_CARRY        2
+
+// Means-of-death for Sector_SetDamage --------------------------------------
+
+#define MOD_UNKNOWN             0
+#define MOD_ROCKET              5
+#define MOD_R_SPLASH            6
+#define MOD_PLASMARIFLE         7
+#define MOD_BFG_BOOM            8
+#define MOD_BFG_SPLASH          9
+#define MOD_CHAINSAW            10
+#define MOD_SSHOTGUN            11
+#define MOD_WATER               12
+#define MOD_SLIME               13
+#define MOD_LAVA                14
+#define MOD_CRUSH               15
+#define MOD_TELEFRAG            16
+#define MOD_FALLING             17
+#define MOD_SUICIDE             18
+#define MOD_BARREL              19
+#define MOD_EXIT                20
+#define MOD_SPLASH              21
+#define MOD_HIT                 22
+#define MOD_RAILGUN		23
+#define MOD_ICE			24
+#define MOD_DISINTEGRATE	25
+#define MOD_POISON		26
+#define MOD_ELECTRIC		27
+
+// Return values for PlayMovie ----------------------------------------------
+
+#define MOVIE_Played            0
+#define MOVIE_Played_NoVideo    1
+#define MOVIE_Played_Aborted    2
+#define MOVIE_Failed           -1
+
+
+// Player properties --------------------------------------------------------
+
+#define PROP_FROZEN					0
+#define PROP_NOTARGET				1
+#define PROP_INSTANTWEAPONSWITCH	2
+#define PROP_FLY					3
+#define PROP_TOTALLYFROZEN			4
+#define PROP_BUDDHA					16
+#define PROP_BUDDHA2				17
+#define PROP_FRIGHTENING 			18
+#define PROP_NOCLIP 				19
+#define PROP_NOCLIP2 				20
+#define PROP_GODMODE 				21
+#define PROP_GODMODE2 				22
+
+// The following properties correspond to powers given by certain items
+#define PROP_INVULNERABILITY		5
+#define PROP_STRENGTH				6
+#define PROP_INVISIBILITY			7
+#define PROP_RADIATIONSUIT			8
+#define PROP_ALLMAP					9
+#define PROP_INFRARED				10
+#define PROP_WEAPONLEVEL2			11
+#define PROP_FLIGHT					12
+#define PROP_SPEED					15
+
+// Player input -------------------------------------------------------------
+
+// These are the original inputs sent by the player.
+#define INPUT_OLDBUTTONS		0
+#define INPUT_BUTTONS			1
+#define INPUT_PITCH				2
+#define INPUT_YAW				3
+#define INPUT_ROLL				4
+#define INPUT_FORWARDMOVE		5
+#define INPUT_SIDEMOVE			6
+#define INPUT_UPMOVE			7
+
+// These are the inputs, as modified by P_PlayerThink().
+// Most of the time, these will match the original inputs, but
+// they can be different if a player is frozen or using a
+// chainsaw.
+#define MODINPUT_OLDBUTTONS		8
+#define MODINPUT_BUTTONS		9
+#define MODINPUT_PITCH			10
+#define MODINPUT_YAW			11
+#define MODINPUT_ROLL			12
+#define MODINPUT_FORWARDMOVE	13
+#define MODINPUT_SIDEMOVE		14
+#define MODINPUT_UPMOVE			15
+
+// Player buttons -----------------------------------------------------------
+
+#define BT_ATTACK				1
+#define BT_USE					2
+#define BT_JUMP					4
+#define BT_CROUCH				8
+#define BT_TURN180				16
+#define BT_ALTATTACK			32
+#define BT_RELOAD				64
+#define BT_ZOOM					128
+
+#define BT_SPEED				256
+#define BT_STRAFE				512
+
+#define BT_MOVERIGHT			1024
+#define BT_MOVELEFT				2048
+#define BT_BACK					4096
+#define BT_FORWARD				8192
+#define BT_RIGHT				16384
+#define BT_LEFT					32768
+#define BT_LOOKUP				65536
+#define BT_LOOKDOWN				131072
+#define BT_MOVEUP				262144
+#define BT_MOVEDOWN				524288
+#define BT_SHOWSCORES			1048576
+#define BT_RUN					33554432
+
+// Do whatever you want with these.
+#define BT_USER1				2097152
+#define BT_USER2				4194304
+#define BT_USER3				8388608
+#define BT_USER4				16777216
+
+// Text colors --------------------------------------------------------------
+
+#define CR_UNTRANSLATED         -1
+#define CR_BRICK                0
+#define CR_TAN                  1
+#define CR_GRAY                 2
+#define CR_GREY                 2
+#define CR_GREEN                3
+#define CR_BROWN                4
+#define CR_GOLD                 5
+#define CR_RED                  6
+#define CR_BLUE                 7
+#define CR_ORANGE               8
+#define CR_WHITE                9
+#define CR_YELLOW               10
+#define CR_BLACK				12
+#define CR_LIGHTBLUE			13
+#define CR_CREAM				14
+#define CR_OLIVE				15
+#define CR_DARKGREEN			16
+#define CR_DARKRED				17
+#define CR_DARKBROWN			18
+#define CR_PURPLE				19
+#define CR_DARKGRAY				20
+#define CR_DARKGREY				20
+#define CR_CYAN					21
+#define CR_ICE					22
+#define CR_FIRE					23
+#define CR_SAPPHIRE				24
+#define CR_TEAL					25
+
+// HUD message types --------------------------------------------------------
+
+#define HUDMSG_PLAIN		0
+#define HUDMSG_FADEOUT		1
+#define HUDMSG_TYPEON		2
+#define HUDMSG_FADEINOUT	3
+
+// OR this with one of the above to log the hudmessage to the console.
+// i.e. instead of HUDMSG_PLAIN, you can use HUDMSG_PLAIN | HUDMSG_LOG
+#define HUDMSG_LOG					0x80000000
+
+// OR this with one of the above if the color you passed is a string
+// instead of one of the CR_ constants.
+#define HUDMSG_COLORSTRING			0x40000000
+
+// OR this with one of the above to use additive blending when drawing the
+// HUD message.
+#define HUDMSG_ADDBLEND				0x20000000
+
+// OR this with one of the above to use the extra alpha parameter
+#define HUDMSG_ALPHA				0x10000000
+
+// Or this with one of the above to not wrap lines
+#define HUDMSG_NOWRAP				0x08000000
+
+// HUD message layers; these are not flags
+#define HUDMSG_LAYER_OVERHUD		0x00000000
+#define HUDMSG_LAYER_UNDERHUD		0x00001000
+#define HUDMSG_LAYER_OVERMAP		0x00002000
+
+// HUD message visibility flags
+#define HUDMSG_NOTWITH3DVIEW		0x00010000
+#define HUDMSG_NOTWITHFULLMAP		0x00020000
+#define HUDMSG_NOTWITHOVERLAYMAP	0x00040000
+
+
+// "Scripted" Marine weapon types -------------------------------------------
+
+#define MARINEWEAPON_Dummy		0
+#define MARINEWEAPON_Fist		1
+#define MARINEWEAPON_BerserkFist	2
+#define MARINEWEAPON_Chainsaw		3
+#define MARINEWEAPON_Pistol		4
+#define MARINEWEAPON_Shotgun		5
+#define MARINEWEAPON_SuperShotgun	6
+#define MARINEWEAPON_Chaingun		7
+#define MARINEWEAPON_RocketLauncher	8
+#define MARINEWEAPON_PlasmaRifle	9
+#define MARINEWEAPON_Railgun		10
+#define MARINEWEAPON_BFG		11
+
+// Actor properties you can get/set -----------------------------------------
+
+#define APROP_Health		0
+#define APROP_Speed			1
+#define APROP_Damage		2
+#define APROP_Alpha			3
+#define APROP_RenderStyle	4
+#define APROP_SeeSound		5	// Sounds can only be set, not gotten
+#define APROP_AttackSound	6
+#define APROP_PainSound		7
+#define APROP_DeathSound	8
+#define APROP_ActiveSound	9
+#define APROP_Ambush		10
+#define APROP_Invulnerable	11
+#define APROP_JumpZ			12
+#define APROP_ChaseGoal		13
+#define APROP_Frightened	14
+#define APROP_Gravity		15
+#define APROP_Friendly		16
+#define APROP_SpawnHealth	17
+#define APROP_Dropped		18
+#define APROP_Notarget		19
+#define APROP_Species		20
+#define APROP_Nametag		21
+#define APROP_Score			22
+#define APROP_Notrigger		23
+#define APROP_DamageFactor	24
+#define APROP_MasterTID 	25
+#define APROP_TargetTID 	26
+#define APROP_TracerTID 	27
+#define APROP_Waterlevel	28
+#define APROP_ScaleX        29
+#define APROP_ScaleY        30
+#define APROP_Dormant		31
+#define APROP_Mass			32
+#define APROP_Accuracy      33
+#define APROP_Stamina       34
+#define APROP_Height		35
+#define APROP_Radius		36
+#define APROP_Reactiontime	37
+#define APROP_MeleeRange	38
+#define APROP_ViewHeight	39
+#define APROP_AttackZOffset	40
+#define APROP_StencilColor	41
+#define APROP_Friction		42
+#define APROP_DamageMultiplier	43
+#define APROP_MaxStepHeight 44
+#define APROP_MaxDropOffHeight 45
+#define APROP_DamageType	46
+#define APROP_SoundClass	47
+#define APROP_FriendlySeeBlocks 48
+#define APROP_WaterDepth 49
+
+// New to Eternity
+#define APROP_Counter0      100
+#define APROP_Counter1      101
+#define APROP_Counter2      102
+#define APROP_Counter3      103
+#define APROP_Counter4      104
+#define APROP_Counter5      105
+#define APROP_Counter6      106
+#define APROP_Counter7      107
+
+// Render Styles ------------------------------------------------------------
+
+#define STYLE_None			0	// Do not draw
+#define STYLE_Normal		1	// Normal; just copy the image to the screen
+#define STYLE_Fuzzy			2	// Draw silhouette using "fuzz" effect
+#define STYLE_SoulTrans		3	// Draw translucent with amount in r_transsouls
+#define STYLE_OptFuzzy		4	// Draw as fuzzy, translucent or shadow, based on user preference
+#define STYLE_Stencil		5	// Draw as solid color
+#define STYLE_AddStencil	6	// Draw as additive solid color
+#define STYLE_AddShaded		7	// 
+#define STYLE_Translucent	64	// Draw translucent
+#define STYLE_Add			65	// Draw additive
+#define STYLE_Shaded		66	// 
+#define STYLE_TranslucentStencil 67
+#define STYLE_Shadow		68	// Draw dark translucent stencil
+#define STYLE_Subtract  69  // Draw subtractive
+
+// Properties you can use with GetLevelInfo() -------------------------------
+
+#define LEVELINFO_PAR_TIME		0
+#define LEVELINFO_CLUSTERNUM		1
+#define LEVELINFO_LEVELNUM		2
+#define LEVELINFO_TOTAL_SECRETS		3
+#define LEVELINFO_FOUND_SECRETS		4
+#define LEVELINFO_TOTAL_ITEMS		5
+#define LEVELINFO_FOUND_ITEMS		6
+#define LEVELINFO_TOTAL_MONSTERS	7
+#define LEVELINFO_KILLED_MONSTERS	8
+#define LEVELINFO_SUCK_TIME		9
+
+// Properties you can use with GetPlayerInfo() ------------------------------
+
+#define PLAYERINFO_TEAM			0
+#define PLAYERINFO_AIMDIST		1
+#define PLAYERINFO_COLOR		2
+#define PLAYERINFO_GENDER		3
+#define PLAYERINFO_NEVERSWITCH	4
+#define PLAYERINFO_MOVEBOB		5
+#define PLAYERINFO_STILLBOB		6
+#define PLAYERINFO_PLAYERCLASS	7
+#define PLAYERINFO_FOV			8
+#define PLAYERINFO_DESIREDFOV	9
+#define PLAYERINFO_FVIEWBOB		10
+
+
+// Flags for ReplaceTextures ------------------------------------------------
+
+#define NOT_BOTTOM				1
+#define NOT_MIDDLE				2
+#define NOT_TOP					4
+#define NOT_FLOOR				8
+#define NOT_CEILING				16
+
+// Flags for SectorDamage ---------------------------------------------------
+
+#define DAMAGE_PLAYERS				1
+#define DAMAGE_NONPLAYERS			2
+#define DAMAGE_IN_AIR				4
+#define DAMAGE_SUBCLASSES_PROTECT	8
+#define DAMAGE_NO_ARMOR			16
+
+// Flags for MorphActor -----------------------------------------------------
+
+#define MRF_OLDEFFECTS			0x00000000
+#define MRF_ADDSTAMINA			0x00000001
+#define MRF_FULLHEALTH			0x00000002
+#define MRF_UNDOBYTOMEOFPOWER	0x00000004
+#define MRF_UNDOBYCHAOSDEVICE	0x00000008
+#define MRF_FAILNOTELEFRAG		0x00000010
+#define MRF_FAILNOLAUGH			0x00000020
+#define MRF_WHENINVULNERABLE	0x00000040
+#define MRF_LOSEACTUALWEAPON	0x00000080
+#define MRF_NEWTIDBEHAVIOUR		0x00000100
+#define MRF_UNDOBYDEATH			0x00000200
+#define MRF_UNDOBYDEATHFORCED	0x00000400
+#define MRF_UNDOBYDEATHSAVES	0x00000800
+#define MRF_UNDOALWAYS			0x00001000
+#define MRF_TRANSFERTRANSLATION 0x00002000
+
+// Shared spawnable things from Hexen. You can spawn these in the other -----
+// games if you provide sprites for them, otherwise they'll be invisible. ---
+
+#define T_ROCK1                 41
+#define T_ROCK2                 42
+#define T_ROCK3                 43
+#define T_DIRT1                 44
+#define T_DIRT2                 45
+#define T_DIRT3                 46
+#define T_DIRT4                 47
+#define T_DIRT5                 48
+#define T_DIRT6                 49
+#define T_STAINEDGLASS1         54
+#define T_STAINEDGLASS2         55
+#define T_STAINEDGLASS3         56
+#define T_STAINEDGLASS4         57
+#define T_STAINEDGLASS5         58
+#define T_STAINEDGLASS6         59
+#define T_STAINEDGLASS7         60
+#define T_STAINEDGLASS8         61
+#define T_STAINEDGLASS9         62
+#define T_STAINEDGLASS0         63
+
+// Doom Spawnable things (used for thingcount() and thing spawners) ---------
+
+#define T_NONE                  0
+#define T_SHOTGUY               1
+#define T_CHAINGUY              2
+#define T_BARON                 3
+#define T_ZOMBIE                4
+#define T_IMP                   5
+#define T_ARACHNOTRON           6
+#define T_SPIDERMASTERMIND      7
+#define T_DEMON                 8
+#define T_SPECTRE               9
+#define T_IMPFIREBALL           10
+#define T_CLIP                  11
+#define T_SHELLS                12
+#define T_CACODEMON             19
+#define T_REVENANT              20
+#define T_BRIDGE                21
+#define T_ARMORBONUS            22
+#define T_STIMPACK              23
+#define T_MEDKIT                24
+#define T_SOULSPHERE            25
+#define T_SHOTGUN               27
+#define T_CHAINGUN              28
+#define T_ROCKETLAUNCHER        29
+#define T_PLASMAGUN             30
+#define T_BFG                   31
+#define T_CHAINSAW              32
+#define T_SUPERSHOTGUN          33
+#define T_PLASMABOLT            51
+#define T_TRACER                53
+#define T_GREENARMOR            68
+#define T_BLUEARMOR             69
+#define T_CELL                  75
+#define T_BLUEKEYCARD           85
+#define T_REDKEYCARD            86
+#define T_YELLOWKEYCARD         87
+#define T_YELLOWSKULLKEY        88
+#define T_REDSKULLKEY           89
+#define T_BLUESKULLKEY          90
+#define T_TEMPLARGEFLAME        98
+#define T_STEALTHBARON          100
+#define T_STEALTHKNIGHT         101
+#define T_STEALTHZOMBIE         102
+#define T_STEALTHSHOTGUY        103
+
+#define T_LOSTSOUL              110
+#define T_VILE                  111
+#define T_MANCUBUS              112
+#define T_HELLKNIGHT            113
+#define T_CYBERDEMON            114
+#define T_PAINELEMENTAL         115
+#define T_WOLFSS                116
+#define T_STEALTHARACHNOTRON    117
+#define T_STEALTHVILE           118
+#define T_STEALTHCACODEMON      119
+#define T_STEALTHCHAINGUY       120
+#define T_STEALTHSERGEANT       121
+#define T_STEALTHIMP            122
+#define T_STEALTHMANCUBUS       123
+#define T_STEALTHREVENANT       124
+#define T_BARREL                125
+#define T_CACODEMONSHOT         126
+#define T_ROCKET                127
+#define T_BFGSHOT               128
+#define T_ARACHNOTRONPLASMA     129
+#define T_BLOOD                 130
+#define T_PUFF                  131
+#define T_MEGASPHERE            132
+#define T_INVULNERABILITY       133
+#define T_BERSERK               134
+#define T_INVISIBILITY          135
+#define T_IRONFEET              136
+#define T_COMPUTERMAP           137
+#define T_LIGHTAMP              138
+#define T_AMMOBOX               139
+#define T_ROCKETAMMO            140
+#define T_ROCKETBOX             141
+#define T_BATTERY               142
+#define T_SHELLBOX              143
+#define T_BACKPACK              144
+#define T_GUTS                  145
+#define T_BLOODPOOL             146
+#define T_BLOODPOOL1            147
+#define T_BLOODPOOL2            148
+#define T_FLAMINGBARREL         149
+#define T_BRAINS                150
+#define T_SCRIPTEDMARINE	151
+#define T_HEALTHBONUS           152
+#define T_MANCUBUSSHOT		153
+#define T_BARONBALL		154
+
+// Heretic Spawnable things (used for thingcount() and thing spawners) ------
+
+#define T_CLINK                 1
+#define T_MUMMYLEADER           2
+#define T_BEAST                 3
+#define T_MUMMY                 4
+//#define T_IMP                 5   // Defined above
+#define T_KNIGHT                6
+#define T_IMPLEADER             7
+#define T_MUMMYGHOST            8
+#define T_MUMMYLEADERGHOST      9
+//#define T_IMPFIREBALL         10
+#define T_WIMPYWANDAMMO         11
+#define T_HEFTYWANDAMMO         12
+#define T_ITEMEGG               14
+#define T_ITEMFLIGHT            15
+#define T_ITEMTELEPORT          18
+#define T_WIZARD                19
+#define T_IRONLICH              20
+#define T_ITEMHEALTHPOTION      23
+#define T_ITEMHEALTHFLASH       24	// incorrect name but keep it for compatibility
+#define T_ITEMHEALTHFLASK       24
+#define T_ITEMHEALTHFULL        25
+#define T_CROSSBOW              27
+#define T_BLASTER               28
+#define T_PHOENIXROD            29
+#define T_SKULLROD              30
+#define T_MACE                  31
+#define T_GAUNTLETS             32
+#define T_WIMPYCROSSBOWAMMO     33
+#define T_HEFTYCROSSBOWAMMO     34
+#define T_WIMPYMACEAMMO         35
+#define T_HEFTYMACEAMMO         36
+#define T_WIMPYBLASTERAMMO      37
+#define T_HEFTYBLASTERAMMO      38
+#define T_MORPHBLAST            40
+#define T_SHIELD1               68
+#define T_SHIELD2               69
+#define T_ITEMTIMEBOMB          72
+#define T_ITEMTORCH             73
+#define T_BLUEKEY               85
+#define T_GREENKEY              86
+#define T_YELLOWKEY             87
+
+#define T_SOUND_WIND            110
+#define T_SOUND_WATERFALL       111
+
+#define T_BEASTBALL             120
+#define T_FEATHER               121
+#define T_CHICKEN               122
+#define T_VOLCANOBALL           123
+#define T_TINYVOLCANOBALL       124
+#define T_POD                   125
+#define T_PODGENERATOR          126
+#define T_KNIGHTAXE             127
+#define T_KNIGHTBLOODAXE        128
+#define T_KNIGHTGHOST           129
+#define T_MUMMYHEAD             131
+#define T_SNAKE                 132
+#define T_ITEMINVULNERABILITY   133
+#define T_ITEMTOME              134
+#define T_ITEMINVISIBILITY      135
+#define T_ITEMBAGOFHOLDING      136
+#define T_ITEMALLMAP            137
+#define T_SNAKEPROJECTILE       138
+#define T_SNAKEPROJECTILEBIG    139
+#define T_WIZARDSHOT            140
+
+#define T_DSPARILTELEPORTDEST   141
+#define T_DSPARILONSERPENT      142
+#define T_DSPARILALONE          143
+#define T_SERPENTFIREBALL       144
+#define T_DSPARILBLUESHOT       145
+#define T_DSPARILWIZARDSPAWNER  146
+
+#define T_CROSSBOWMAINBLAST     147
+#define T_CROSSBOWMINIBLAST     148
+#define T_CROSSBOWPOWERBLAST    149
+#define T_VOLCANO               150
+#define T_POWERWANDMINIBLAST    151
+#define T_POWERWANDBIGGERBLAST  152
+#define T_DEATHBALL             153
+#define T_NOGRAVITYMACEBALL     154
+#define T_BOUNCYMACEBALL        155
+#define T_HEAVYMACEBALL         156
+#define T_RIPPER                157
+#define T_WIMPYSKULLRODAMMO     158
+#define T_HEFTYSKULLRODAMMO     159
+#define T_SKULLRODBLAST         160
+#define T_WIMPYPHOENIXRODAMMO   161
+#define T_HEFTYPHOENIXRODAMMO   162
+#define T_PHOENIXSHOT           163
+#define T_IRONLICHBLUESHOT      164
+#define T_WHIRLWIND             165
+#define T_REDTELEGLITTER        166
+#define T_BLUETELEGLITTER       167
+
+// Hexen Spawnable things (used for thingcount() and thing spawners) ------
+
+#define T_CENTAUR				1
+#define T_CENTAURLEADER			2
+#define T_DEMON1				3
+#define T_ETTIN					4
+#define T_FIREGARGOYLE			5
+#define T_WATERLURKER			6
+#define T_WATERLURKERLEADER		7
+#define T_WRAITH				8
+#define T_WRAITHBURIED			9
+#define T_FIREBALL1				10
+#define T_MANA1					11
+#define T_MANA2					12
+#define T_ITEMBOOTS				13
+#define T_ITEMPORK				14
+#define T_ITEMSUMMON			16
+#define T_ITEMTPORTOTHER		17
+#define T_BISHOP				19
+#define T_ICEGOLEM				20
+#define T_DRAGONSKINBRACERS		22
+#define T_ITEMBOOSTMANA			26
+#define T_FIGHTERAXE			27
+#define T_FIGHTERHAMMER			28
+#define T_FIGHTERSWORD1			29
+#define T_FIGHTERSWORD2			30
+#define T_FIGHTERSWORD3			31
+#define T_CLERICSTAFF			32
+#define T_CLERICHOLY1			33
+#define T_CLERICHOLY2			34
+#define T_CLERICHOLY3			35
+#define T_MAGESHARDS			36
+#define T_MAGESTAFF1			37
+#define T_MAGESTAFF2			38
+#define T_MAGESTAFF3			39
+#define T_ARROW					50
+#define T_DART					51
+#define T_POISONDART			52
+#define T_RIPPERBALL			53
+#define T_BLADE					64
+#define T_ICESHARD				65
+#define T_FLAME_SMALL			66
+#define T_FLAME_LARGE			67
+#define T_MESHARMOR				68
+#define T_FALCONSHIELD			69
+#define T_PLATINUMHELM			70
+#define T_AMULETOFWARDING		71
+#define T_ITEMFLECHETTE			72
+#define T_ITEMREPULSION			74
+#define T_MANA3					75
+#define T_PUZZSKULL				76
+#define T_PUZZGEMBIG			77
+#define T_PUZZGEMRED			78
+#define T_PUZZGEMGREEN1			79
+#define T_PUZZGEMGREEN2			80
+#define T_PUZZGEMBLUE1			81
+#define T_PUZZGEMBLUE2			82
+#define T_PUZZBOOK1				83
+#define T_PUZZBOOK2				84
+#define T_METALKEY				85
+#define T_SMALLMETALKEY			86
+#define T_AXEKEY				87
+#define T_FIREKEY				88
+#define T_EMERALDKEY			89
+#define T_MACEKEY				90
+#define T_SILVERKEY				91
+#define T_RUSTYKEY				92
+#define T_HORNKEY				93
+#define T_SERPENTKEY			94
+#define T_WATERDRIP				95
+#define T_TEMPSMALLFLAME		96
+#define T_PERMSMALLFLAME		97
+#define T_PERMLARGEFLAME		99
+#define T_DEMON_MASH			100
+#define T_DEMON2_MASH			101
+#define T_ETTIN_MASH			102
+#define T_CENTAUR_MASH			103
+#define T_THRUSTSPIKEUP			104
+#define T_THRUSTSPIKEDOWN		105
+#define T_FLESH_DRIP1			106
+#define T_FLESH_DRIP2			107
+#define T_SPARK_DRIP			108
+
+
+// Flags returned by ClassifyActor
+
+#define ACTOR_NONE				0
+#define ACTOR_WORLD				1
+#define ACTOR_PLAYER			2
+#define ACTOR_BOT				4
+#define ACTOR_VOODOODOLL		8
+#define ACTOR_MONSTER			16
+#define ACTOR_ALIVE				32
+#define ACTOR_DEAD				64
+#define ACTOR_MISSILE			128
+#define ACTOR_GENERIC			256
+
+
+// Physical volumes for SoundSequenceOnSector
+
+#define SECSEQ_FLOOR			1
+#define SECSEQ_CEILING			2
+#define SECSEQ_FULLHEIGHT		3
+#define SECSEQ_INTERIOR			4
+
+// Channels for PlaySound and StopSound
+
+#define CHAN_AUTO				0
+#define CHAN_WEAPON				1
+#define CHAN_VOICE				2
+#define CHAN_ITEM				3
+#define CHAN_BODY				4
+#define CHAN_5					5
+#define CHAN_6					6
+#define CHAN_7					7
+
+// Modifier flags for PlaySound
+
+#define CHAN_LISTENERZ			8
+#define CHAN_MAYBE_LOCAL		16
+#define CHAN_UI					32
+#define CHAN_NOPAUSE			64
+
+// Standard attenuation values for PlaySound
+
+#define ATTN_NONE				0		// full volume the entire level
+#define ATTN_NORM				1.0
+#define ATTN_IDLE				1.001
+#define ATTN_STATIC				3.0		// dimish very rapidly with distance
+
+// Identifiers for PlayActorSound
+
+#define SOUND_See				0
+#define SOUND_Attack			1
+#define SOUND_Pain				2
+#define SOUND_Death				3
+#define SOUND_Active			4
+#define SOUND_Use				5
+#define SOUND_Bounce			6
+#define SOUND_WallBounce		7
+#define SOUND_CrushPain			8
+#define SOUND_Howl				9
+
+// Flags for SpawnDecal
+
+#define SDF_ABSANGLE			1
+#define SDF_PERMANENT			2
+#define SDF_FIXED_ZOFF			4
+#define SDF_FIXED_DISTANCE		8
+
+// Actor pointer selectors
+
+#DEFINE	AAPTR_DEFAULT 0
+#DEFINE	AAPTR_NULL 0x1
+#DEFINE	AAPTR_TARGET 0x2
+#DEFINE	AAPTR_MASTER 0x4
+#DEFINE	AAPTR_TRACER 0x8
+
+#DEFINE	AAPTR_PLAYER_GETTARGET 0x10
+#DEFINE	AAPTR_PLAYER_GETCONVERSATION 0x20
+
+#DEFINE	AAPTR_PLAYER1 0x40
+#DEFINE	AAPTR_PLAYER2 0x80
+#DEFINE	AAPTR_PLAYER3 0x100
+#DEFINE	AAPTR_PLAYER4 0x200
+#DEFINE	AAPTR_PLAYER5 0x400
+#DEFINE	AAPTR_PLAYER6 0x800
+#DEFINE	AAPTR_PLAYER7 0x1000
+#DEFINE	AAPTR_PLAYER8 0x2000
+
+#DEFINE AAPTR_FRIENDPLAYER 0x4000
+#DEFINE AAPTR_GET_LINETARGET 0x8000
+
+// Actor pointer operation flags
+
+#DEFINE PTROP_UNSAFETARGET 1
+#DEFINE PTROP_UNSAFEMASTER 2
+#DEFINE PTROP_NOSAFEGUARDS PTROP_UNSAFETARGET |PTROP_UNSAFEMASTER 
+
+// Line activation flags
+
+#define SPAC_Cross			1		// when player crosses line
+#define SPAC_Use			2		// when player uses line
+#define SPAC_MCross			4		// when monster crosses line
+#define SPAC_Impact			8		// when projectile hits line
+#define SPAC_Push			16		// when player pushes line
+#define SPAC_PCross			32		// when projectile crosses line
+#define SPAC_UseThrough		64		// when player uses line (doesn't block)
+#define SPAC_AnyCross		128		// when anything without the TELEPORT flag crosses the line
+#define SPAC_MUse			256		// monsters can use
+#define SPAC_MPush			512		// monsters can push
+#define SPAC_UseBack		1024	// can be used from the back side
+
+#define SPAC_None			0
+
+// GetArmorInfo
+
+#define ARMORINFO_CLASSNAME		0
+#define ARMORINFO_SAVEAMOUNT		1
+#define ARMORINFO_SAVEPERCENT		2
+#define ARMORINFO_MAXABSORB		3
+#define ARMORINFO_MAXFULLABSORB		4
+#define ARMORINFO_ACTUALSAVEAMOUNT	5
+
+// ==========================================================================
+// Skulltag Definitions
+// ==========================================================================
+
+// Skulltag Teams -----------------------------------------------------------
+#define TEAM_BLUE				0
+#define TEAM_RED				1
+#define NO_TEAM					2
+
+// Team properties ----------------------------------------------------------
+#define TPROP_Name				0
+#define TPROP_Score				1
+#define TPROP_IsValid			2
+#define TPROP_NumPlayers		3
+#define TPROP_NumLivePlayers	4
+#define TPROP_TextColor			5
+#define TPROP_PlayerStartNum	6
+#define TPROP_Spread			7
+#define TPROP_Carrier			8
+#define TPROP_Assister			9
+#define TPROP_FragCount			10
+#define TPROP_DeathCount		11
+#define TPROP_WinCount			12
+#define TPROP_PointCount		13
+#define TPROP_ReturnTics		14
+#define TPROP_TeamItem			15
+#define TPROP_WinnerTheme		16
+#define TPROP_LoserTheme		17
+
+// Skulltag Invasion --------------------------------------------------------
+#define IS_WAITINGFORPLAYERS	0
+#define IS_FIRSTCOUNTDOWN		1
+#define IS_INPROGRESS			2
+#define IS_BOSSFIGHT			3
+#define IS_WAVECOMPLETE			4
+#define IS_COUNTDOWN			5
+
+
+#define T_GRENADE				216
+#define T_BFG10KSHOT			217
+#define T_DARKIMPFIREBALL		218
+#define T_CACOLANTERNSHOT		219
+#define T_ABADDONSHOT			221
+
+// Skulltag Monsters --------------------------------------------------------
+#define T_DARKIMP				155
+#define T_BLOODDEMON			156
+#define T_SSGGUY				157
+#define T_HECTEBUS				158
+#define T_CACOLANTERN			159
+#define T_BELPHEGOR				215
+#define T_ABADDON				220
+
+// Skulltag Weapons ---------------------------------------------------------
+#define T_PISTOL				162
+#define T_GRENADELAUNCHER		163
+#define T_RAILGUN				164
+#define T_BFG10000				165
+#define T_MINIGUN				214
+
+// Skulltag Armor/Health Items ----------------------------------------------
+#define T_MAXHEALTHBONUS		166
+#define T_MAXARMORBONUS			167
+#define T_REDARMOR				168
+
+// Skulltag Powerups --------------------------------------------------------
+#define T_TURBOSPHERE			169
+#define T_ANTIGRAVBELT			170
+#define T_TIMEFREEZER			171
+#define T_INFRAGOGGLES			172
+#define T_INFRATRACKER			173
+#define T_TRANSLUCENCY			174
+#define T_DOOMSPHERE			175
+#define T_RANDOMPOWERUP			176
+
+// Skulltag Flags -----------------------------------------------------------
+#define T_BLUEFLAG				177
+#define T_REDFLAG				178
+#define T_WHITEFLAG				179
+
+// Skulltag Runes -----------------------------------------------------------
+#define T_STRENGTH				180
+#define T_RAGE					181
+#define T_DRAIN					182
+#define T_SPREAD				183
+#define T_RESISTANCE			184
+#define T_REGENERATION			185
+#define T_PROSPERITY			186
+#define T_REFLECTION			187
+#define T_HIGHJUMP				188
+#define T_HASTE					189
+
+// Zandronum database additions ---------------------------------------------
+#define DB_ORDER_ASC			0
+#define DB_ORDER_DESC			1
+
+// Events when you have input grabbed
+
+#define EV_KeyDown				1	// data1: unshifted ASCII, data2: shifted ASCII
+#define EV_KeyRepeat			2	// data1: unshifted ASCII, data2: shifted ASCII
+#define EV_KeyUp				3	// data1: unshifted ASCII, data2: shifted ASCII
+#define EV_Char					4	// data1: translated character for text input
+#define EV_MouseMove			5	// data1: x, data2: y
+#define EV_LButtonDown			6
+#define EV_LButtonUp			7
+#define EV_LButtonDblClick		8
+#define EV_MButtonDown			9
+#define EV_MButtonUp			10
+#define EV_MButtonDblClick		11
+#define EV_RButtonDown			12
+#define EV_RButtonUp			13
+#define EV_RButtonDblClick		14
+#define EV_WheelDown			15
+#define EV_WheelUp				16
+
+// Key modifiers (or'd with event type)
+
+#define GKM_SHIFT				256
+#define GKM_CTRL				512
+#define GKM_ALT					1024
+
+// Button modifiers are only valid for EV_MouseMove events
+
+#define GKM_LBUTTON				2048
+#define GKM_MBUTTON				4096
+#define GKM_RBUTTON				8192
+
+// Special codes for some GUI keys, including a few real ASCII codes.
+
+#define GK_PGDN			1
+#define GK_PGUP			2
+#define GK_HOME			3
+#define GK_END			4
+#define GK_LEFT			5
+#define GK_RIGHT		6
+#define GK_ALERT		7		// ASCII bell
+#define GK_BACKSPACE	8		// ASCII
+#define GK_TAB			9		// ASCII
+#define GK_LINEFEED		10		// ASCII
+#define GK_DOWN			10
+#define GK_VTAB			11		// ASCII
+#define GK_UP			11
+#define GK_FORMFEED		12		// ASCII
+#define GK_RETURN		13		// ASCII
+#define GK_F1			14
+#define GK_F2			15
+#define GK_F3			16
+#define GK_F4			17
+#define GK_F5			18
+#define GK_F6			19
+#define GK_F7			20
+#define GK_F8			21
+#define GK_F9			22
+#define GK_F10			23
+#define GK_F11			24
+#define GK_F12			25
+#define GK_DEL			26
+#define GK_ESCAPE		27		// ASCII
+#define GK_FREE1		28
+#define GK_FREE2		29
+#define GK_FREE3		30
+#define GK_CESCAPE		31		// color escape
+
+#define CHANGELEVEL_KEEPFACING 1
+#define CHANGELEVEL_RESETINVENTORY 2
+#define CHANGELEVEL_NOMONSTERS 4
+#define CHANGELEVEL_CHANGESKILL 8
+#define CHANGELEVEL_NOINTERMISSION 16
+#define CHANGELEVEL_RESETHEALTH	32
+#define CHANGELEVEL_PRERAISEWEAPON 64
+#define CHANGELEVEL_NOAUTOSAVE 128 // VKDoom
+
+#define NO_CHANGE 32767.0
+
+#define SECF_SILENT 1
+#define SECF_NOFALLINGDAMAGE 2
+#define SECF_FLOORDROP 4
+#define SECF_NORESPAWN 8
+#define SECF_FRICTION 16
+#define SECF_PUSH 32
+#define SECF_SILENTMOVE 64
+#define SECF_DMGTERRAINFX	128
+#define SECF_DMGENDGODMODE 256
+#define SECF_DMGENDLEVEL 512
+#define SECF_DMGHAZARD 1024
+
+#define BLOCKF_CREATURES 1
+#define BLOCKF_MONSTERS 2
+#define BLOCKF_PLAYERS 4
+#define BLOCKF_FLOATERS 8
+#define BLOCKF_PROJECTILES 16
+#define BLOCKF_EVERYTHING 32
+#define BLOCKF_RAILING 64
+#define BLOCKF_USE 128
+#define BLOCKF_SIGHT 256
+#define BLOCKF_HITSCAN 512
+#define BLOCKF_SOUND 1024
+#define BLOCKF_LANDMONSTERS 2048
+
+#define FOGP_DENSITY 0
+#define FOGP_OUTSIDEDENSITY 1
+#define FOGP_SKYFOG 2
+
+#define PRINTNAME_LEVELNAME -1
+#define PRINTNAME_LEVEL -2
+#define PRINTNAME_SKILL -3
+#define PRINTNAME_NEXTLEVEL -4
+#define PRINTNAME_NEXTSECRET -5
+
+#define CSF_NOFAKEFLOORS 1
+#define CSF_NOBLOCKALL 2
+
+#define FHF_NORANDOMPUFFZ	1
+#define FHF_NOIMPACTDECAL	2
+
+// PickActor flags
+
+#define	PICKAF_FORCETID			1
+#define	PICKAF_RETURNTID		2
+
+// magic value to set the ice translation through ACS
+#define TRANSLATION_ICE 0x100007
+
+// Actor flags
+#define MF_SPECIAL          0x00000001
+#define MF_SOLID            0x00000002
+#define MF_SHOOTABLE        0x00000004
+#define MF_NOSECTOR         0x00000008
+#define MF_NOBLOCKMAP       0x00000010
+#define MF_AMBUSH           0x00000020
+#define MF_JUSTHIT          0x00000040
+#define MF_JUSTATTACKED     0x00000080
+#define MF_SPAWNCEILING     0x00000100
+#define MF_NOGRAVITY        0x00000200
+#define MF_DROPOFF          0x00000400
+#define MF_PICKUP           0x00000800
+#define MF_NOCLIP           0x00001000
+#define MF_INCHASE          0x00002000
+#define MF_FLOAT            0x00004000
+#define MF_TELEPORT         0x00008000
+#define MF_MISSILE          0x00010000
+#define MF_DROPPED          0x00020000
+#define MF_SHADOW           0x00040000
+#define MF_NOBLOOD          0x00080000
+#define MF_CORPSE           0x00100000
+#define MF_INFLOAT          0x00200000
+#define MF_INBOUNCE         0x00200000
+#define MF_COUNTKILL        0x00400000
+#define MF_COUNTITEM        0x00800000
+#define MF_SKULLFLY         0x01000000
+#define MF_NOTDMATCH        0x02000000
+#define MF_SPAWNSOUNDSOURCE 0x04000000
+#define MF_FRIENDLY         0x08000000
+#define MF_UNMORPHED        0x10000000
+#define MF_NOLIFTDROP       0x20000000
+#define MF_STEALTH          0x40000000
+#define MF_ICECORPSE        0x80000000
+
+// Linedef flags
+#define ML_BLOCKING            0x00000001
+#define ML_BLOCKMONSTERS       0x00000002
+#define ML_TWOSIDED            0x00000004
+#define ML_DONTPEGTOP          0x00000008
+#define ML_DONTPEGBOTTOM       0x00000010
+#define ML_SECRET              0x00000020
+#define ML_SOUNDBLOCK          0x00000040
+#define ML_DONTDRAW            0x00000080
+#define ML_MAPPED              0x00000100
+#define ML_REPEAT_SPECIAL      0x00000200
+#define ML_ADDTRANS            0x00000400
+#define ML_MONSTERSCANACTIVATE 0x00002000
+#define ML_BLOCK_PLAYERS       0x00004000
+#define ML_BLOCKEVERYTHING     0x00008000
+#define ML_ZONEBOUNDARY        0x00010000
+#define ML_RAILING             0x00020000
+#define ML_BLOCK_FLOATERS      0x00040000
+#define ML_CLIP_MIDTEX         0x00080000
+#define ML_WRAP_MIDTEX         0x00100000
+#define ML_3DMIDTEX            0x00200000
+#define ML_CHECKSWITCHRANGE    0x00400000
+#define ML_FIRSTSIDEONLY       0x00800000
+#define ML_BLOCKPROJECTILE     0x01000000
+#define ML_BLOCKUSE            0x02000000
+#define ML_BLOCKSIGHT          0x04000000
+#define ML_BLOCKHITSCAN        0x08000000
+
+#define QF_RELATIVE		1
+#define QF_SCALEDOWN		1 << 1
+#define QF_SCALEUP		1 << 2
+#define QF_MAX			1 << 3
+#define QF_FULLINTENSITY	1 << 4
+#define QF_WAVE			1 << 5
+#define QF_3D			1 << 6
+#define QF_GROUNDONLY		1 << 7
+#define QF_AFFECTACTORS 	1 << 8
+#define QF_SHAKEONLY		1 << 9
+#define QF_DAMAGEFALLOFF	1 << 10
+
+#define WARPF_ABSOLUTEOFFSET 0x1
+#define WARPF_ABSOLUTEANGLE 0x2
+#define WARPF_USECALLERANGLE 0x4
+#define WARPF_NOCHECKPOSITION 0x8
+#define WARPF_INTERPOLATE 0x10
+#define WARPF_WARPINTERPOLATION 0x20
+#define WARPF_COPYINTERPOLATION 0x40
+#define WARPF_STOP 0x80
+#define WARPF_TOFLOOR 0x100
+#define WARPF_TESTONLY 0x200
+#define WARPF_ABSOLUTEPOSITION 0x400
+#define WARPF_BOB 0x800
+#define WARPF_MOVEPTR 0x1000
+#define WARPF_USEPTR 0x2000
+#define WARPF_COPYVELOCITY 0x4000
+#define WARPF_COPYPITCH 0x8000
+
+#define CPXF_ANCESTOR    (1 << 0)
+#define CPXF_LESSOREQUAL (1 << 1)
+#define CPXF_NOZ         (1 << 2)
+#define CPXF_COUNTDEAD   (1 << 3)
+#define CPXF_DEADONLY    (1 << 4)
+#define CPXF_EXACT       (1 << 5)
+#define CPXF_SETTARGET   (1 << 6)
+#define CPXF_SETMASTER   (1 << 7)
+#define CPXF_SETTRACER   (1 << 8)
+#define CPXF_FARTHEST    (1 << 9)
+#define CPXF_CLOSEST     (1 << 10)
+#define CPXF_SETONPTR    (1 << 11)
+#define CPXF_CHECKSIGHT  (1 << 12)
+
+#define SECPART_Floor 0
+#define SECPART_Ceiling 1
+#define SECPART_3D 2
+
+// For Line_SetAutomapFlags; These are or'd together
+#define AMLF_Secret		(1 << 0)
+#define AMLF_DontDraw		(1 << 1)
+#define AMLF_Mapped		(1 << 2)
+#define AMLF_Revealed		(1 << 3)
+
+// For Line_SetAutomapStyle
+#define AMLS_Default		0
+#define AMLS_OneSided		1
+#define AMLS_TwoSided		2
+#define AMLS_FloorDiff		3
+#define AMLS_CeilingDiff	4
+#define AMLS_ExtraFloor		5
+#define AMLS_Special		6
+#define AMLS_Secret		7
+#define AMLS_NotSeen		8
+#define AMLS_Locked		9
+#define AMLS_IntraTeleport	10
+#define AMLS_InterTeleport	11
+#define AMLS_UnexploredSecret	12
+#define AMLS_Portal		13
+
+// Lump reading stuff.
+#define LUMP_OPEN_FULLPATH 1
+
+#define LUMP_READ_BYTE 0
+#define LUMP_READ_UBYTE 1
+#define LUMP_READ_SHORT 2
+#define LUMP_READ_USHORT 3
+#define LUMP_READ_INT 4
+#define LUMP_READ_FLOAT 5
+                
+#define LUMP_INFO_SIZE 0
+#define LUMP_INFO_NAME 1
diff --git a/Build/Compilers/ZDoom/zspecial.acs b/Build/Compilers/ZDoom/zspecial.acs
index a1182afeb3bbd342a77195913b283ba1ec84a0d7..06805abb4cebce8a1da545a9dbedd58870358796 100755
--- a/Build/Compilers/ZDoom/zspecial.acs
+++ b/Build/Compilers/ZDoom/zspecial.acs
@@ -1,447 +1,485 @@
-//**************************************************************************
-//**
-//** zspecials.acs
-//**
-//**************************************************************************
-
-special
-//	  1:Polyobj_StartLine
-	  2:Polyobj_RotateLeft(3),
-	  3:Polyobj_RotateRight(3),
-	  4:Polyobj_Move(4),
-//	  5:Polyobj_ExplicitLine
-	  6:Polyobj_MoveTimes8(4),
-	  7:Polyobj_DoorSwing(4),
-	  8:Polyobj_DoorSlide(5),
-	  9:Line_Horizon(0),
-	 10:Door_Close(2,3),
-	 11:Door_Open(2,3),
-	 12:Door_Raise(3,4),
-	 13:Door_LockedRaise(4,5),
-	 14:Door_Animated(3,4),
-	 15:Autosave(0),
-//	 16:Transfer_WallLight
-	 17:Thing_Raise(1,2),
-	 18:StartConversation(1,2),
-	 19:Thing_Stop(1),
-	 20:Floor_LowerByValue(3,4),
-	 21:Floor_LowerToLowest(2,3),
-	 22:Floor_LowerToNearest(2,3),
-	 23:Floor_RaiseByValue(3,5),
-	 24:Floor_RaiseToHighest(2,5),
-	 25:Floor_RaiseToNearest(2,4),
-	 26:Stairs_BuildDown(5),
-	 27:Stairs_BuildUp(5),
-	 28:Floor_RaiseAndCrush(3,4),
-	 29:Pillar_Build(3),
-	 30:Pillar_Open(4),
-	 31:Stairs_BuildDownSync(4),
-	 32:Stairs_BuildUpSync(4),
-	 33:ForceField(0),
-	 34:ClearForceField(1),
-	 35:Floor_RaiseByValueTimes8(3,5),
-	 36:Floor_LowerByValueTimes8(3,4),
-	 37:Floor_MoveToValue(3,5),
-	 38:Ceiling_Waggle(5),
-	 39:Teleport_ZombieChanger(2),
-	 40:Ceiling_LowerByValue(3,5),
-	 41:Ceiling_RaiseByValue(3,4),
-	 42:Ceiling_CrushAndRaise(3,4),
-	 43:Ceiling_LowerAndCrush(3,4),
-	 44:Ceiling_CrushStop(1,2),
-	 45:Ceiling_CrushRaiseAndStay(3,4),
-	 46:Floor_CrushStop(1),
-	 47:Ceiling_MoveToValue(3,5),
-//	 48:Sector_Attach3dMidtex
-	 49:GlassBreak(0,2),
-//	 50:ExtraFloor_LightOnly
-	 51:Sector_SetLink(4),
-	 52:Scroll_Wall(5),
-	 53:Line_SetTextureOffset(5),
-	 54:Sector_ChangeFlags(3),
-	 55:Line_SetBlocking(3),
-	 56:Line_SetTextureScale(5),
-//	 57: Sector_SetPortal
-//	 58: Sector_CopyScroller
-	 59:Polyobj_OR_MoveToSpot(3),
-	 60:Plat_PerpetualRaise(3),
- 	 61:Plat_Stop(1,2),
-	 62:Plat_DownWaitUpStay(3),
-	 63:Plat_DownByValue(4),
-	 64:Plat_UpWaitDownStay(3),
-	 65:Plat_UpByValue(4),
-	 66:Floor_LowerInstant(3,4),
-	 67:Floor_RaiseInstant(3,5),
-	 68:Floor_MoveToValueTimes8(4,5),
-	 69:Ceiling_MoveToValueTimes8(4,5),
-	 70:Teleport(1,3),
-	 71:Teleport_NoFog(1,4),
-	 72:ThrustThing(2,4),
-	 73:DamageThing(1,2),
-	 74:Teleport_NewMap(2,3),
-	 75:Teleport_EndGame(0),
-	 76:TeleportOther(3),
-	 77:TeleportGroup(5),
-	 78:TeleportInSector(4,5),
-	 79:Thing_SetConversation(2),
-	 80:ACS_Execute(2,5),
-	 81:ACS_Suspend(2),
-	 82:ACS_Terminate(2),
-	 83:ACS_LockedExecute(5),
-	 84:ACS_ExecuteWithResult(1,5),
-	 85:ACS_LockedExecuteDoor(5),
-	 86:Polyobj_MoveToSpot(3),
-	 87:Polyobj_Stop(1),
-	 88:Polyobj_MoveTo(4),
-	 89:Polyobj_OR_MoveTo(4),
-	 90:Polyobj_OR_RotateLeft(3),
-	 91:Polyobj_OR_RotateRight(3),
-	 92:Polyobj_OR_Move(4),
-	 93:Polyobj_OR_MoveTimes8(4),
-	 94:Pillar_BuildAndCrush(4,5),
-	 95:FloorAndCeiling_LowerByValue(3),
-	 96:FloorAndCeiling_RaiseByValue(3),
-	 97:Ceiling_LowerAndCrushDist(3,5),
-	 98:Sector_SetTranslucent(3,4),
-	 99:Floor_RaiseAndCrushDoom(3,4),
-//	100:Scroll_Texture_Left
-//	101:Scroll_Texture_Right
-//	102:Scroll_Texture_Up
-//	103:Scroll_Texture_Down
-	104:Ceiling_CrushAndRaiseSilentDist(4,5),
-	105:Door_WaitRaise(4,5),
-	106:Door_WaitClose(3,4),
-	107:Line_SetPortalTarget(2),
-
-	109:Light_ForceLightning(1),
-	110:Light_RaiseByValue(2),
-	111:Light_LowerByValue(2),
-	112:Light_ChangeToValue(2),
-	113:Light_Fade(3),
-	114:Light_Glow(4),
-	115:Light_Flicker(3),
-	116:Light_Strobe(5),
-	117:Light_Stop(1),
-//	118:Plane_Copy
-	119:Thing_Damage(2,3),
-	120:Radius_Quake(5),
-//	121:Line_SetIdentification
-	
-	125:Thing_Move(2,3),
-	
-	127:Thing_SetSpecial(5),
-	128:ThrustThingZ(4),
-	129:UsePuzzleItem(0),	// only for setting it on a line. Cannot be called!
-	130:Thing_Activate(1),
-	131:Thing_Deactivate(1),
-	132:Thing_Remove(1),
-	133:Thing_Destroy(1,3),
-	134:Thing_Projectile(5),
-	135:Thing_Spawn(3,4),
-	136:Thing_ProjectileGravity(5),
-	137:Thing_SpawnNoFog(3,4),
-	138:Floor_Waggle(5),
-	139:Thing_SpawnFacing(2,4),
-	140:Sector_ChangeSound(2),
-	
-	143:Player_RemoveItem(2),			// Skulltag Functions
-	144:Player_GiveItem(2),				// Skulltag Functions
-	145:Player_SetTeam(1),				// Skulltag Functions
-	150:Line_SetHealth(2),
-	151:Sector_SetHealth(3),
-	152:Team_Score(2),					// Skulltag Functions
-	153:Team_GivePoints(3),				// Skulltag Functions
-	154:Teleport_NoStop(2, 3),
-
-	157:SetGlobalFogParameter(2),		// GZDoom only!
-	158:FS_Execute(1,4),
-	159:Sector_SetPlaneReflection(3),	// GZDoom only!
-//	160:Sector_Set3DFloor
-//	161:Sector_SetContents
-	
-	168:Ceiling_CrushAndRaiseDist(3,5),
-	169:Generic_Crusher2(5),
-	170:Sector_SetCeilingScale2(3),
-	171:Sector_SetFloorScale2(3),
-	172:Plat_UpNearestWaitDownStay(3),
-	173:NoiseAlert(2),
-	174:SendToCommunicator(4),
-	175:Thing_ProjectileIntercept(5),
-	176:Thing_ChangeTID(2),
-	177:Thing_Hate(2,3),
-	178:Thing_ProjectileAimed(4,5),
-	179:ChangeSkill(1),
-	180:Thing_SetTranslation(2),
-//	181:Plane_Align,
-	182:Line_Mirror(0),
-	183:Line_AlignCeiling(2),
-	184:Line_AlignFloor(2),
-	185:Sector_SetRotation(3),
-	186:Sector_SetCeilingPanning(5),
-	187:Sector_SetFloorPanning(5),
-	188:Sector_SetCeilingScale(5),
-	189:Sector_SetFloorScale(5),
-	191:SetPlayerProperty(3),
-	192:Ceiling_LowerToHighestFloor(2,5),
-	193:Ceiling_LowerInstant(3,5),
-	194:Ceiling_RaiseInstant(3,4),
-	195:Ceiling_CrushRaiseAndStayA(4,5),
-	196:Ceiling_CrushAndRaiseA(4,5),
-	197:Ceiling_CrushAndRaiseSilentA(4,5),
-	198:Ceiling_RaiseByValueTimes8(3,4),
-	199:Ceiling_LowerByValueTimes8(3,5),
-	200:Generic_Floor(5),
-	201:Generic_Ceiling(5),
-	202:Generic_Door(5),
-	203:Generic_Lift(5),
-	204:Generic_Stairs(5),
-	205:Generic_Crusher(5),
-	206:Plat_DownWaitUpStayLip(4,5),
-	207:Plat_PerpetualRaiseLip(4),
-	208:TranslucentLine(2,3),
-//	209:Transfer_Heights,
-//	210:Transfer_FloorLight,
-//	211:Transfer_CeilingLight,
-	212:Sector_SetColor(4,5),
-	213:Sector_SetFade(4),
-	214:Sector_SetDamage(3,5),
-	215:Teleport_Line(2,3),
-	216:Sector_SetGravity(3),
-	217:Stairs_BuildUpDoom(5),
-	218:Sector_SetWind(4),
-	219:Sector_SetFriction(2),
-	220:Sector_SetCurrent(4),
-	221:Scroll_Texture_Both(5),
-//	222:Scroll_Texture_Model,
-	223:Scroll_Floor(4),
-	224:Scroll_Ceiling(4),
-//	225:Scroll_Texture_Offsets,
-	226:ACS_ExecuteAlways(2,5),
-//	227:PointPush_SetForce,
-	228:Plat_RaiseAndStayTx0(2,3),
-	229:Thing_SetGoal(3,4),
-	230:Plat_UpByValueStayTx(3),
-	231:Plat_ToggleCeiling(1),
-	232:Light_StrobeDoom(3),
-	233:Light_MinNeighbor(1),
-	234:Light_MaxNeighbor(1),
-	235:Floor_TransferTrigger(1),
-	236:Floor_TransferNumeric(1),
-	237:ChangeCamera(3),
-	238:Floor_RaiseToLowestCeiling(2,5),
-	239:Floor_RaiseByValueTxTy(3),
-	240:Floor_RaiseByTexture(2,4),
-	241:Floor_LowerToLowestTxTy(2),
-	242:Floor_LowerToHighest(3,4),
-	243:Exit_Normal(1),
-	244:Exit_Secret(1),
-	245:Elevator_RaiseToNearest(2),
-	246:Elevator_MoveToFloor(2),
-	247:Elevator_LowerToNearest(2),
-	248:HealThing(1,2),
-	249:Door_CloseWaitOpen(3, 4),
-	250:Floor_Donut(3),
-	251:FloorAndCeiling_LowerRaise(3,4),
-	252:Ceiling_RaiseToNearest(2,3),
-	253:Ceiling_LowerToLowest(2,4),
-	254:Ceiling_LowerToFloor(2,5),
-	255:Ceiling_CrushRaiseAndStaySilA(4,5),
-
-	// These are specialized versions of the Generic_* specials which are defined for EE Extradata.
-	256:Floor_LowerToHighestEE(2, 3),
-	257:Floor_RaiseToLowest(2, 3),
-	258:Floor_LowerToLowestCeiling(2,3),
-	259:Floor_RaiseToCeiling(2, 5),
-	260:Floor_ToCeilingInstant(1, 4),
-	261:Floor_LowerByTexture(2, 3),
-	262:Ceiling_RaiseToHighest(2, 3),
-	263:Ceiling_ToHighestInstant(1, 3),
-	264:Ceiling_LowerToNearest(2, 4),
-	265:Ceiling_RaiseToLowest(2, 3),
-	266:Ceiling_RaiseToHighestFloor(2, 3),
-	267:Ceiling_ToFloorInstant(1, 4),
-	268:Ceiling_RaiseByTexture(2, 3),
-	269:Ceiling_LowerByTexture(2, 4),
-	270:Stairs_BuildDownDoom(5),
-	271:Stairs_BuildUpDoomSync(4),
-	272:Stairs_BuildDownDoomSync(4),
-	
-	// New additions can go above 255 now.
-	273:Stairs_BuildUpDoomCrush(5),
-	274:Door_AnimatedClose(2),
-	275:Floor_Stop(1),
-	276:Ceiling_Stop(1),
-	277:Sector_SetFloorGlow(5),
-	278:Sector_SetCeilingGlow(5),
-	279:Floor_MoveToValueAndCrush(4, 5),
-	280:Ceiling_MoveToValueAndCrush(4, 5),
-	281:Line_SetAutomapFlags(3),
-	282:Line_SetAutomapStyle(2),
+//**************************************************************************
+//**
+//** zspecials.acs
+//**
+//**************************************************************************
+
+special
+//	  1:Polyobj_StartLine
+	  2:Polyobj_RotateLeft(3),
+	  3:Polyobj_RotateRight(3),
+	  4:Polyobj_Move(4),
+//	  5:Polyobj_ExplicitLine
+	  6:Polyobj_MoveTimes8(4),
+	  7:Polyobj_DoorSwing(4),
+	  8:Polyobj_DoorSlide(5),
+	  9:Line_Horizon(0),
+	 10:Door_Close(2,3),
+	 11:Door_Open(2,3),
+	 12:Door_Raise(3,4),
+	 13:Door_LockedRaise(4,5),
+	 14:Door_Animated(3,4),
+	 15:Autosave(0),
+//	 16:Transfer_WallLight
+	 17:Thing_Raise(1,2),
+	 18:StartConversation(1,2),
+	 19:Thing_Stop(1),
+	 20:Floor_LowerByValue(3,4),
+	 21:Floor_LowerToLowest(2,3),
+	 22:Floor_LowerToNearest(2,3),
+	 23:Floor_RaiseByValue(3,5),
+	 24:Floor_RaiseToHighest(2,5),
+	 25:Floor_RaiseToNearest(2,4),
+	 26:Stairs_BuildDown(5),
+	 27:Stairs_BuildUp(5),
+	 28:Floor_RaiseAndCrush(3,4),
+	 29:Pillar_Build(3),
+	 30:Pillar_Open(4),
+	 31:Stairs_BuildDownSync(4),
+	 32:Stairs_BuildUpSync(4),
+	 33:ForceField(0),
+	 34:ClearForceField(1),
+	 35:Floor_RaiseByValueTimes8(3,5),
+	 36:Floor_LowerByValueTimes8(3,4),
+	 37:Floor_MoveToValue(3,5),
+	 38:Ceiling_Waggle(5),
+	 39:Teleport_ZombieChanger(2),
+	 40:Ceiling_LowerByValue(3,5),
+	 41:Ceiling_RaiseByValue(3,4),
+	 42:Ceiling_CrushAndRaise(3,4),
+	 43:Ceiling_LowerAndCrush(3,4),
+	 44:Ceiling_CrushStop(1,2),
+	 45:Ceiling_CrushRaiseAndStay(3,4),
+	 46:Floor_CrushStop(1),
+	 47:Ceiling_MoveToValue(3,5),
+//	 48:Sector_Attach3dMidtex
+	 49:GlassBreak(0,2),
+//	 50:ExtraFloor_LightOnly
+	 51:Sector_SetLink(4),
+	 52:Scroll_Wall(5),
+	 53:Line_SetTextureOffset(5),
+	 54:Sector_ChangeFlags(3),
+	 55:Line_SetBlocking(3),
+	 56:Line_SetTextureScale(5),
+//	 57: Sector_SetPortal
+//	 58: Sector_CopyScroller
+	 59:Polyobj_OR_MoveToSpot(3),
+	 60:Plat_PerpetualRaise(3),
+ 	 61:Plat_Stop(1,2),
+	 62:Plat_DownWaitUpStay(3),
+	 63:Plat_DownByValue(4),
+	 64:Plat_UpWaitDownStay(3),
+	 65:Plat_UpByValue(4),
+	 66:Floor_LowerInstant(3,4),
+	 67:Floor_RaiseInstant(3,5),
+	 68:Floor_MoveToValueTimes8(4,5),
+	 69:Ceiling_MoveToValueTimes8(4,5),
+	 70:Teleport(1,3),
+	 71:Teleport_NoFog(1,4),
+	 72:ThrustThing(2,4),
+	 73:DamageThing(1,2),
+	 74:Teleport_NewMap(2,3),
+	 75:Teleport_EndGame(0),
+	 76:TeleportOther(3),
+	 77:TeleportGroup(5),
+	 78:TeleportInSector(4,5),
+	 79:Thing_SetConversation(2),
+	 80:ACS_Execute(2,5),
+	 81:ACS_Suspend(2),
+	 82:ACS_Terminate(2),
+	 83:ACS_LockedExecute(5),
+	 84:ACS_ExecuteWithResult(1,5),
+	 85:ACS_LockedExecuteDoor(5),
+	 86:Polyobj_MoveToSpot(3),
+	 87:Polyobj_Stop(1),
+	 88:Polyobj_MoveTo(4),
+	 89:Polyobj_OR_MoveTo(4),
+	 90:Polyobj_OR_RotateLeft(3),
+	 91:Polyobj_OR_RotateRight(3),
+	 92:Polyobj_OR_Move(4),
+	 93:Polyobj_OR_MoveTimes8(4),
+	 94:Pillar_BuildAndCrush(4,5),
+	 95:FloorAndCeiling_LowerByValue(3),
+	 96:FloorAndCeiling_RaiseByValue(3),
+	 97:Ceiling_LowerAndCrushDist(3,5),
+	 98:Sector_SetTranslucent(3,4),
+	 99:Floor_RaiseAndCrushDoom(3,4),
+//	100:Scroll_Texture_Left
+//	101:Scroll_Texture_Right
+//	102:Scroll_Texture_Up
+//	103:Scroll_Texture_Down
+	104:Ceiling_CrushAndRaiseSilentDist(4,5),
+	105:Door_WaitRaise(4,5),
+	106:Door_WaitClose(3,4),
+	107:Line_SetPortalTarget(2),
+
+	109:Light_ForceLightning(1),
+	110:Light_RaiseByValue(2),
+	111:Light_LowerByValue(2),
+	112:Light_ChangeToValue(2),
+	113:Light_Fade(3),
+	114:Light_Glow(4),
+	115:Light_Flicker(3),
+	116:Light_Strobe(5),
+	117:Light_Stop(1),
+//	118:Plane_Copy
+	119:Thing_Damage(2,3),
+	120:Radius_Quake(5),
+//	121:Line_SetIdentification
+	
+	125:Thing_Move(2,3),
+	
+	127:Thing_SetSpecial(5),
+	128:ThrustThingZ(4),
+	129:UsePuzzleItem(0),	// only for setting it on a line. Cannot be called!
+	130:Thing_Activate(1),
+	131:Thing_Deactivate(1),
+	132:Thing_Remove(1),
+	133:Thing_Destroy(1,3),
+	134:Thing_Projectile(5),
+	135:Thing_Spawn(3,4),
+	136:Thing_ProjectileGravity(5),
+	137:Thing_SpawnNoFog(3,4),
+	138:Floor_Waggle(5),
+	139:Thing_SpawnFacing(2,4),
+	140:Sector_ChangeSound(2),
+	
+	143:Player_RemoveItem(2),			// Skulltag Functions
+	144:Player_GiveItem(2),				// Skulltag Functions
+	145:Player_SetTeam(1),				// Skulltag Functions
+	150:Line_SetHealth(2),
+	151:Sector_SetHealth(3),
+	152:Team_Score(2),					// Skulltag Functions
+	153:Team_GivePoints(3),				// Skulltag Functions
+	154:Teleport_NoStop(2, 3),
+
+	157:SetGlobalFogParameter(2),		// GZDoom only!
+	158:FS_Execute(1,4),
+	159:Sector_SetPlaneReflection(3),	// GZDoom only!
+//	160:Sector_Set3DFloor
+//	161:Sector_SetContents
+	
+	168:Ceiling_CrushAndRaiseDist(3,5),
+	169:Generic_Crusher2(5),
+	170:Sector_SetCeilingScale2(3),
+	171:Sector_SetFloorScale2(3),
+	172:Plat_UpNearestWaitDownStay(3),
+	173:NoiseAlert(2),
+	174:SendToCommunicator(4),
+	175:Thing_ProjectileIntercept(5),
+	176:Thing_ChangeTID(2),
+	177:Thing_Hate(2,3),
+	178:Thing_ProjectileAimed(4,5),
+	179:ChangeSkill(1),
+	180:Thing_SetTranslation(2),
+//	181:Plane_Align,
+	182:Line_Mirror(0),
+	183:Line_AlignCeiling(2),
+	184:Line_AlignFloor(2),
+	185:Sector_SetRotation(3),
+	186:Sector_SetCeilingPanning(5),
+	187:Sector_SetFloorPanning(5),
+	188:Sector_SetCeilingScale(5),
+	189:Sector_SetFloorScale(5),
+	191:SetPlayerProperty(3),
+	192:Ceiling_LowerToHighestFloor(2,5),
+	193:Ceiling_LowerInstant(3,5),
+	194:Ceiling_RaiseInstant(3,4),
+	195:Ceiling_CrushRaiseAndStayA(4,5),
+	196:Ceiling_CrushAndRaiseA(4,5),
+	197:Ceiling_CrushAndRaiseSilentA(4,5),
+	198:Ceiling_RaiseByValueTimes8(3,4),
+	199:Ceiling_LowerByValueTimes8(3,5),
+	200:Generic_Floor(5),
+	201:Generic_Ceiling(5),
+	202:Generic_Door(5),
+	203:Generic_Lift(5),
+	204:Generic_Stairs(5),
+	205:Generic_Crusher(5),
+	206:Plat_DownWaitUpStayLip(4,5),
+	207:Plat_PerpetualRaiseLip(4),
+	208:TranslucentLine(2,3),
+//	209:Transfer_Heights,
+//	210:Transfer_FloorLight,
+//	211:Transfer_CeilingLight,
+	212:Sector_SetColor(4,5),
+	213:Sector_SetFade(4),
+	214:Sector_SetDamage(3,5),
+	215:Teleport_Line(2,3),
+	216:Sector_SetGravity(3),
+	217:Stairs_BuildUpDoom(5),
+	218:Sector_SetWind(4),
+	219:Sector_SetFriction(2),
+	220:Sector_SetCurrent(4),
+	221:Scroll_Texture_Both(5),
+//	222:Scroll_Texture_Model,
+	223:Scroll_Floor(4),
+	224:Scroll_Ceiling(4),
+//	225:Scroll_Texture_Offsets,
+	226:ACS_ExecuteAlways(2,5),
+//	227:PointPush_SetForce,
+	228:Plat_RaiseAndStayTx0(2,3),
+	229:Thing_SetGoal(3,4),
+	230:Plat_UpByValueStayTx(3),
+	231:Plat_ToggleCeiling(1),
+	232:Light_StrobeDoom(3),
+	233:Light_MinNeighbor(1),
+	234:Light_MaxNeighbor(1),
+	235:Floor_TransferTrigger(1),
+	236:Floor_TransferNumeric(1),
+	237:ChangeCamera(3),
+	238:Floor_RaiseToLowestCeiling(2,5),
+	239:Floor_RaiseByValueTxTy(3),
+	240:Floor_RaiseByTexture(2,4),
+	241:Floor_LowerToLowestTxTy(2),
+	242:Floor_LowerToHighest(3,4),
+	243:Exit_Normal(1),
+	244:Exit_Secret(1),
+	245:Elevator_RaiseToNearest(2),
+	246:Elevator_MoveToFloor(2),
+	247:Elevator_LowerToNearest(2),
+	248:HealThing(1,2),
+	249:Door_CloseWaitOpen(3, 4),
+	250:Floor_Donut(3),
+	251:FloorAndCeiling_LowerRaise(3,4),
+	252:Ceiling_RaiseToNearest(2,3),
+	253:Ceiling_LowerToLowest(2,4),
+	254:Ceiling_LowerToFloor(2,5),
+	255:Ceiling_CrushRaiseAndStaySilA(4,5),
+
+	// These are specialized versions of the Generic_* specials which are defined for EE Extradata.
+	256:Floor_LowerToHighestEE(2, 3),
+	257:Floor_RaiseToLowest(2, 3),
+	258:Floor_LowerToLowestCeiling(2,3),
+	259:Floor_RaiseToCeiling(2, 5),
+	260:Floor_ToCeilingInstant(1, 4),
+	261:Floor_LowerByTexture(2, 3),
+	262:Ceiling_RaiseToHighest(2, 3),
+	263:Ceiling_ToHighestInstant(1, 3),
+	264:Ceiling_LowerToNearest(2, 4),
+	265:Ceiling_RaiseToLowest(2, 3),
+	266:Ceiling_RaiseToHighestFloor(2, 3),
+	267:Ceiling_ToFloorInstant(1, 4),
+	268:Ceiling_RaiseByTexture(2, 3),
+	269:Ceiling_LowerByTexture(2, 4),
+	270:Stairs_BuildDownDoom(5),
+	271:Stairs_BuildUpDoomSync(4),
+	272:Stairs_BuildDownDoomSync(4),
+	
+	// New additions can go above 255 now.
+	273:Stairs_BuildUpDoomCrush(5),
+	274:Door_AnimatedClose(2),
+	275:Floor_Stop(1),
+	276:Ceiling_Stop(1),
+	277:Sector_SetFloorGlow(5),
+	278:Sector_SetCeilingGlow(5),
+	279:Floor_MoveToValueAndCrush(4, 5),
+	280:Ceiling_MoveToValueAndCrush(4, 5),
+	281:Line_SetAutomapFlags(3),
+	282:Line_SetAutomapStyle(2),
+	283:Polyobj_StopSound(1),
 	
 	// new to Eternity
 //	300:Portal_Define(5),
-//	301:Line_QuickPortal(1),
-	
-	
-	// internal functions have negative values
-	-1:GetLineUDMFInt(2),
-	-2:GetLineUDMFFixed(2),
-	-3:GetThingUDMFInt(2),
-	-4:GetThingUDMFFixed(2),
-	-5:GetSectorUDMFInt(2),
-	-6:GetSectorUDMFFixed(2),
-	-7:GetSideUDMFInt(3),
-	-8:GetSideUDMFFixed(3),
-	-9:GetActorVelX(1),
-	-10:GetActorVelY(1),
-	-11:GetActorVelZ(1),
-	-12:SetActivator(1,2),
-	-13:SetActivatorToTarget(1),
-	-14:GetActorViewHeight(1),
-	-15:GetChar(2),
-	-16:GetAirSupply(1),
-	-17:SetAirSupply(2),
-	-18:SetSkyScrollSpeed(2),
-	-19:GetArmorType(2),
-	-20:SpawnSpotForced(4),
-	-21:SpawnSpotFacingForced(3),
-	-22:CheckActorProperty(3),
-	-23:SetActorVelocity(6),
-	-24:SetUserVariable(3),
-	-25:GetUserVariable(2),
-	-26:Radius_Quake2(6),
-	-27:CheckActorClass(2),
-	-28:SetUserArray(4),
-	-29:GetUserArray(3),
-	-30:SoundSequenceOnActor(2),
-	-31:SoundSequenceOnSector(3),
-	-32:SoundSequenceOnPolyobj(2),
-	-33:GetPolyobjX(1),
-	-34:GetPolyobjY(1),
-	-35:CheckSight(3),
-	-36:SpawnForced(4,6),
-	-37:AnnouncerSound(2),
-	-38:SetPointer(2,4),
-	-39:ACS_NamedExecute(2,5),
-	-40:ACS_NamedSuspend(2),
-	-41:ACS_NamedTerminate(2),
-	-42:ACS_NamedLockedExecute(5),
-	-43:ACS_NamedLockedExecuteDoor(5),
-	-44:ACS_NamedExecuteWithResult(1,5),
-	-45:ACS_NamedExecuteAlways(2,5),
-	-46:UniqueTID(0,2),
-	-47:IsTIDUsed(1),
-	-48:Sqrt(1),
-	-49:FixedSqrt(1),
-	-50:VectorLength(2),
-	-51:SetHUDClipRect(4,6),
-	-52:SetHUDWrapWidth(1),
-	-53:SetCVar(2),
-	-54:GetUserCVar(2),
-	-55:SetUserCVar(3),
-	-56:GetCVarString(1),
-	-57:SetCVarString(2),
-	-58:GetUserCVarString(2),
-	-59:SetUserCVarString(3),
-	-60:LineAttack(4,9),
-	-61:PlaySound(2,7),
-	-62:StopSound(1,2),
-	-63:strcmp(2,3),
-	-64:stricmp(2,3),
-	-64:strcasecmp(2,3),	// an alias for stricmp
-	-65:StrLeft(2),
-	-66:StrRight(2),
-	-67:StrMid(3),
-	-68:GetActorClass(1),
-	-69:GetWeapon(0),
-	-70:SoundVolume(3),
-	-71:PlayActorSound(2,6),
-	-72:SpawnDecal(2,6),
-	-73:CheckFont(1),
-	-74:DropItem(2,4),
-	-75:CheckFlag(2),
-	-76:SetLineActivation(2),
-	-77:GetLineActivation(1),
-	-78:GetActorPowerupTics(2),
-	-79:ChangeActorAngle(2,3),
-	-80:ChangeActorPitch(2,3),
-	-81:GetArmorInfo(1),
-	-82:DropInventory(2),
-	-83:PickActor(5,8),
-	-84:IsPointerEqual(2,4),
-	-85:CanRaiseActor(1),
-	-86:SetActorTeleFog(3),
-	-87:SwapActorTeleFog(1),
-	-88:SetActorRoll(2),
-	-89:ChangeActorRoll(2,3),
-	-90:GetActorRoll(1),
-	-91:QuakeEx(8,16),
-	-92:Warp(6,11),
-	-93:GetMaxInventory(2),
-	-94:SetSectorDamage(2,5),
-	-95:SetSectorTerrain(3),
-	-96:SpawnParticle(1,16),
-	-97:SetMusicVolume(1),
-	-98:CheckProximity(3, 6),
-	-99:CheckActorState(2,3),
-	
-	// Zandronum's
-	-100:ResetMap(0),
-	-101:PlayerIsSpectator(1),
-	-102:ConsolePlayerNumber(0),
-	-103:GetTeamProperty(2),
-	-104:GetPlayerLivesLeft(1),
-	-105:SetPlayerLivesLeft(2),
-	-106:KickFromGame(2),
-	-107:GetGamemodeState(0),
-	-108:SetDBEntry(3),
-	-109:GetDBEntry(2),
-	-110:SetDBEntryString(3),
-	-111:GetDBEntryString(2),
-	-112:IncrementDBEntry(3),
-	-113:PlayerIsLoggedIn(1),
-	-114:GetPlayerAccountName(1),
-	-115:SortDBEntries(4),
-	-116:CountDBResults(1),
-	-117:FreeDBResults(1),
-	-118:GetDBResultKeyString(2),
-	-119:GetDBResultValueString(2),
-	-120:GetDBResultValue(2),
-	-121:GetDBEntryRank(3),
-	-122:RequestScriptPuke(4),
-	-123:BeginDBTransaction(0),
-	-124:EndDBTransaction(0),
-	-125:GetDBEntries(1),
-	
-	// -1xx are reserved for Zandronum
-	-200:CheckClass(1),
-	-201:DamageActor(6), // [arookas]
-	-202:SetActorFlag(3),
-	-203:SetTranslation(2),
-	-204:GetActorFloorTexture(1),
-	-205:GetActorFloorTerrain(1),
-	-206:StrArg(1),
-	-207:Floor(1),
-	-208:Round(1),
-	-209:Ceil(1),
-	-210:ScriptCall(2, 100),	// ACS does not know varargs so use something large as maximum.
-	-211:StartSlideshow(1),
-	-212:GetSectorHealth(2),
-	-213:GetLineHealth(1),
-	
-	
-	// Eternity's
-	-300:GetLineX(3),
-	-301:GetLineY(3),
-	-302:SetAirFriction(1),
-	
-	// GZDoom OpenGL
-	-400:SetSectorGlow(6),
-	-401:SetFogDensity(2),
-	
-	// ZDaemon's
-	-19620:GetTeamScore(1),
-	-19621:SetTeamScore(2),
-	
-	-100000:__EndOfList__(10);
-	
+//	301:Line_QuickPortal(1),
+	
+	
+	// internal functions have negative values
+	-1:GetLineUDMFInt(2),
+	-2:GetLineUDMFFixed(2),
+	-3:GetThingUDMFInt(2),
+	-4:GetThingUDMFFixed(2),
+	-5:GetSectorUDMFInt(2),
+	-6:GetSectorUDMFFixed(2),
+	-7:GetSideUDMFInt(3),
+	-8:GetSideUDMFFixed(3),
+	-9:GetActorVelX(1),
+	-10:GetActorVelY(1),
+	-11:GetActorVelZ(1),
+	-12:SetActivator(1,2),
+	-13:SetActivatorToTarget(1),
+	-14:GetActorViewHeight(1),
+	-15:GetChar(2),
+	-16:GetAirSupply(1),
+	-17:SetAirSupply(2),
+	-18:SetSkyScrollSpeed(2),
+	-19:GetArmorType(2),
+	-20:SpawnSpotForced(4),
+	-21:SpawnSpotFacingForced(3),
+	-22:CheckActorProperty(3),
+	-23:SetActorVelocity(6),
+	-24:SetUserVariable(3),
+	-25:GetUserVariable(2),
+	-26:Radius_Quake2(6),
+	-27:CheckActorClass(2),
+	-28:SetUserArray(4),
+	-29:GetUserArray(3),
+	-30:SoundSequenceOnActor(2),
+	-31:SoundSequenceOnSector(3),
+	-32:SoundSequenceOnPolyobj(2),
+	-33:GetPolyobjX(1),
+	-34:GetPolyobjY(1),
+	-35:CheckSight(3),
+	-36:SpawnForced(4,6),
+	-37:AnnouncerSound(2),
+	-38:SetPointer(2,4),
+	-39:ACS_NamedExecute(2,5),
+	-40:ACS_NamedSuspend(2),
+	-41:ACS_NamedTerminate(2),
+	-42:ACS_NamedLockedExecute(5),
+	-43:ACS_NamedLockedExecuteDoor(5),
+	-44:ACS_NamedExecuteWithResult(1,5),
+	-45:ACS_NamedExecuteAlways(2,5),
+	-46:UniqueTID(0,2),
+	-47:IsTIDUsed(1),
+	-48:Sqrt(1),
+	-49:FixedSqrt(1),
+	-50:VectorLength(2),
+	-51:SetHUDClipRect(4,6),
+	-52:SetHUDWrapWidth(1),
+	-53:SetCVar(2),
+	-54:GetUserCVar(2),
+	-55:SetUserCVar(3),
+	-56:GetCVarString(1),
+	-57:SetCVarString(2),
+	-58:GetUserCVarString(2),
+	-59:SetUserCVarString(3),
+	-60:LineAttack(4,9),
+	-61:PlaySound(2,7),
+	-62:StopSound(1,2),
+	-63:strcmp(2,3),
+	-64:stricmp(2,3),
+	-64:strcasecmp(2,3),	// an alias for stricmp
+	-65:StrLeft(2),
+	-66:StrRight(2),
+	-67:StrMid(3),
+	-68:GetActorClass(1),
+	-69:GetWeapon(0),
+	-70:SoundVolume(3),
+	-71:PlayActorSound(2,6),
+	-72:SpawnDecal(2,6),
+	-73:CheckFont(1),
+	-74:DropItem(2,4),
+	-75:CheckFlag(2),
+	-76:SetLineActivation(2, 3),
+	-77:GetLineActivation(1),
+	-78:GetActorPowerupTics(2),
+	-79:ChangeActorAngle(2,3),
+	-80:ChangeActorPitch(2,3),
+	-81:GetArmorInfo(1),
+	-82:DropInventory(2),
+	-83:PickActor(5,8),
+	-84:IsPointerEqual(2,4),
+	-85:CanRaiseActor(1),
+	-86:SetActorTeleFog(3),
+	-87:SwapActorTeleFog(1),
+	-88:SetActorRoll(2),
+	-89:ChangeActorRoll(2,3),
+	-90:GetActorRoll(1),
+	-91:QuakeEx(8,19),
+	-92:Warp(6,11),
+	-93:GetMaxInventory(2),
+	-94:SetSectorDamage(2,5),
+	-95:SetSectorTerrain(3),
+	-96:SpawnParticle(1,16),
+	-97:SetMusicVolume(1),
+	-98:CheckProximity(3, 6),
+	-99:CheckActorState(2,3),
+	
+	// Zandronum's
+	-100:ResetMap(0),
+	-101:PlayerIsSpectator(1),
+	-102:ConsolePlayerNumber(0),
+	-103:GetTeamProperty(2),
+	-104:GetPlayerLivesLeft(1),
+	-105:SetPlayerLivesLeft(2),
+	-106:KickFromGame(2),
+	-107:GetGamemodeState(0),
+	-108:SetDBEntry(3),
+	-109:GetDBEntry(2),
+	-110:SetDBEntryString(3),
+	-111:GetDBEntryString(2),
+	-112:IncrementDBEntry(3),
+	-113:PlayerIsLoggedIn(1),
+	-114:GetPlayerAccountName(1),
+	-115:SortDBEntries(4),
+	-116:CountDBResults(1),
+	-117:FreeDBResults(1),
+	-118:GetDBResultKeyString(2),
+	-119:GetDBResultValueString(2),
+	-120:GetDBResultValue(2),
+	-121:GetDBEntryRank(3),
+	-122:RequestScriptPuke(4),
+	-123:BeginDBTransaction(0),
+	-124:EndDBTransaction(0),
+	-125:GetDBEntries(1),
+    -126:NamedRequestScriptPuke(1,5),
+	-127:SystemTime(0),
+	-128:GetTimeProperty(2,3),
+	-129:Strftime(2,3),
+	-130:SetDeadSpectator(2),
+	-131:SetActivatorToPlayer(1),
+	-132:SetCurrentGamemode(1),
+	-133:GetCurrentGamemode(0),
+	-134:SetGamemodeLimit(2),
+	-135:SetPlayerClass(3),
+	-136:SetPlayerChasecam(2),
+	-137:GetPlayerChasecam(1),
+	-138:SetPlayerScore(3),
+	-139:GetPlayerScore(2),
+	-140:InDemoMode(0),
+	-144:ExecuteClientScript(2,6),
+	-145:NamedExecuteClientScript(2,6),
+	-146:SendNetworkString(2,3),
+	-147:NamedSendNetworkString(2,3),
+	-148:GetChatMessage(2),
+	-149:GetMapRotationSize(0),
+	-150:GetMapRotationInfo(2),
+	-151:GetCurrentMapPosition(0),
+	-152:GetEventResult(0),
+	-153:GetActorSectorLocation(2),
+	-154:ChangeTeamScore(3,4),
+	-155:SetGameplaySetting(2),
+	-156:SetCustomPlayerValue(3),
+	-157:GetCustomPlayerValue(2),
+	-158:ResetCustomDataToDefault(2),
+    -159:LumpOpen(1,3),
+    -160:LumpRead(2,3),
+    -161:LumpReadString(2,3),
+    // LumpReadArray is a set of 4 functions, whose definition is
+    // built-in to ACC. So 162-165 are used up function indices.
+    -166:LumpGetInfo(2),
+    -167:LumpClose(1),
+	
+	// -1xx are reserved for Zandronum
+	-200:CheckClass(1),
+	-201:DamageActor(6), // [arookas]
+	-202:SetActorFlag(3),
+	-203:SetTranslation(2),
+	-204:GetActorFloorTexture(1),
+	-205:GetActorFloorTerrain(1),
+	-206:StrArg(1),
+	-207:Floor(1),
+	-208:Round(1),
+	-209:Ceil(1),
+	-210:ScriptCall(2, 100),	// ACS does not know varargs so use something large as maximum.
+	-211:StartSlideshow(1),
+	-212:GetSectorHealth(2),
+	-213:GetLineHealth(1),
+	-214:SetSubtitleNumber(2),
+	
+	
+	// Eternity's
+	-300:GetLineX(3),
+	-301:GetLineY(3),
+	-302:SetAirFriction(1),
+	
+	// GZDoom OpenGL
+	-400:SetSectorGlow(6),
+	-401:SetFogDensity(2),
+	
+	// ZDaemon's
+	-19620:GetTeamScore(1),
+	-19621:SetTeamScore(2),
+	
+	-100000:__EndOfList__(10);
diff --git a/Build/Compilers/ZDoom/zwvars.acs b/Build/Compilers/ZDoom/zwvars.acs
index 7011f5648402fb469e96f86449d4cf68b3fb344f..b21f4e72b36e3961895124dbc65d62666e65f08b 100755
--- a/Build/Compilers/ZDoom/zwvars.acs
+++ b/Build/Compilers/ZDoom/zwvars.acs
@@ -1,8 +1,8 @@
-
-//**************************************************************************
-//**
-//** zwvars.acs
-//**
-//**************************************************************************
-
-// include your world-variable declarations here.
+
+//**************************************************************************
+//**
+//** zwvars.acs
+//**
+//**************************************************************************
+
+// include your world-variable declarations here.
diff --git a/Setup/HVRbuilder_setup.iss b/Setup/HVRbuilder_setup.iss
index 11fb7b782b7aef175b75df93b422f8fd1468a506..1440faa506d9f609c6e089145f1973803548faeb 100644
--- a/Setup/HVRbuilder_setup.iss
+++ b/Setup/HVRbuilder_setup.iss
@@ -19,19 +19,19 @@
 #endif
 
 [Setup]
-AppName=High Voltage Ring
-AppVerName=High Voltage Ring {#HVR_GetVersionString} ({#HVR_arch})
+AppName=The Story of Horsepower Vetted Racing (High Volate Ring)
+AppVerName=The Story of Horsepower Vetted Racing (High Volate Ring) {#HVR_GetVersionString} ({#HVR_arch})
 VersionInfoVersion={#HVR_GetVersionString}
-AppPublisher=Kart Krew Dev
-AppPublisherURL=https://www.kartkrew.org/
-AppSupportURL=https://git.do.srb2.org/KartKrew/high-voltage-ring/-/issues
-AppUpdatesURL=https://git.do.srb2.org/KartKrew/high-voltage-ring/-/releases
+AppPublisher=StarManiaKG
+AppPublisherURL=https://github.com/StarManiaKG/
+AppSupportURL=https://git.do.srb2.org/StarManiaKG/the-story-of-horsepower-vetted-racing/-/issues
+AppUpdatesURL=https://git.do.srb2.org/StarManiaKG/the-story-of-horsepower-vetted-racing/-/releases
 DefaultDirName={commonpf}\High Voltage Ring
 DefaultGroupName=High Voltage Ring
 AllowNoIcons=true
 LicenseFile=..\LICENSE.txt
 OutputDir=..\Release
-OutputBaseFilename="HVRBuilder v{#HVR_GetVersion} Setup ({#HVR_bit})"
+OutputBaseFilename="TSoHVR_HVRBuilder v{#HVR_GetVersion} Setup ({#HVR_bit})"
 Compression=lzma/ultra64
 SolidCompression=true
 SourceDir=..\Build
diff --git a/Source/Core/Properties/AssemblyInfo.cs b/Source/Core/Properties/AssemblyInfo.cs
index 6890b726d24ace900068c8095fbb00405a70ef47..f626c5be13a6e68c0156f17721059282d5fc07c7 100755
--- a/Source/Core/Properties/AssemblyInfo.cs
+++ b/Source/Core/Properties/AssemblyInfo.cs
@@ -30,6 +30,6 @@ using CodeImp.DoomBuilder;
 //      Build Number
 //      Revision
 //
-[assembly: AssemblyVersion("3.0.0.4013")]
+[assembly: AssemblyVersion("3.0.0.4082")]
 [assembly: NeutralResourcesLanguageAttribute("en")]
-[assembly: AssemblyHash("48d37de")]
+[assembly: AssemblyHash("b81654c")]
diff --git a/Source/Native/Backend.cpp b/Source/Native/Backend.cpp
index b361b149f10cbbdd82b71b92819a90215b772b1f..28ca79cc7bd5b0036b79923266c95e5aa1b95e80 100644
--- a/Source/Native/Backend.cpp
+++ b/Source/Native/Backend.cpp
@@ -35,7 +35,7 @@ void SetError(const char* fmt, ...)
 	va_list va;
 	va_start(va, fmt);
 	mSetErrorBuffer[0] = 0;
-#ifdef WIN32
+#ifdef _WIN32
 	_vsnprintf(mSetErrorBuffer, sizeof(mSetErrorBuffer) - 1, fmt, va);
 #else
 	vsnprintf(mSetErrorBuffer, sizeof(mSetErrorBuffer) - 1, fmt, va);
@@ -66,9 +66,9 @@ Backend* Backend::Get()
 
 extern "C"
 {
-	RenderDevice* RenderDevice_New(void* disp, void* window)
+	RenderDevice* RenderDevice_New(void* disp, void* window, bool debug)
 	{
-		return Backend::Get()->NewRenderDevice(disp, window);
+		return Backend::Get()->NewRenderDevice(disp, window, debug);
 	}
 
 	void RenderDevice_Delete(RenderDevice* device)
diff --git a/Source/Native/Backend.h b/Source/Native/Backend.h
index 2d6ebbca6335e43cfb4edbb0ce6ddf2e0469e4a6..97258f1874e22f5696cb0707fd87b2f7aacb15d9 100644
--- a/Source/Native/Backend.h
+++ b/Source/Native/Backend.h
@@ -133,7 +133,7 @@ public:
 
 	static Backend* Get();
 
-	virtual RenderDevice* NewRenderDevice(void* disp, void* window) = 0;
+	virtual RenderDevice* NewRenderDevice(void* disp, void* window, bool debug) = 0;
 	virtual void DeleteRenderDevice(RenderDevice* device) = 0;
 
 	virtual VertexBuffer* NewVertexBuffer() = 0;
diff --git a/Source/Native/BuilderNative.vcxproj b/Source/Native/BuilderNative.vcxproj
index 0d2210788d034482ba442d90666c69a4112dd90c..a49c706bf7695499ea3cc92df5629b962b2eb335 100644
--- a/Source/Native/BuilderNative.vcxproj
+++ b/Source/Native/BuilderNative.vcxproj
@@ -39,19 +39,23 @@
     <ConfigurationType>DynamicLibrary</ConfigurationType>
     <CharacterSet>MultiByte</CharacterSet>
     <WholeProgramOptimization>true</WholeProgramOptimization>
+    <PlatformToolset>v143</PlatformToolset>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
     <ConfigurationType>DynamicLibrary</ConfigurationType>
     <CharacterSet>MultiByte</CharacterSet>
     <WholeProgramOptimization>true</WholeProgramOptimization>
+    <PlatformToolset>v143</PlatformToolset>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
     <ConfigurationType>DynamicLibrary</ConfigurationType>
     <CharacterSet>MultiByte</CharacterSet>
+    <PlatformToolset>v143</PlatformToolset>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
     <ConfigurationType>DynamicLibrary</ConfigurationType>
     <CharacterSet>MultiByte</CharacterSet>
+    <PlatformToolset>v143</PlatformToolset>
   </PropertyGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
   <ImportGroup Label="ExtensionSettings">
diff --git a/Source/Native/Matrix.cpp b/Source/Native/Matrix.cpp
index 81711cd6e93f1732dc130ac75c7dd3e7693fdd30..f340478de1b6b083c1237147ecf9abc162192708 100644
--- a/Source/Native/Matrix.cpp
+++ b/Source/Native/Matrix.cpp
@@ -26,6 +26,22 @@
 #include <cmath>
 #include "fasttrig.h"
 
+#if defined (__GNUC__) && !defined (__i386__) && !defined (__x86_64__)
+#define NO_SSE
+#endif
+
+#if defined (_MSC_VER) && defined (_M_IX86_FP) && (_M_IX86_FP <= 1)
+#define NO_SSE
+#endif
+
+#if defined (_MSC_VER) && defined (_M_ARM)
+#define NO_SSE
+#endif
+
+#if defined (_MSC_VER) && defined (_M_ARM64)
+#define NO_SSE
+#endif
+
 #ifndef NO_SSE
 #include <xmmintrin.h>
 #endif
diff --git a/Source/Native/OpenGL/GLBackend.cpp b/Source/Native/OpenGL/GLBackend.cpp
index 39effc25c49a147aec13bba5a89437df61910f45..b45f8089821ff92281bd06f5bf8c29e89620eaba 100644
--- a/Source/Native/OpenGL/GLBackend.cpp
+++ b/Source/Native/OpenGL/GLBackend.cpp
@@ -26,9 +26,9 @@
 #include "GLIndexBuffer.h"
 #include "GLTexture.h"
 
-RenderDevice* GLBackend::NewRenderDevice(void* disp, void* window)
+RenderDevice* GLBackend::NewRenderDevice(void* disp, void* window, bool debug)
 {
-	GLRenderDevice* device = new GLRenderDevice(disp, window);
+	GLRenderDevice* device = new GLRenderDevice(disp, window, debug);
 	if (!device->Context)
 	{
 		delete device;
diff --git a/Source/Native/OpenGL/GLBackend.h b/Source/Native/OpenGL/GLBackend.h
index 89e5fcb4e99a80e199c3a65656cb736724269452..2a78cf582d2b40b9cd40b921f71d269205582fa2 100644
--- a/Source/Native/OpenGL/GLBackend.h
+++ b/Source/Native/OpenGL/GLBackend.h
@@ -26,7 +26,7 @@
 class GLBackend : public Backend
 {
 public:
-	RenderDevice* NewRenderDevice(void* disp, void* window) override;
+	RenderDevice* NewRenderDevice(void* disp, void* window, bool debug) override;
 	void DeleteRenderDevice(RenderDevice* device) override;
 
 	VertexBuffer* NewVertexBuffer() override;
diff --git a/Source/Native/OpenGL/GLRenderDevice.cpp b/Source/Native/OpenGL/GLRenderDevice.cpp
index f2f8f65632304cec18d50e017c17277b42446bd2..dd5ca9a166d4d090177dbe87bc42c25c13ef0ebd 100644
--- a/Source/Native/OpenGL/GLRenderDevice.cpp
+++ b/Source/Native/OpenGL/GLRenderDevice.cpp
@@ -44,27 +44,30 @@ static const char* GLLogCheckNull(const GLubyte* str)
 	return str ? (const char*)str : "null";
 }
 
-GLRenderDevice::GLRenderDevice(void* disp, void* window)
+GLRenderDevice::GLRenderDevice(void* disp, void* window, bool debug)
 {
 	Context = IOpenGLContext::Create(disp, window);
 	if (Context)
 	{
 		Context->MakeCurrent();
 
-#ifdef _DEBUG
-		FILE* f = fopen("OpenGLDebug.log", "wb");
-		if (f)
+//#ifdef _DEBUG
+		if (debug)
 		{
-			fprintf(f, "GL_VENDOR = %s\r\n", GLLogCheckNull(glGetString(GL_VENDOR)));
-			fprintf(f, "GL_RENDERER = %s\r\n", GLLogCheckNull(glGetString(GL_RENDERER)));
-			fprintf(f, "GL_VERSION = %s\r\n", GLLogCheckNull(glGetString(GL_VERSION)));
-			fprintf(f, "GL_SHADING_LANGUAGE_VERSION = %s\r\n", GLLogCheckNull(glGetString(GL_SHADING_LANGUAGE_VERSION)));
-			fclose(f);
-
-			glEnable(GL_DEBUG_OUTPUT);
-			glDebugMessageCallback(&GLLogCallback, nullptr);
+			FILE* f = fopen("OpenGLDebug.log", "wb");
+			if (f)
+			{
+				fprintf(f, "GL_VENDOR = %s\r\n", GLLogCheckNull(glGetString(GL_VENDOR)));
+				fprintf(f, "GL_RENDERER = %s\r\n", GLLogCheckNull(glGetString(GL_RENDERER)));
+				fprintf(f, "GL_VERSION = %s\r\n", GLLogCheckNull(glGetString(GL_VERSION)));
+				fprintf(f, "GL_SHADING_LANGUAGE_VERSION = %s\r\n", GLLogCheckNull(glGetString(GL_SHADING_LANGUAGE_VERSION)));
+				fclose(f);
+
+				glEnable(GL_DEBUG_OUTPUT);
+				glDebugMessageCallback(&GLLogCallback, nullptr);
+			}
 		}
-#endif
+//#endif
 
 		glGenVertexArrays(1, &mStreamVAO);
 		glGenBuffers(1, &mStreamVertexBuffer);
@@ -563,11 +566,11 @@ void GLRenderDevice::GarbageCollectBuffer(int size, VertexFormat format)
 
 	GLuint handle = old->GetVAO();
 	glDeleteVertexArrays(1, &handle);
-	if (handle == oldvao) oldvao = sharedbuf->GetVAO();
+	if ((size_t)handle == (size_t)oldvao) oldvao = sharedbuf->GetVAO();
 
 	handle = old->GetBuffer();
 	glDeleteBuffers(1, &handle);
-	if (handle == oldarray) oldarray = sharedbuf->GetBuffer();
+	if ((size_t)handle == (size_t)oldarray) oldarray = sharedbuf->GetBuffer();
 
 	glBindBuffer(GL_ARRAY_BUFFER, oldarray);
 	glBindVertexArray(oldvao);
@@ -604,7 +607,11 @@ bool GLRenderDevice::SetVertexBufferData(VertexBuffer* ibuffer, void* data, int6
 	buffer->BufferStartIndex = buffer->BufferOffset / (format == VertexFormat::Flat ? VertexBuffer::FlatStride : VertexBuffer::WorldStride);
 	sharedbuf->NextPos += size;
 
-	glBufferSubData(GL_ARRAY_BUFFER, buffer->BufferOffset, size, data);
+	if (data)
+	{
+		glBufferSubData(GL_ARRAY_BUFFER, buffer->BufferOffset, size, data);
+	}
+
 	glBindBuffer(GL_ARRAY_BUFFER, oldbinding);
 	bool result = CheckGLError();
 	return result;
diff --git a/Source/Native/OpenGL/GLRenderDevice.h b/Source/Native/OpenGL/GLRenderDevice.h
index c943bffeaeb7bb8efa3462dc8df3d7578399a1d9..f960f1003ae34908d7a0fa77341d8931d82d019d 100644
--- a/Source/Native/OpenGL/GLRenderDevice.h
+++ b/Source/Native/OpenGL/GLRenderDevice.h
@@ -24,6 +24,7 @@
 #include "../Backend.h"
 #include "OpenGLContext.h"
 #include <list>
+#include <mutex>
 
 class GLSharedVertexBuffer;
 class GLShader;
@@ -35,7 +36,7 @@ class GLTexture;
 class GLRenderDevice : public RenderDevice
 {
 public:
-	GLRenderDevice(void* disp, void* window);
+	GLRenderDevice(void* disp, void* window, bool debug);
 	~GLRenderDevice();
 
 	void DeclareUniform(UniformName name, const char* glslname, UniformType type) override;
diff --git a/Source/Native/OpenGL/GLTexture.h b/Source/Native/OpenGL/GLTexture.h
index 3741392d521252dca2b55ad65444d24a5a7961ac..efdf6f1e63f85eb79f7e85d14288c584b32fbe45 100644
--- a/Source/Native/OpenGL/GLTexture.h
+++ b/Source/Native/OpenGL/GLTexture.h
@@ -63,7 +63,6 @@ private:
 	int mHeight = 0;
 	PixelFormat mFormat = {};
 	bool mCubeTexture = false;
-	bool mPBOTexture = false;
 	GLuint mTexture = 0;
 	GLuint mFramebuffer = 0;
 	GLuint mDepthRenderbuffer = 0;
diff --git a/Source/Native/OpenGL/OpenGLContext.cpp b/Source/Native/OpenGL/OpenGLContext.cpp
index 29dc545a51c446079adf64b14b147a6a5761935a..1c64ae64a9fb9a6378a0b6235c431a57994bb6c7 100644
--- a/Source/Native/OpenGL/OpenGLContext.cpp
+++ b/Source/Native/OpenGL/OpenGLContext.cpp
@@ -30,9 +30,9 @@ public:
 	OpenGLLoadFunctions() { ogl_LoadFunctions(); }
 };
 
-#ifdef WIN32
+#ifdef _WIN32
 
-#include <CommCtrl.h>
+#include <commctrl.h>
 
 #define WGL_CONTEXT_MAJOR_VERSION_ARB           0x2091
 #define WGL_CONTEXT_MINOR_VERSION_ARB           0x2092
@@ -178,14 +178,14 @@ void OpenGLContext::SwapBuffers()
 
 int OpenGLContext::GetWidth() const
 {
-	RECT box = { 0 };
+	RECT box = { 0, 0, 0, 0 };
 	GetClientRect(window, &box);
 	return box.right - box.left;
 }
 
 int OpenGLContext::GetHeight() const
 {
-	RECT box = { 0 };
+	RECT box = { 0, 0, 0, 0 };
 	GetClientRect(window, &box);
 	return box.bottom - box.top;
 }
@@ -217,15 +217,15 @@ OpenGLContext::CreateFunctions OpenGLContext::GetCreateFunctions(HWND window)
 			{
 				wglMakeCurrent(queryDC, queryContext);
 
-				functions.wglCreateContextAttribsARB = (ptr_wglCreateContextAttribsARB)wglGetProcAddress("wglCreateContextAttribsARB");
-				functions.wglGetPixelFormatAttribivEXT = (ptr_wglGetPixelFormatAttribivEXT)wglGetProcAddress("wglGetPixelFormatAttribivEXT");
-				functions.wglGetPixelFormatAttribfvEXT = (ptr_wglGetPixelFormatAttribfvEXT)wglGetProcAddress("wglGetPixelFormatAttribfvEXT");
-				functions.wglChoosePixelFormatEXT = (ptr_wglChoosePixelFormatEXT)wglGetProcAddress("wglChoosePixelFormatEXT");
+				functions.wglCreateContextAttribsARB = (ptr_wglCreateContextAttribsARB)(void*)wglGetProcAddress("wglCreateContextAttribsARB");
+				functions.wglGetPixelFormatAttribivEXT = (ptr_wglGetPixelFormatAttribivEXT)(void*)wglGetProcAddress("wglGetPixelFormatAttribivEXT");
+				functions.wglGetPixelFormatAttribfvEXT = (ptr_wglGetPixelFormatAttribfvEXT)(void*)wglGetProcAddress("wglGetPixelFormatAttribfvEXT");
+				functions.wglChoosePixelFormatEXT = (ptr_wglChoosePixelFormatEXT)(void*)wglGetProcAddress("wglChoosePixelFormatEXT");
 
 				HMODULE opengl32 = LoadLibrary("opengl32.dll");
 				if (opengl32)
 				{
-					functions.error = reinterpret_cast<ptr_glError>(GetProcAddress(opengl32, "glGetError"));
+					functions.error = reinterpret_cast<ptr_glError>((void*)GetProcAddress(opengl32, "glGetError"));
 					FreeLibrary(opengl32);
 				}
 
@@ -513,9 +513,6 @@ private:
 	
 	bool is_glx_extension_supported(const char* ext_name);
 	
-	int major_version = 3;
-	int minor_version = 2;
-	
 	void* opengl_lib_handle = nullptr;
 };
 
@@ -934,7 +931,7 @@ std::unique_ptr<IOpenGLContext> IOpenGLContext::Create(void* disp, void* window)
 	return ctx;
 }
 
-void* GL_GetProcAddress(const char* function_name)
+extern "C" void* GL_GetProcAddress(const char* function_name)
 {
 	if (glx_global.glXGetProcAddressARB)
 		return (void*)glx_global.glXGetProcAddressARB((GLubyte*)function_name);
diff --git a/Source/Native/OpenGL/gl_load/gl_load.c b/Source/Native/OpenGL/gl_load/gl_load.c
index 364b2e5d47947b2b38d255a050b2056a6e6c8d6d..4414f7027703b67c51fb4627b7c0e57fa2a1a0f2 100644
--- a/Source/Native/OpenGL/gl_load/gl_load.c
+++ b/Source/Native/OpenGL/gl_load/gl_load.c
@@ -18,6 +18,7 @@ static void* AppleGLGetProcAddress (const char *name)
 #endif /* __APPLE__ */
 
 /* BEGINNING OF MANUAL CHANGES, DO NOT REMOVE! */
+#if 0 // Unused function
 #if defined(__sgi) || defined (__sun) || defined(__unix__)
 #include <dlfcn.h>
 #include <stdio.h>
@@ -39,6 +40,7 @@ static void* PosixGetProcAddress (const GLubyte* name)
     return dlsym(h, (const char*)name);
 }
 #endif /* __sgi || __sun || __unix__ */
+#endif
 
 #if defined(_WIN32)
 
@@ -67,7 +69,7 @@ static int TestPointer(const PROC pTest)
 	return 1;
 }
 
-static PROC WinGetProcAddress(const char *name)
+static void *WinGetProcAddress(const char *name)
 {
 	HMODULE glMod = NULL;
 	PROC pFunc = wglGetProcAddress((LPCSTR)name);
@@ -85,7 +87,6 @@ static PROC WinGetProcAddress(const char *name)
 		#define IntGetProcAddress(name) AppleGLGetProcAddress(name)
 	#else
 		#if defined(__sgi) || defined(__sun) || defined(__unix__)
-			void* GL_GetProcAddress(const char* proc);
 			#define IntGetProcAddress(name) GL_GetProcAddress((const char*)name)
 			//#define IntGetProcAddress(name) PosixGetProcAddress((const GLubyte*)name)
 /* END OF MANUAL CHANGES, DO NOT REMOVE! */
diff --git a/Source/Native/OpenGL/gl_load/gl_load.h b/Source/Native/OpenGL/gl_load/gl_load.h
index 4748d68169152171962c2a257269e21029bc7edc..9bd3ed3504fa5d97010e896936ce4a2659496a33 100644
--- a/Source/Native/OpenGL/gl_load/gl_load.h
+++ b/Source/Native/OpenGL/gl_load/gl_load.h
@@ -4216,6 +4216,8 @@ int ogl_GetMinorVersion(void);
 int ogl_GetMajorVersion(void);
 int ogl_IsVersionGEQ(int majorVersion, int minorVersion);
 
+void* GL_GetProcAddress(const char* proc);
+
 #ifdef __cplusplus
 }
 #endif /*__cplusplus*/
diff --git a/Source/Native/Precomp.h b/Source/Native/Precomp.h
index 88cb80b1f790fcb0a208bca43865b8696d15b960..d6a47342dd152f447576df5c173d2bf0c82e2eab 100644
--- a/Source/Native/Precomp.h
+++ b/Source/Native/Precomp.h
@@ -30,8 +30,8 @@
 #include <memory>
 #include <string>
 
-#ifdef WIN32
-#include <Windows.h>
+#ifdef _WIN32
+#include <windows.h>
 #undef min
 #undef max
 #endif
diff --git a/Source/Native/RawMouse.cpp b/Source/Native/RawMouse.cpp
index c21a47298af5dff960886d90979ae6fd0851bf98..c0a45a9a3382edd0ad00d47ca8d9f07073455403 100644
--- a/Source/Native/RawMouse.cpp
+++ b/Source/Native/RawMouse.cpp
@@ -22,7 +22,7 @@
 #include "Precomp.h"
 #include "RawMouse.h"
 
-#ifdef WIN32
+#ifdef _WIN32
 
 #ifndef HID_USAGE_PAGE_GENERIC
 #define HID_USAGE_PAGE_GENERIC		((USHORT) 0x01)
@@ -105,7 +105,7 @@ LRESULT RawMouse::OnMessage(INT message, WPARAM wparam, LPARAM lparam)
 		{
 			std::vector<uint32_t> buf((size + 3) / 4);
 			result = GetRawInputData(rawinputHandle, RID_INPUT, buf.data(), &size, sizeof(RAWINPUTHEADER));
-			if (result >= 0)
+			if (result != (UINT)-1)
 			{
 				RAWINPUT* rawinput = (RAWINPUT*)buf.data();
 				if (rawinput->header.dwType == RIM_TYPEMOUSE)
@@ -172,7 +172,7 @@ extern "C"
 
 RawMouse* RawMouse_New(void* hwnd)
 {
-#ifdef WIN32
+#if defined(WIN32)
 	return new RawMouse(hwnd);
 #else
 	return nullptr;
@@ -194,4 +194,28 @@ float RawMouse_GetY(RawMouse* mouse)
 	return mouse->GetY();
 }
 
+#ifdef UDB_LINUX
+#include <X11/extensions/Xfixes.h>
+
+static Display *display = NULL;
+#endif
+
+void MouseInput_ShowCursor(bool show)
+{
+#ifdef UDB_LINUX
+	if (display == NULL)
+	{
+		display = XOpenDisplay(NULL);
+		if (display == NULL)
+			return;
+    }
+
+	if (show)
+		XFixesShowCursor(display, DefaultRootWindow(display));
+	else
+		XFixesHideCursor(display, DefaultRootWindow(display));
+	XSync(display, True);
+#endif
+}
+
 }
diff --git a/Source/Native/RawMouse.h b/Source/Native/RawMouse.h
index adec8fe891edef5d0a973e0e1f02c2968cf52322..34c144be4bc39fb7142ddff57324721c580e27c1 100644
--- a/Source/Native/RawMouse.h
+++ b/Source/Native/RawMouse.h
@@ -21,7 +21,7 @@
 
 #pragma once
 
-#ifdef WIN32
+#ifdef _WIN32
 
 class RawMouse
 {
diff --git a/Source/Native/VPO/p_setup.cpp b/Source/Native/VPO/p_setup.cpp
index e6d9e016dd9dde928c1b1140c773941baf199918..fc15ba6f7b251c2c03d5eee09f05df369a4a3092 100644
--- a/Source/Native/VPO/p_setup.cpp
+++ b/Source/Native/VPO/p_setup.cpp
@@ -706,8 +706,8 @@ void Context::CalcDoorAltHeight(sector_t *sec)
 	fixed_t door_h = sec->floorheight;  // == sec->ceilingheight
 
 	// compute lowest ceiling and highest floor of neighbor sectors
-	fixed_t low_ceil   =  32767 << FRACBITS;
-	fixed_t high_floor = -32767 << FRACBITS;
+	fixed_t low_ceil   = INT32_MAX;
+	fixed_t high_floor = INT32_MIN;
 
 	int k, pass;
 
diff --git a/Source/Native/exports.def b/Source/Native/exports.def
index 8f364f8c2ba7f9fe19f6ba23cbb04ea8869af702..d7ed8f0cbd6fb30121ab3129bcdeea87770de0aa 100644
--- a/Source/Native/exports.def
+++ b/Source/Native/exports.def
@@ -50,6 +50,7 @@ EXPORTS
 	RawMouse_Delete
 	RawMouse_GetX
 	RawMouse_GetY
+	MouseInput_ShowCursor
 	Matrix_Null
 	Matrix_Identity
 	Matrix_Translation
diff --git a/Source/Native/fasttrig.h b/Source/Native/fasttrig.h
index 285c313ca3e2252a9b44d26363eae509cd3153db..d155b794fb4f41cc8a5d843afd0696e84318d63a 100644
--- a/Source/Native/fasttrig.h
+++ b/Source/Native/fasttrig.h
@@ -39,10 +39,16 @@
 #define M_PI 3.14159265358979323846
 #endif
 
-#ifdef WIN32
+#ifndef FORCEINLINE
+#if defined (_MSC_VER)
 #define FORCEINLINE __forceinline
+//#elif defined (__MINGW32__)
+//#define FORCEINLINE inline
+#elif defined (__GNUC__)
+#define FORCEINLINE inline __attribute__((always_inline))
 #else
-#define FORCEINLINE
+#define FORCEINLINE inline
+#endif
 #endif
 
 // This uses a sine table with linear interpolation
diff --git a/Source/Plugins/BuilderModes/Properties/AssemblyInfo.cs b/Source/Plugins/BuilderModes/Properties/AssemblyInfo.cs
index b123fae0c5c5c900e153c552a3dc01df22c4d07d..3cd638db25f07ca9d37d3ba98590351aadc2619c 100755
--- a/Source/Plugins/BuilderModes/Properties/AssemblyInfo.cs
+++ b/Source/Plugins/BuilderModes/Properties/AssemblyInfo.cs
@@ -29,5 +29,5 @@ using System.Resources;
 //      Build Number
 //      Revision
 //
-[assembly: AssemblyVersion("3.0.0.4013")]
+[assembly: AssemblyVersion("3.0.0.4082")]
 [assembly: NeutralResourcesLanguageAttribute("en")]
diff --git a/Source/Tools/ChangelogMaker/ChangelogMaker.csproj b/Source/Tools/ChangelogMaker/ChangelogMaker.csproj
index d45095a14304c7596a90859dee1e4d0da8f965a2..ffab620e0a6b031b47898cc41ce4838203669a89 100755
--- a/Source/Tools/ChangelogMaker/ChangelogMaker.csproj
+++ b/Source/Tools/ChangelogMaker/ChangelogMaker.csproj
@@ -10,7 +10,7 @@
     <AppDesignerFolder>Properties</AppDesignerFolder>
     <RootNamespace>mxd.ChangelogMaker</RootNamespace>
     <AssemblyName>ChangelogMaker</AssemblyName>
-    <TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
+    <TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
     <FileAlignment>512</FileAlignment>
     <FileUpgradeFlags>
     </FileUpgradeFlags>
diff --git a/Source/Tools/ChangelogMaker/app.config b/Source/Tools/ChangelogMaker/app.config
index 3dbff35f484e2710a41c17e8c0ac67ff80f48f35..312bb3f26fc8f68b5fd13d453b440569165b9a49 100644
--- a/Source/Tools/ChangelogMaker/app.config
+++ b/Source/Tools/ChangelogMaker/app.config
@@ -1,3 +1,3 @@
 <?xml version="1.0" encoding="utf-8"?>
 <configuration>
-<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1"/></startup></configuration>
+<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2"/></startup></configuration>
diff --git a/Source/Tools/Updater/Updater.csproj b/Source/Tools/Updater/Updater.csproj
index ef5a91751a30f3b5362c0456d6a38dd38313a848..fe9c1136f4d5eb78e0a7752237ed75291c0a051a 100755
--- a/Source/Tools/Updater/Updater.csproj
+++ b/Source/Tools/Updater/Updater.csproj
@@ -15,7 +15,7 @@
     <OldToolsVersion>3.5</OldToolsVersion>
     <UpgradeBackupLocation>
     </UpgradeBackupLocation>
-    <TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
+    <TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
     <IsWebBootstrapper>false</IsWebBootstrapper>
     <ApplicationIcon>Updater.ico</ApplicationIcon>
     <PublishUrl>publish\</PublishUrl>
diff --git a/Source/Tools/Updater/app.config b/Source/Tools/Updater/app.config
index 3dbff35f484e2710a41c17e8c0ac67ff80f48f35..312bb3f26fc8f68b5fd13d453b440569165b9a49 100644
--- a/Source/Tools/Updater/app.config
+++ b/Source/Tools/Updater/app.config
@@ -1,3 +1,3 @@
 <?xml version="1.0" encoding="utf-8"?>
 <configuration>
-<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1"/></startup></configuration>
+<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2"/></startup></configuration>
diff --git a/Source/Tools/VersionFromEXE/VersionFromEXE.csproj b/Source/Tools/VersionFromEXE/VersionFromEXE.csproj
index 53b406acb4272115460b9fdce1ad0770b58accf3..6b66adb631923e8c7be026d0d6421b70460c0892 100755
--- a/Source/Tools/VersionFromEXE/VersionFromEXE.csproj
+++ b/Source/Tools/VersionFromEXE/VersionFromEXE.csproj
@@ -10,7 +10,7 @@
     <AppDesignerFolder>Properties</AppDesignerFolder>
     <RootNamespace>mxd.VersionFromEXE</RootNamespace>
     <AssemblyName>VersionFromEXE</AssemblyName>
-    <TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
+    <TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
     <FileAlignment>512</FileAlignment>
     <FileUpgradeFlags>
     </FileUpgradeFlags>
diff --git a/Source/Tools/VersionFromEXE/app.config b/Source/Tools/VersionFromEXE/app.config
index 3dbff35f484e2710a41c17e8c0ac67ff80f48f35..312bb3f26fc8f68b5fd13d453b440569165b9a49 100644
--- a/Source/Tools/VersionFromEXE/app.config
+++ b/Source/Tools/VersionFromEXE/app.config
@@ -1,3 +1,3 @@
 <?xml version="1.0" encoding="utf-8"?>
 <configuration>
-<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1"/></startup></configuration>
+<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2"/></startup></configuration>
diff --git a/Source/Tools/VersionFromSVN/VersionFromGIT.csproj b/Source/Tools/VersionFromSVN/VersionFromGIT.csproj
index 5fefdcbe706316237ce1d37c2ddf989aa4e41a09..fc969d4d92eeb6938661ba305488904c5532f3ac 100755
--- a/Source/Tools/VersionFromSVN/VersionFromGIT.csproj
+++ b/Source/Tools/VersionFromSVN/VersionFromGIT.csproj
@@ -10,7 +10,7 @@
     <AppDesignerFolder>Properties</AppDesignerFolder>
     <RootNamespace>mxd.VersionFromGIT</RootNamespace>
     <AssemblyName>VersionFromGIT</AssemblyName>
-    <TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
+    <TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
     <FileAlignment>512</FileAlignment>
     <FileUpgradeFlags>
     </FileUpgradeFlags>
@@ -91,11 +91,11 @@
   <PropertyGroup>
     <PostBuildEvent>copy $(TargetPath) $(ProjectDir)..\..\..</PostBuildEvent>
   </PropertyGroup>
-  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
-       Other similar extension points exist, see Microsoft.Common.targets.
-  <Target Name="BeforeBuild">
-  </Target>
-  <Target Name="AfterBuild">
-  </Target>
+  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
+       Other similar extension points exist, see Microsoft.Common.targets.
+  <Target Name="BeforeBuild">
+  </Target>
+  <Target Name="AfterBuild">
+  </Target>
   -->
 </Project>
\ No newline at end of file
diff --git a/Source/Tools/VersionFromSVN/app.config b/Source/Tools/VersionFromSVN/app.config
index 3dbff35f484e2710a41c17e8c0ac67ff80f48f35..312bb3f26fc8f68b5fd13d453b440569165b9a49 100644
--- a/Source/Tools/VersionFromSVN/app.config
+++ b/Source/Tools/VersionFromSVN/app.config
@@ -1,3 +1,3 @@
 <?xml version="1.0" encoding="utf-8"?>
 <configuration>
-<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1"/></startup></configuration>
+<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2"/></startup></configuration>
diff --git a/build_git_generic.cmd b/build_git_generic.cmd
index 1f29cb977430b639b8752def8487b61eebc1dfdd..7eaef2ba2f6b045a96342c055f7816934d5effa1 100755
--- a/build_git_generic.cmd
+++ b/build_git_generic.cmd
@@ -130,18 +130,18 @@ ECHO.
 
 IF NOT DEFINED BUILD_RELEASE GOTO PACKGIT
 
-set DEL_PATHSPEC="%DB_OUTDIR%\HVRBuilder-Setup*-%PLATFORM%.exe"
+set DEL_PATHSPEC="%DB_OUTDIR%\TSoHVR_HVRBuilder-Setup*-%PLATFORM%.exe"
 IF EXIST %DEL_PATHSPEC% DEL /F /Q %DEL_PATHSPEC% > NUL
 "%ISSDIR%\iscc.exe" "Setup\HVRbuilder_setup.iss"
 IF %ERRORLEVEL% NEQ 0 GOTO ERRORFAIL
 IF NOT EXIST "%DB_OUTDIR%\Setup.exe" GOTO FILEFAIL
 
-REN "%DB_OUTDIR%\Setup.exe" "HVRBuilder-Setup-R%REVISIONNUMBER%-%PLATFORM%.exe"
+REN "%DB_OUTDIR%\Setup.exe" "TSoHVR_HVRBuilder-Setup-R%REVISIONNUMBER%-%PLATFORM%.exe"
 
 GOTO BUILDDONE
 
 :PACKGIT
-SET DEL_PATHSPEC="%DB_OUTDIR%\HVRBuilder*-%PLATFORM%.7z"
+SET DEL_PATHSPEC="%DB_OUTDIR%\TSoHVR_HVRBuilder*-%PLATFORM%.7z"
 IF EXIST %DEL_PATHSPEC% DEL /F /Q %DEL_PATHSPEC% > NUL
 IF EXIST "%DB_OUTDIR%\UDB_Updater-%PLATFORM%.7z" DEL /F /Q "%DB_OUTDIR%\UDB_Updater-%PLATFORM%.7z" > NUL
 "%SEVENZIPDIR%\7z" a %DB_OUTDIR%\udb.7z .\Build\* -xr!*.xml -xr!JetBrains.Profiler.Core.Api.dll -xr!ScintillaNET.3.5.pdb -x!Setup
@@ -150,7 +150,7 @@ IF %ERRORLEVEL% NEQ 0 GOTO PACKFAIL
 IF NOT EXIST %DB_OUTDIR%\udb.7z GOTO FILEFAIL
 IF NOT EXIST %DB_OUTDIR%\UDB_Updater-%PLATFORM%.7z GOTO FILEFAIL
 
-REN "%DB_OUTDIR%\udb.7z" HVRBuilder-r%REVISIONNUMBER%-%PLATFORM%.7z
+REN "%DB_OUTDIR%\udb.7z" TSoHVR_HVRBuilder-r%REVISIONNUMBER%-%PLATFORM%.7z
 
 IF EXIST "Build\Changelog.txt" DEL /F /Q "Build\Changelog.txt" > NUL