diff --git a/Build/Compilers/ZDoom/zdefs.acs b/Build/Compilers/ZDoom/zdefs.acs
index e5ea3b20c59f610ef697e72696d8ff3bcbd48305..ac8fc815f189f5c8818c21ea55a50e9ce0929ca0 100644
--- a/Build/Compilers/ZDoom/zdefs.acs
+++ b/Build/Compilers/ZDoom/zdefs.acs
@@ -958,6 +958,12 @@
 #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 BLOCKF_CREATURES 1
 #define BLOCKF_MONSTERS 2
diff --git a/Build/Compilers/ZDoom/zspecial.acs b/Build/Compilers/ZDoom/zspecial.acs
index 023f1b3c7e9c0ec827c2dcdc664135dc74ee3bd4..0030ff5c9a46810a785def8313f6dd458f62c527 100644
--- a/Build/Compilers/ZDoom/zspecial.acs
+++ b/Build/Compilers/ZDoom/zspecial.acs
@@ -337,8 +337,10 @@ special
 	-91:QuakeEx(8,12),
 	-92:Warp(6,11),
 	-93:GetMaxInventory(2),
-	-94:SetSectorDamage(2,6),
-
+	-94:SetSectorDamage(2,5),
+	-95:SetSectorTerrain(3),
+	-96:SpawnParticle(1,15),
+	
 	// Zandronum's
 	-100:ResetMap(0),
 	-101:PlayerIsSpectator(1),
diff --git a/Build/Scripting/ZDoom_ACS.cfg b/Build/Scripting/ZDoom_ACS.cfg
index ea8a23b4148a734d40a662fec9949a29c50564cc..e932dad6990dd4a850f65438db082e559939a8c9 100644
--- a/Build/Scripting/ZDoom_ACS.cfg
+++ b/Build/Scripting/ZDoom_ACS.cfg
@@ -409,6 +409,7 @@ keywords
 	Spawn = "int Spawn(str classname, fixed x, fixed y, fixed z[, int tid[, int angle]])\nSpawns an actor at the given X, Y and Z coordinates.\nOptionally a TID and a byte angle can be specified.";
 	SpawnForced = "int SpawnForced(str classname, fixed x, fixed y, fixed z[, int tid[, int angle]])\nForces the actor to spawn, even in conditions where the spawning would normally fail.\nThe return value is the number of things spawned.";
 	SpawnDecal = "int SpawnDecal(int tid, str decalname, int flags[, fixed angle = 0.0[, fixed zoffset = 0.0[, fixed distance = 64.0]]])\nCreates a decal on a wall by tracing a line from the actor with the\nspecified tid until hitting said wall, on which the decal is then created.\nIf tid is 0, the tracing is done from the activator of the script.\ndecalname: The name of the decal to create, as defined in DECALDEF.\nflags: use SDF_ flags\nThe return value of the function is the number of decals spawned.";
+	SpawnParticle = "void SpawnParticle(float offx, float offy, float offz, float velx, float vely, float velz, color color1, int lifetime[, bool fullbright = false[, float startalpha = 1.0[, int size = 1[, float fadestep = -1[, float accelx = 0[, float accely = 0[, float accelz = 0]]]]]]])";
 	SpawnProjectile = "void SpawnProjectile(int tid, str type, int angle, int speed, int vspeed, int gravity, int newtid)";
 	SpawnSpot = "int SpawnSpot(str classname, int spottid[, int tid[, int angle]])\nRequires a MapSpot at the location where you want the Actor to spawn.\nThe return value is the number of things spawned.";
 	SpawnSpotFacing = "int SpawnSpotFacing(str classname, int spottid[, int tid])\nRequires a MapSpot at the location where you want the Actor to spawn.\nThe thing will assume the angle of the mapspot it is spawned to.\nThe return value is the number of things spawned.";
@@ -954,10 +955,16 @@ constants
 	SCROLL_AND_CARRY;
 	SDF_ABSANGLE;
 	SDF_PERMANENT;
+	SECF_DMGENDGODMODE;
+	SECF_DMGENDLEVEL;
+	SECF_DMGTERRAINFX;
 	SECF_FLOORDROP;
+	SECF_FRICTION;
 	SECF_NOFALLINGDAMAGE;
 	SECF_NORESPAWN;
+	SECF_PUSH;
 	SECF_SILENT;
+	SECF_SILENTMOVE;
 	SECSEQ_CEILING;
 	SECSEQ_FLOOR;
 	SECSEQ_FULLHEIGHT;
