Fixed, Visual mode: "Rotate CW"/"Rotate CCW" actions should update thing-based effects when used on Things.

Added/restored, Visual mode: restored "Move Texture Left/Right/Up/Down by 8" actions, added "Move Texture Left/Right/Up/Down by Grid Size" actions (default keys are Ctrl+arrow keys).
Fixed, Game configurations: Hexen's Bell actor was missing "hangs" flag.
This commit is contained in:
MaxED 2016-05-02 15:01:13 +00:00
parent 7ab53d7ef3
commit f66521e7be
4 changed files with 102 additions and 68 deletions

View file

@ -666,6 +666,7 @@ obstacles
title = "Bell";
sprite = "BBLLA0";
width = 56;
hangs = 1;
}
103
{

View file

@ -547,7 +547,7 @@ namespace CodeImp.DoomBuilder.Config
// Skip sprites with strange names
if(sprite.Length != 6 && sprite.Length != 8)
{
General.ErrorLogger.Add(ErrorType.Error, "Error in actor \"" + title + "\":" + index + ". Unsupported sprite name fromat: \"" + sprite + "\"");
General.ErrorLogger.Add(ErrorType.Error, "Error in actor \"" + title + "\":" + index + ". Missing sprite or unsupported sprite name format :\"" + sprite.ToUpperInvariant() + "\"");
return;
}

View file

@ -725,9 +725,9 @@ movetexturedown
movetextureleft8
{
title = "Move Texture Left by cur. grid size";
title = "Move Texture Left by 8";
category = "visual";
description = "Moves the offset of the targeted or selected textures to the left by current grid size.";
description = "Moves the offset of the targeted or selected textures to the left by 8 pixels.";
allowkeys = true;
allowmouse = true;
allowscroll = true;
@ -737,9 +737,9 @@ movetextureleft8
movetextureright8
{
title = "Move Texture Right by cur. grid size";
title = "Move Texture Right by 8";
category = "visual";
description = "Moves the offset of the targeted or selected textures to the right by current grid size.";
description = "Moves the offset of the targeted or selected textures to the right by 8 pixels.";
allowkeys = true;
allowmouse = true;
allowscroll = true;
@ -749,9 +749,9 @@ movetextureright8
movetextureup8
{
title = "Move Texture Up by cur. grid size";
title = "Move Texture Up by 8";
category = "visual";
description = "Moves the offset of the targeted or selected textures up by current grid size.";
description = "Moves the offset of the targeted or selected textures up by 8 pixels.";
allowkeys = true;
allowmouse = true;
allowscroll = true;
@ -761,14 +761,66 @@ movetextureup8
movetexturedown8
{
title = "Move Texture Down by cur. grid size";
title = "Move Texture Down by 8";
category = "visual";
description = "Moves the offset of the targeted or selected textures down by 8 pixels.";
allowkeys = true;
allowmouse = true;
allowscroll = true;
repeat = true;
default = 65576;
}
//mxd
movetextureleftgs
{
title = "Move Texture Left by Grid Size";
category = "visual";
description = "Moves the offset of the targeted or selected textures to the left by current grid size.";
allowkeys = true;
allowmouse = true;
allowscroll = true;
repeat = true;
default = 131109;
}
//mxd
movetexturerightgs
{
title = "Move Texture Right by Grid Size";
category = "visual";
description = "Moves the offset of the targeted or selected textures to the right by current grid size.";
allowkeys = true;
allowmouse = true;
allowscroll = true;
repeat = true;
default = 131111;
}
//mxd
movetextureupgs
{
title = "Move Texture Up by Grid Size";
category = "visual";
description = "Moves the offset of the targeted or selected textures up by current grid size.";
allowkeys = true;
allowmouse = true;
allowscroll = true;
repeat = true;
default = 131110;
}
//mxd
movetexturedowngs
{
title = "Move Texture Down by Grid Size";
category = "visual";
description = "Moves the offset of the targeted or selected textures down by current grid size.";
allowkeys = true;
allowmouse = true;
allowscroll = true;
repeat = true;
default = 65576;
default = 131112;
}
//mxd

View file

@ -2559,82 +2559,48 @@ namespace CodeImp.DoomBuilder.BuilderModes
}
[BeginAction("movetextureleft")]
public void MoveTextureLeft1()
{
PreAction(UndoGroup.TextureOffsetChange);
List<IVisualEventReceiver> objs = GetSelectedObjects(true, true, false, false);
if(!General.Map.UDMF) objs = RemoveDuplicateSidedefs(objs); //mxd
foreach(IVisualEventReceiver i in objs) i.OnChangeTextureOffset(-1, 0, true);
PostAction();
}
public void MoveTextureLeft1() { MoveTextureByOffset(-1, 0); }
[BeginAction("movetextureright")]
public void MoveTextureRight1()
{
PreAction(UndoGroup.TextureOffsetChange);
List<IVisualEventReceiver> objs = GetSelectedObjects(true, true, false, false);
if(!General.Map.UDMF) objs = RemoveDuplicateSidedefs(objs); //mxd
foreach(IVisualEventReceiver i in objs) i.OnChangeTextureOffset(1, 0, true);
PostAction();
}
public void MoveTextureRight1() { MoveTextureByOffset(1, 0); }
[BeginAction("movetextureup")]
public void MoveTextureUp1()
{
PreAction(UndoGroup.TextureOffsetChange);
List<IVisualEventReceiver> objs = GetSelectedObjects(true, true, false, false);
if(!General.Map.UDMF) objs = RemoveDuplicateSidedefs(objs); //mxd
foreach(IVisualEventReceiver i in objs) i.OnChangeTextureOffset(0, -1, true);
PostAction();
}
public void MoveTextureUp1() { MoveTextureByOffset(0, -1); }
[BeginAction("movetexturedown")]
public void MoveTextureDown1()
{
PreAction(UndoGroup.TextureOffsetChange);
List<IVisualEventReceiver> objs = GetSelectedObjects(true, true, false, false);
if(!General.Map.UDMF) objs = RemoveDuplicateSidedefs(objs); //mxd
foreach(IVisualEventReceiver i in objs) i.OnChangeTextureOffset(0, 1, true);
PostAction();
}
public void MoveTextureDown1() { MoveTextureByOffset(0, 1); }
[BeginAction("movetextureleft8")]
public void MoveTextureLeft8()
{
PreAction(UndoGroup.TextureOffsetChange);
List<IVisualEventReceiver> objs = GetSelectedObjects(true, true, false, false);
if(!General.Map.UDMF) objs = RemoveDuplicateSidedefs(objs); //mxd
foreach(IVisualEventReceiver i in objs) i.OnChangeTextureOffset(-General.Map.Grid.GridSize, 0, true);
PostAction();
}
public void MoveTextureLeft8() { MoveTextureByOffset(-8, 0); }
[BeginAction("movetextureright8")]
public void MoveTextureRight8()
{
PreAction(UndoGroup.TextureOffsetChange);
List<IVisualEventReceiver> objs = GetSelectedObjects(true, true, false, false);
if(!General.Map.UDMF) objs = RemoveDuplicateSidedefs(objs); //mxd
foreach(IVisualEventReceiver i in objs) i.OnChangeTextureOffset(General.Map.Grid.GridSize, 0, true);
PostAction();
}
public void MoveTextureRight8() { MoveTextureByOffset(8, 0); }
[BeginAction("movetextureup8")]
public void MoveTextureUp8()
{
PreAction(UndoGroup.TextureOffsetChange);
List<IVisualEventReceiver> objs = GetSelectedObjects(true, true, false, false);
if(!General.Map.UDMF) objs = RemoveDuplicateSidedefs(objs); //mxd
foreach(IVisualEventReceiver i in objs) i.OnChangeTextureOffset(0, -General.Map.Grid.GridSize, true);
PostAction();
}
public void MoveTextureUp8() { MoveTextureByOffset(0, -8); }
[BeginAction("movetexturedown8")]
public void MoveTextureDown8()
public void MoveTextureDown8() { MoveTextureByOffset(0, 8); }
[BeginAction("movetextureleftgs")] //mxd
public void MoveTextureLeftGrid() { MoveTextureByOffset(-General.Map.Grid.GridSize, 0); }
[BeginAction("movetexturerightgs")] //mxd
public void MoveTextureRightGrid() { MoveTextureByOffset(General.Map.Grid.GridSize, 0); }
[BeginAction("movetextureupgs")] //mxd
public void MoveTextureUpGrid() { MoveTextureByOffset(0, -General.Map.Grid.GridSize); }
[BeginAction("movetexturedowngs")] //mxd
public void MoveTextureDownGrid() { MoveTextureByOffset(0, General.Map.Grid.GridSize); }
//mxd
private void MoveTextureByOffset(int ox, int oy)
{
PreAction(UndoGroup.TextureOffsetChange);
List<IVisualEventReceiver> objs = GetSelectedObjects(true, true, false, false);
if(!General.Map.UDMF) objs = RemoveDuplicateSidedefs(objs); //mxd
foreach(IVisualEventReceiver i in objs) i.OnChangeTextureOffset(0, General.Map.Grid.GridSize, true);
if(!General.Map.UDMF) objs = RemoveDuplicateSidedefs(objs);
foreach(IVisualEventReceiver i in objs) i.OnChangeTextureOffset(ox, oy, true);
PostAction();
}
@ -3247,6 +3213,21 @@ namespace CodeImp.DoomBuilder.BuilderModes
{
BaseVisualThing t = (BaseVisualThing)obj;
t.SetAngle(General.ClampAngle(t.Thing.AngleDoom + increment));
// Visual sectors may be affected by this thing...
if(thingdata.ContainsKey(t.Thing))
{
// Update what must be updated
ThingData td = GetThingData(t.Thing);
foreach(KeyValuePair<Sector, bool> s in td.UpdateAlso)
{
if(VisualSectorExists(s.Key))
{
BaseVisualSector vs = (BaseVisualSector)GetVisualSector(s.Key);
vs.UpdateSectorGeometry(s.Value);
}
}
}
}
else if(obj is VisualFloor)
{