diff --git a/Build/Scripting/ZDoom_ACS.cfg b/Build/Scripting/ZDoom_ACS.cfg
index 06edfd65..3f8e603d 100644
--- a/Build/Scripting/ZDoom_ACS.cfg
+++ b/Build/Scripting/ZDoom_ACS.cfg
@@ -367,6 +367,7 @@ keywords
SetCVar = "bool SetCVar(str cvar, int value)\nSets the value of a particular console variable.\nOnly mod-defined console variables through CVARINFO can be changed by using this function.\nReturns FALSE if cvar is invalid, or it is not writable.";
SetCVarString = "bool SetCVarString(str cvar, str value)\nSets the value of a particular console variable.\nOnly mod-defined console variables through CVARINFO can be changed by using this function.\nReturns FALSE if cvar is invalid, or it is not writable.";
SetFloorTrigger = "SetFloorTrigger(tag, height, special, arg1, arg2, arg3, arg4, arg5)";
+ SetFogDensity = "void SetFogDensity(int tag, int density)";
SetFont = "void SetFont(str fontlump)\nSets the current font (only within the script) to fontlump";
SetGlobalFogParameter = "SetGlobalFogParameter(property, value)";
SetGravity = "void SetGravity(fixed amount)\nThis function sets the global gravity of an entire level.\nDefault is 800.0";
@@ -387,6 +388,7 @@ keywords
SetPointer = "bool SetPointer(int assign_slot, int tid[, int pointer_selector[, int flags]])\nSet the value of one of the caller's stored pointers.";
SetResultValue = "void SetResultValue(int value)";
SetSectorDamage = "fixed SetSectorDamage(int tag, int amount, str damagetype, int interval, int leaky)";
+ SetSectorGlow = "void SetSectorGlow(int tag, int ceiling, int r, int g, int b, int height)";
SetSectorTerrain = "fixed SetSectorTerrain(int tag, int plane, str terraintype)";
SetSkyScrollSpeed = "void SetSkyScrollSpeed(int sky, fixed skyspeed)\nChanges the scrolling speed of a sky.\nThis is useful in conjunction with ChangeSky.\nsky: either 1 or 2.\nskyspeed: the desired scrolling speed.";
SetThingSpecial = "void SetThingSpecial(int tid, int special[, int arg0[, int arg1[, int arg2[, int arg3[, int arg4]]]]])\nSets the special for any things with the same TID.\nThis is similar to Thing_SetSpecial, except it can only be used from ACS,\nand it can set all of a thing's special arguments.\nIf tid is 0, then the activator is used.";
diff --git a/Source/Core/Editing/ClassicMode.cs b/Source/Core/Editing/ClassicMode.cs
index 821167e3..433dff3e 100644
--- a/Source/Core/Editing/ClassicMode.cs
+++ b/Source/Core/Editing/ClassicMode.cs
@@ -304,7 +304,9 @@ namespace CodeImp.DoomBuilder.Editing
General.Map.Graphics.RenderTarget.ClientSize.Height);
Vector2D clientscale = clientsize / renderer2d.Scale;
- int targetsize = (int)Math.Ceiling(Math.Min(clientscale.x, clientscale.y) / 32) * 8;
+
+ // Aim for 32 grid lines on screen, multiplied by 8 to support integer representation of 0.125 grid size (clientscale / 32 * 8)
+ int targetsize = (int)Math.Ceiling(Math.Min(clientscale.x, clientscale.y) / 4);
// Convert to nearest power of 2
targetsize--;
diff --git a/Source/Core/Editing/GridSetup.cs b/Source/Core/Editing/GridSetup.cs
index d91dfe9a..ff170296 100644
--- a/Source/Core/Editing/GridSetup.cs
+++ b/Source/Core/Editing/GridSetup.cs
@@ -46,9 +46,9 @@ namespace CodeImp.DoomBuilder.Editing
#region ================== Variables
// Grid
- private int gridsizei;
- private float gridsize;
- private float gridsizeinv;
+ private int gridsize;
+ private float gridsizef;
+ private float gridsizefinv;
// Background
private string background = "";
@@ -64,8 +64,8 @@ namespace CodeImp.DoomBuilder.Editing
#region ================== Properties
- public int GridSizeI { get { return gridsizei; } } //mxd
- public float GridSize { get { return gridsize; } }
+ public int GridSize { get { return gridsize; } } //mxd
+ public float GridSizeF { get { return gridsizef; } }
internal string BackgroundName { get { return background; } }
internal int BackgroundSource { get { return backsource; } }
internal ImageData Background { get { return backimage; } }
@@ -127,7 +127,7 @@ namespace CodeImp.DoomBuilder.Editing
cfg.WriteSetting(path + ".backoffsety", backoffsety);
cfg.WriteSetting(path + ".backscalex", (int)(backscalex * 100.0f));
cfg.WriteSetting(path + ".backscaley", (int)(backscaley * 100.0f));
- cfg.WriteSetting(path + ".gridsize", gridsize);
+ cfg.WriteSetting(path + ".gridsize", gridsizef);
}
// Read settings from configuration
@@ -140,10 +140,10 @@ namespace CodeImp.DoomBuilder.Editing
backoffsety = cfg.ReadSetting(path + ".backoffsety", 0);
backscalex = cfg.ReadSetting(path + ".backscalex", 100) / 100.0f;
backscaley = cfg.ReadSetting(path + ".backscaley", 100) / 100.0f;
- gridsize = cfg.ReadSetting(path + ".gridsize", DEFAULT_GRID_SIZE);
+ gridsizef = cfg.ReadSetting(path + ".gridsize", DEFAULT_GRID_SIZE);
// Setup
- SetGridSize(gridsize);
+ SetGridSize(gridsizef);
LinkBackground();
}
@@ -154,12 +154,12 @@ namespace CodeImp.DoomBuilder.Editing
size = Math.Max(size, ((General.Map != null && General.Map.UDMF) ? MINIMUM_GRID_SIZE_UDMF : MINIMUM_GRID_SIZE));
// Change grid
- gridsize = size;
- gridsizei = (int)Math.Max(1, Math.Round(gridsize)); //mxd
- gridsizeinv = 1f / gridsize;
+ gridsizef = size;
+ gridsize = (int)Math.Max(1, Math.Round(gridsizef)); //mxd
+ gridsizefinv = 1f / gridsizef;
// Update in main window
- General.MainWindow.UpdateGrid(gridsize);
+ General.MainWindow.UpdateGrid(gridsizef);
}
// This sets the background
@@ -214,19 +214,19 @@ namespace CodeImp.DoomBuilder.Editing
// This returns the next higher coordinate
public float GetHigher(float offset)
{
- return (float)Math.Round((offset + (gridsize * 0.5f)) * gridsizeinv) * gridsize;
+ return (float)Math.Round((offset + (gridsizef * 0.5f)) * gridsizefinv) * gridsizef;
}
// This returns the next lower coordinate
public float GetLower(float offset)
{
- return (float)Math.Round((offset - (gridsize * 0.5f)) * gridsizeinv) * gridsize;
+ return (float)Math.Round((offset - (gridsizef * 0.5f)) * gridsizefinv) * gridsizef;
}
// This snaps to the nearest grid coordinate
public Vector2D SnappedToGrid(Vector2D v)
{
- return SnappedToGrid(v, gridsize, gridsizeinv);
+ return SnappedToGrid(v, gridsizef, gridsizefinv);
}
// This snaps to the nearest grid coordinate
@@ -270,13 +270,13 @@ namespace CodeImp.DoomBuilder.Editing
{
//mxd. Not lower than 0.125 in UDMF or 1 otherwise
float preminsize = (General.Map.UDMF ? MINIMUM_GRID_SIZE_UDMF * 2 : MINIMUM_GRID_SIZE * 2);
- if(gridsize >= preminsize)
+ if(gridsizef >= preminsize)
{
//mxd. Disable automatic grid resizing
General.MainWindow.DisableDynamicGridResize();
// Change grid
- SetGridSize(gridsize / 2);
+ SetGridSize(gridsizef / 2);
// Redraw display
General.MainWindow.RedrawDisplay();
@@ -289,13 +289,13 @@ namespace CodeImp.DoomBuilder.Editing
internal void IncreaseGrid()
{
// Not higher than 1024
- if(gridsize <= 512)
+ if(gridsizef <= 512)
{
//mxd. Disable automatic grid resizing
General.MainWindow.DisableDynamicGridResize();
// Change grid
- SetGridSize(gridsize * 2);
+ SetGridSize(gridsizef * 2);
// Redraw display
General.MainWindow.RedrawDisplay();
diff --git a/Source/Core/Map/Linedef.cs b/Source/Core/Map/Linedef.cs
index 18bbd84f..99978cd3 100644
--- a/Source/Core/Map/Linedef.cs
+++ b/Source/Core/Map/Linedef.cs
@@ -936,7 +936,7 @@ namespace CodeImp.DoomBuilder.Map
float gx = General.Map.Grid.GetHigher(minx) + gridoffset.x;
if(gx < maxx)
{
- for(; gx < maxx; gx += General.Map.Grid.GridSize)
+ for(; gx < maxx; gx += General.Map.Grid.GridSizeF)
{
// Add intersection point at this x coordinate
float u = (gx - minx) / (maxx - minx);
@@ -951,7 +951,7 @@ namespace CodeImp.DoomBuilder.Map
float gy = General.Map.Grid.GetHigher(miny) + gridoffset.y;
if(gy < maxy)
{
- for(; gy < maxy; gy += General.Map.Grid.GridSize)
+ for(; gy < maxy; gy += General.Map.Grid.GridSizeF)
{
// Add intersection point at this y coordinate
float u = (gy - miny) / (maxy - miny);
diff --git a/Source/Core/Rendering/Renderer2D.cs b/Source/Core/Rendering/Renderer2D.cs
index d6109e31..6497ee00 100644
--- a/Source/Core/Rendering/Renderer2D.cs
+++ b/Source/Core/Rendering/Renderer2D.cs
@@ -813,7 +813,7 @@ namespace CodeImp.DoomBuilder.Rendering
private unsafe void RenderBackgroundGrid()
{
// Do we need to redraw grid?
- if(lastgridsize != General.Map.Grid.GridSize || lastgridscale != scale ||
+ if(lastgridsize != General.Map.Grid.GridSizeF || lastgridscale != scale ||
lastgridx != offsetx || lastgridy != offsety || drawmapcenter != lastdrawmapcenter)
{
// Lock background rendertarget memory
@@ -826,10 +826,10 @@ namespace CodeImp.DoomBuilder.Rendering
if(General.Settings.RenderGrid) //mxd
{
// Render normal grid
- RenderGrid(General.Map.Grid.GridSize, General.Colors.Grid, gridplotter);
+ RenderGrid(General.Map.Grid.GridSizeF, General.Colors.Grid, gridplotter);
// Render 64 grid
- if(General.Map.Grid.GridSize <= 64) RenderGrid(64f, General.Colors.Grid64, gridplotter);
+ if(General.Map.Grid.GridSizeF <= 64) RenderGrid(64f, General.Colors.Grid64, gridplotter);
}
else
{
@@ -858,7 +858,7 @@ namespace CodeImp.DoomBuilder.Rendering
backtex.UnlockRectangle(0);
lockedrect.Data.Dispose();
lastgridscale = scale;
- lastgridsize = General.Map.Grid.GridSize;
+ lastgridsize = General.Map.Grid.GridSizeF;
lastgridx = offsetx;
lastgridy = offsety;
lastdrawmapcenter = drawmapcenter; //mxd
diff --git a/Source/Core/VisualModes/VisualMode.cs b/Source/Core/VisualModes/VisualMode.cs
index 9b8c2aa7..7be148cd 100644
--- a/Source/Core/VisualModes/VisualMode.cs
+++ b/Source/Core/VisualModes/VisualMode.cs
@@ -438,25 +438,25 @@ namespace CodeImp.DoomBuilder.VisualModes
[BeginAction("movethingleft", BaseAction = true)]
protected void MoveSelectedThingsLeft()
{
- MoveSelectedThings(new Vector2D(0f, -General.Map.Grid.GridSize), false);
+ MoveSelectedThings(new Vector2D(0f, -General.Map.Grid.GridSizeF), false);
}
//mxd
[BeginAction("movethingright", BaseAction = true)]
protected void MoveSelectedThingsRight()
{
- MoveSelectedThings(new Vector2D(0f, General.Map.Grid.GridSize), false);
+ MoveSelectedThings(new Vector2D(0f, General.Map.Grid.GridSizeF), false);
}
//mxd
[BeginAction("movethingfwd", BaseAction = true)]
protected void MoveSelectedThingsForward()
{
- MoveSelectedThings(new Vector2D(-General.Map.Grid.GridSize, 0f), false);
+ MoveSelectedThings(new Vector2D(-General.Map.Grid.GridSizeF, 0f), false);
}
//mxd
[BeginAction("movethingback", BaseAction = true)]
protected void MoveSelectedThingsBackward()
{
- MoveSelectedThings(new Vector2D(General.Map.Grid.GridSize, 0f), false);
+ MoveSelectedThings(new Vector2D(General.Map.Grid.GridSizeF, 0f), false);
}
//mxd
diff --git a/Source/Core/Windows/GridSetupForm.cs b/Source/Core/Windows/GridSetupForm.cs
index 65477cad..d977d42e 100644
--- a/Source/Core/Windows/GridSetupForm.cs
+++ b/Source/Core/Windows/GridSetupForm.cs
@@ -40,7 +40,7 @@ namespace CodeImp.DoomBuilder.Windows
InitializeComponent();
// Show grid size
- gridsize.Text = General.Map.Grid.GridSize.ToString();
+ gridsize.Text = General.Map.Grid.GridSizeF.ToString();
// Background image?
if((General.Map.Grid.Background != null) &&
@@ -141,8 +141,8 @@ namespace CodeImp.DoomBuilder.Windows
private void apply_Click(object sender, EventArgs e)
{
//mxd. Apply
- float newgridsize = gridsize.GetResultFloat(General.Map.Grid.GridSize);
- if(newgridsize != General.Map.Grid.GridSize)
+ float newgridsize = gridsize.GetResultFloat(General.Map.Grid.GridSizeF);
+ if(newgridsize != General.Map.Grid.GridSizeF)
{
//Disable automatic grid resizing
General.MainWindow.DisableDynamicGridResize();
diff --git a/Source/Core/Windows/MainForm.cs b/Source/Core/Windows/MainForm.cs
index a031c8f3..d6c68b9d 100644
--- a/Source/Core/Windows/MainForm.cs
+++ b/Source/Core/Windows/MainForm.cs
@@ -753,7 +753,7 @@ namespace CodeImp.DoomBuilder.Windows
configlabel.Text = General.Map.Config.Name;
//mxd. Raise grid size to 1 if it was lower and the map isn't in UDMF
- if(!General.Map.UDMF && General.Map.Grid.GridSize < GridSetup.MINIMUM_GRID_SIZE)
+ if(!General.Map.UDMF && General.Map.Grid.GridSizeF < GridSetup.MINIMUM_GRID_SIZE)
General.Map.Grid.SetGridSize(GridSetup.MINIMUM_GRID_SIZE);
}
else
diff --git a/Source/Core/Windows/ThingEditForm.cs b/Source/Core/Windows/ThingEditForm.cs
index 141e8ce4..834c2a97 100644
--- a/Source/Core/Windows/ThingEditForm.cs
+++ b/Source/Core/Windows/ThingEditForm.cs
@@ -173,9 +173,9 @@ namespace CodeImp.DoomBuilder.Windows
posX.Text = ((int)ft.Position.x).ToString();
posY.Text = ((int)ft.Position.y).ToString();
posZ.Text = (useabsoluteheight ? ((int)Math.Round(ft.Position.z + floorheight)).ToString() : ((int)ft.Position.z).ToString());
- posX.ButtonStep = General.Map.Grid.GridSizeI;
- posY.ButtonStep = General.Map.Grid.GridSizeI;
- posZ.ButtonStep = General.Map.Grid.GridSizeI;
+ posX.ButtonStep = General.Map.Grid.GridSize;
+ posY.ButtonStep = General.Map.Grid.GridSize;
+ posZ.ButtonStep = General.Map.Grid.GridSize;
//mxd
thinginfo = General.Map.Data.GetThingInfoEx(ft.Type);
diff --git a/Source/Core/Windows/ThingEditFormUDMF.cs b/Source/Core/Windows/ThingEditFormUDMF.cs
index 561ee40c..1b925b99 100644
--- a/Source/Core/Windows/ThingEditFormUDMF.cs
+++ b/Source/Core/Windows/ThingEditFormUDMF.cs
@@ -197,9 +197,9 @@ namespace CodeImp.DoomBuilder.Windows
posX.Text = (ft.Position.x).ToString();
posY.Text = (ft.Position.y).ToString();
posZ.Text = (useabsoluteheight ? ((float)Math.Round(ft.Position.z + floorheight, General.Map.FormatInterface.VertexDecimals)).ToString() : (ft.Position.z).ToString());
- posX.ButtonStep = General.Map.Grid.GridSizeI;
- posY.ButtonStep = General.Map.Grid.GridSizeI;
- posZ.ButtonStep = General.Map.Grid.GridSizeI;
+ posX.ButtonStep = General.Map.Grid.GridSize;
+ posY.ButtonStep = General.Map.Grid.GridSize;
+ posZ.ButtonStep = General.Map.Grid.GridSize;
//mxd. User vars. Should be done before adding regular fields
ThingTypeInfo fti = General.Map.Data.GetThingInfoEx(ft.Type);
diff --git a/Source/Plugins/BuilderModes/ClassicModes/DrawEllipseMode.cs b/Source/Plugins/BuilderModes/ClassicModes/DrawEllipseMode.cs
index 36bdb4ab..4213930d 100644
--- a/Source/Plugins/BuilderModes/ClassicModes/DrawEllipseMode.cs
+++ b/Source/Plugins/BuilderModes/ClassicModes/DrawEllipseMode.cs
@@ -282,7 +282,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
{
if(points.Count < 2 || currentbevelwidth == bevelwidth || bevelwidth < 0)
{
- bevelwidth = Math.Min(bevelwidth + General.Map.Grid.GridSizeI, panel.MaxSpikiness);
+ bevelwidth = Math.Min(bevelwidth + General.Map.Grid.GridSize, panel.MaxSpikiness);
panel.Spikiness = bevelwidth;
Update();
}
@@ -292,7 +292,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
{
if(bevelwidth > 0 || currentbevelwidth <= bevelwidth + 1)
{
- bevelwidth = Math.Max(bevelwidth - General.Map.Grid.GridSizeI, panel.MinSpikiness);
+ bevelwidth = Math.Max(bevelwidth - General.Map.Grid.GridSize, panel.MinSpikiness);
panel.Spikiness = bevelwidth;
Update();
}
diff --git a/Source/Plugins/BuilderModes/ClassicModes/DrawGridMode.cs b/Source/Plugins/BuilderModes/ClassicModes/DrawGridMode.cs
index 59160f67..34c3b42f 100644
--- a/Source/Plugins/BuilderModes/ClassicModes/DrawGridMode.cs
+++ b/Source/Plugins/BuilderModes/ClassicModes/DrawGridMode.cs
@@ -353,18 +353,18 @@ namespace CodeImp.DoomBuilder.BuilderModes
break;
case GridLockMode.HORIZONTAL:
- slicesH = width / General.Map.Grid.GridSizeI;
+ slicesH = width / General.Map.Grid.GridSize;
slicesV = verticalslices;
break;
case GridLockMode.VERTICAL:
slicesH = horizontalslices;
- slicesV = height / General.Map.Grid.GridSizeI;
+ slicesV = height / General.Map.Grid.GridSize;
break;
case GridLockMode.BOTH:
- slicesH = width / General.Map.Grid.GridSizeI;
- slicesV = height / General.Map.Grid.GridSizeI;
+ slicesH = width / General.Map.Grid.GridSize;
+ slicesV = height / General.Map.Grid.GridSize;
break;
}
@@ -444,7 +444,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
// Triangulate?
if(triangulate)
{
- bool startflip = ((int)Math.Round(((s.x + e.y) / General.Map.Grid.GridSize) % 2) == 0);
+ bool startflip = ((int)Math.Round(((s.x + e.y) / General.Map.Grid.GridSizeF) % 2) == 0);
bool flip = startflip;
for(int w = 0; w < slicesH; w++)
diff --git a/Source/Plugins/BuilderModes/ClassicModes/DrawRectangleMode.cs b/Source/Plugins/BuilderModes/ClassicModes/DrawRectangleMode.cs
index 70d7a197..856c508a 100644
--- a/Source/Plugins/BuilderModes/ClassicModes/DrawRectangleMode.cs
+++ b/Source/Plugins/BuilderModes/ClassicModes/DrawRectangleMode.cs
@@ -515,7 +515,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
{
if(points.Count < 2 || currentbevelwidth == bevelwidth || bevelwidth < 0)
{
- bevelwidth = Math.Min(bevelwidth + General.Map.Grid.GridSizeI, panel.MaxBevelWidth);
+ bevelwidth = Math.Min(bevelwidth + General.Map.Grid.GridSize, panel.MaxBevelWidth);
panel.BevelWidth = bevelwidth;
Update();
}
@@ -526,7 +526,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
{
if(currentbevelwidth == bevelwidth || bevelwidth > 0)
{
- bevelwidth = Math.Max(bevelwidth - General.Map.Grid.GridSizeI, panel.MinBevelWidth);
+ bevelwidth = Math.Max(bevelwidth - General.Map.Grid.GridSize, panel.MinBevelWidth);
panel.BevelWidth = bevelwidth;
Update();
}
diff --git a/Source/Plugins/BuilderModes/VisualModes/BaseVisualGeometrySector.cs b/Source/Plugins/BuilderModes/VisualModes/BaseVisualGeometrySector.cs
index 2bd1f97c..07a1b142 100644
--- a/Source/Plugins/BuilderModes/VisualModes/BaseVisualGeometrySector.cs
+++ b/Source/Plugins/BuilderModes/VisualModes/BaseVisualGeometrySector.cs
@@ -191,9 +191,9 @@ namespace CodeImp.DoomBuilder.BuilderModes
deltax = prevoffsetx - newoffsetx;
deltay = prevoffsety - newoffsety;
- if(Math.Abs(deltax) >= General.Map.Grid.GridSizeI)
+ if(Math.Abs(deltax) >= General.Map.Grid.GridSize)
{
- deltax = General.Map.Grid.GridSizeI * Math.Sign(deltax);
+ deltax = General.Map.Grid.GridSize * Math.Sign(deltax);
prevoffsetx = newoffsetx;
}
else
@@ -201,9 +201,9 @@ namespace CodeImp.DoomBuilder.BuilderModes
deltax = 0;
}
- if(Math.Abs(deltay) >= General.Map.Grid.GridSizeI)
+ if(Math.Abs(deltay) >= General.Map.Grid.GridSize)
{
- deltay = General.Map.Grid.GridSizeI * Math.Sign(deltay);
+ deltay = General.Map.Grid.GridSize * Math.Sign(deltay);
prevoffsety = newoffsety;
}
else
diff --git a/Source/Plugins/BuilderModes/VisualModes/BaseVisualGeometrySidedef.cs b/Source/Plugins/BuilderModes/VisualModes/BaseVisualGeometrySidedef.cs
index 6bf98291..d6037d18 100644
--- a/Source/Plugins/BuilderModes/VisualModes/BaseVisualGeometrySidedef.cs
+++ b/Source/Plugins/BuilderModes/VisualModes/BaseVisualGeometrySidedef.cs
@@ -1359,9 +1359,9 @@ namespace CodeImp.DoomBuilder.BuilderModes
int dx = prevoffsetx - newoffsetx;
int dy = prevoffsety - newoffsety;
- if(Math.Abs(dx) >= General.Map.Grid.GridSizeI)
+ if(Math.Abs(dx) >= General.Map.Grid.GridSize)
{
- dx = General.Map.Grid.GridSizeI * Math.Sign(dx);
+ dx = General.Map.Grid.GridSize * Math.Sign(dx);
prevoffsetx = newoffsetx;
}
else
@@ -1369,9 +1369,9 @@ namespace CodeImp.DoomBuilder.BuilderModes
dx = 0;
}
- if(Math.Abs(dy) >= General.Map.Grid.GridSizeI)
+ if(Math.Abs(dy) >= General.Map.Grid.GridSize)
{
- dy = General.Map.Grid.GridSizeI * Math.Sign(dy);
+ dy = General.Map.Grid.GridSize * Math.Sign(dy);
prevoffsety = newoffsety;
}
else
diff --git a/Source/Plugins/BuilderModes/VisualModes/BaseVisualMode.cs b/Source/Plugins/BuilderModes/VisualModes/BaseVisualMode.cs
index 96b8b0e2..86532ab5 100644
--- a/Source/Plugins/BuilderModes/VisualModes/BaseVisualMode.cs
+++ b/Source/Plugins/BuilderModes/VisualModes/BaseVisualMode.cs
@@ -2665,10 +2665,10 @@ namespace CodeImp.DoomBuilder.BuilderModes
[BeginAction("movetextureright8")] public void MoveTextureRight8() { MoveTextureByOffset(8, 0); }
[BeginAction("movetextureup8")] public void MoveTextureUp8() { MoveTextureByOffset(0, -8); }
[BeginAction("movetexturedown8")] public void MoveTextureDown8() { MoveTextureByOffset(0, 8); }
- [BeginAction("movetextureleftgs")] public void MoveTextureLeftGrid() { MoveTextureByOffset(-General.Map.Grid.GridSizeI, 0); } //mxd
- [BeginAction("movetexturerightgs")] public void MoveTextureRightGrid() { MoveTextureByOffset(General.Map.Grid.GridSizeI, 0); } //mxd
- [BeginAction("movetextureupgs")] public void MoveTextureUpGrid() { MoveTextureByOffset(0, -General.Map.Grid.GridSizeI); } //mxd
- [BeginAction("movetexturedowngs")] public void MoveTextureDownGrid() { MoveTextureByOffset(0, General.Map.Grid.GridSizeI); } //mxd
+ [BeginAction("movetextureleftgs")] public void MoveTextureLeftGrid() { MoveTextureByOffset(-General.Map.Grid.GridSize, 0); } //mxd
+ [BeginAction("movetexturerightgs")] public void MoveTextureRightGrid() { MoveTextureByOffset(General.Map.Grid.GridSize, 0); } //mxd
+ [BeginAction("movetextureupgs")] public void MoveTextureUpGrid() { MoveTextureByOffset(0, -General.Map.Grid.GridSize); } //mxd
+ [BeginAction("movetexturedowngs")] public void MoveTextureDownGrid() { MoveTextureByOffset(0, General.Map.Grid.GridSize); } //mxd
//mxd
private void MoveTextureByOffset(int ox, int oy)
diff --git a/Source/Plugins/CommentsPanel/CommentsPanel.csproj b/Source/Plugins/CommentsPanel/CommentsPanel.csproj
index 4be81555..a17960e5 100644
--- a/Source/Plugins/CommentsPanel/CommentsPanel.csproj
+++ b/Source/Plugins/CommentsPanel/CommentsPanel.csproj
@@ -145,6 +145,7 @@
+