diff --git a/Build/Scripting/ZDoom_DECORATE.cfg b/Build/Scripting/ZDoom_DECORATE.cfg
index 6f302555e0a26f12c51726ee2d2a1918068f38c4..712c31a85c4f207a0a0711682bef0f9555dd1210 100644
--- a/Build/Scripting/ZDoom_DECORATE.cfg
+++ b/Build/Scripting/ZDoom_DECORATE.cfg
@@ -120,6 +120,7 @@ keywords
 	A_SpawnDebris = "A_SpawnDebris(str type[, bool translation = false[, float horizontal_vel = 1.0[, float vertical_vel = 1.0]]])";
 	A_SpawnItem = "A_SpawnItem(str type, int distance, float zpos, bool useammo, bool translation)";
 	A_SpawnItemEx = "A_SpawnItemEx(str type[, float xoffset = 0.0[, float yoffset = 0.0[, float zoffset = 0.0[, float xvelocity = 0.0[, float yvelocity = 0.0[, float zvelocity = 0.0[, float angle = 0.0[, int flags = 0[, int skipchance = 0[, int tid = 0]]]]]]]]]])";
+	A_SpawnParticle = "A_SpawnParticle(float offx, float offy, float offz, float velx, float vely, float velz, color color1, int lifetime[, bool fullbright = false[, float startalpha = 1.0[, int size = 1[, float fadestep = -1[, float accelx = 0[, float accely = 0[, float accelz = 0]]]]]]])";
 //State jumps
 	A_CheckBlock = "A_CheckBlock(str block[, int flags = 0[, int pointer = AAPTR_TARGET]])";
 	A_CheckCeiling = "A_CheckCeiling(int offset OR str state)";
diff --git a/Source/Core/Windows/VertexEditForm.cs b/Source/Core/Windows/VertexEditForm.cs
index ff5306e8b63a9718c8357c116287f25dd7446cd2..3630163a64f84297ebae2681feb7b6f6b613ded0 100644
--- a/Source/Core/Windows/VertexEditForm.cs
+++ b/Source/Core/Windows/VertexEditForm.cs
@@ -211,32 +211,26 @@ namespace CodeImp.DoomBuilder.Windows
 		{
 			if(preventchanges) return;
 			MakeUndo();
-			int i = 0;
 
-			//restore values
+			// Restore values
 			if(string.IsNullOrEmpty(positionx.Text)) 
 			{
 				// Apply position
+				int i = 0;
 				foreach(Vertex v in vertices) v.Move(new Vector2D(vertexprops[i++].X, v.Position.y));
-			} 
-			else //update values
+			}
+			// Update values
+			else 
 			{ 
-				// Verify the coordinates
-				float px = positionx.GetResultFloat(vertexprops[i].X);
-				if(px < General.Map.FormatInterface.MinCoordinate) 
-				{
-					positionx.Text = General.Map.FormatInterface.MinCoordinate.ToString();
-					return;
-				} 
-				
-				if(px > General.Map.FormatInterface.MaxCoordinate) 
+				int i = 0;
+				foreach(Vertex v in vertices)
 				{
-					positionx.Text = General.Map.FormatInterface.MaxCoordinate.ToString();
-					return;
-				}
+					// Verify the coordinates
+					float px = positionx.GetResultFloat(vertexprops[i++].X);
 
-				// Apply position
-				foreach(Vertex v in vertices) v.Move(new Vector2D(px, v.Position.y));
+					// Apply new position
+					v.Move(new Vector2D(Math.Max(General.Map.FormatInterface.MinCoordinate, Math.Min(General.Map.FormatInterface.MaxCoordinate, px)), v.Position.y));
+				}
 			}
 
 			General.Map.IsChanged = true;
@@ -247,32 +241,26 @@ namespace CodeImp.DoomBuilder.Windows
 		{
 			if(preventchanges) return;
 			MakeUndo();
-			int i = 0;
 
-			//restore values
+			// Restore values
 			if(string.IsNullOrEmpty(positiony.Text)) 
 			{
 				// Apply position
+				int i = 0;
 				foreach(Vertex v in vertices) v.Move(new Vector2D(v.Position.x, vertexprops[i++].Y));
-			} 
-			else //update values
+			}
+			// Update values
+			else 
 			{ 
-				// Verify the coordinates
-				float py = positiony.GetResultFloat(vertexprops[i].Y);
-				if(py < General.Map.FormatInterface.MinCoordinate) 
-				{
-					positiony.Text = General.Map.FormatInterface.MinCoordinate.ToString();
-					return;
-				} 
-				
-				if(py > General.Map.FormatInterface.MaxCoordinate) 
+				int i = 0;
+				foreach(Vertex v in vertices)
 				{
-					positiony.Text = General.Map.FormatInterface.MaxCoordinate.ToString();
-					return;
-				}
+					// Verify the coordinates
+					float py = positiony.GetResultFloat(vertexprops[i++].Y);
 
-				// Apply position
-				foreach(Vertex v in vertices) v.Move(new Vector2D(v.Position.x, py));
+					// Apply new position
+					v.Move(new Vector2D(v.Position.x, Math.Max(General.Map.FormatInterface.MinCoordinate, Math.Min(General.Map.FormatInterface.MaxCoordinate, py))));
+				}
 			}
 
 			General.Map.IsChanged = true;