Slope types are now handled via the config

This commit is contained in:
MascaraSnake 2016-01-15 00:47:32 +01:00
parent 16d8bb39c6
commit cbb210e1ae
14 changed files with 106 additions and 80 deletions

View file

@ -2072,24 +2072,32 @@ linedeftypes
{ {
title = "Slope Frontside Floor"; title = "Slope Frontside Floor";
prefix = "(700)"; prefix = "(700)";
slope = true;
slopetype = 5;
} }
701 701
{ {
title = "Slope Frontside Ceiling"; title = "Slope Frontside Ceiling";
prefix = "(701)"; prefix = "(701)";
slope = true;
slopetype = 9;
} }
702 702
{ {
title = "Slope Frontside Floor & Ceiling"; title = "Slope Frontside Floor & Ceiling";
prefix = "(702)"; prefix = "(702)";
slope = true;
slopetype = 13;
} }
703 703
{ {
title = "Slope Frontside Floor and Backside Ceiling"; title = "Slope Frontside Floor and Backside Ceiling";
prefix = "(703)"; prefix = "(703)";
slope = true;
slopetype = 37;
} }
704 704
@ -2097,6 +2105,8 @@ linedeftypes
title = "Slope Frontside Floor by 3 Tagged Vertex Things"; title = "Slope Frontside Floor by 3 Tagged Vertex Things";
prefix = "(704)"; prefix = "(704)";
flags8192text = "[13] Use tag and offsets"; flags8192text = "[13] Use tag and offsets";
slope = true;
slopetype = 7;
} }
705 705
@ -2104,30 +2114,40 @@ linedeftypes
title = "Slope Frontside Ceiling by 3 Tagged Vertex Things"; title = "Slope Frontside Ceiling by 3 Tagged Vertex Things";
prefix = "(705)"; prefix = "(705)";
flags8192text = "[13] Use tag and offsets"; flags8192text = "[13] Use tag and offsets";
slope = true;
slopetype = 11;
} }
710 710
{ {
title = "Slope Backside Floor"; title = "Slope Backside Floor";
prefix = "(710)"; prefix = "(710)";
slope = true;
slopetype = 17;
} }
711 711
{ {
title = "Slope Backside Ceiling"; title = "Slope Backside Ceiling";
prefix = "(711)"; prefix = "(711)";
slope = true;
slopetype = 33;
} }
712 712
{ {
title = "Slope Backside Floor & Ceiling"; title = "Slope Backside Floor & Ceiling";
prefix = "(712)"; prefix = "(712)";
slope = true;
slopetype = 49;
} }
713 713
{ {
title = "Slope Backside Floor & Frontside Ceiling"; title = "Slope Backside Floor & Frontside Ceiling";
prefix = "(713)"; prefix = "(713)";
slope = true;
slopetype = 25;
} }
714 714
@ -2135,6 +2155,8 @@ linedeftypes
title = "Slope Backside Floor by 3 Tagged Vertex Things"; title = "Slope Backside Floor by 3 Tagged Vertex Things";
prefix = "(714)"; prefix = "(714)";
flags8192text = "[13] Use tag and offsets"; flags8192text = "[13] Use tag and offsets";
slope = true;
slopetype = 19;
} }
715 715
@ -2142,24 +2164,32 @@ linedeftypes
title = "Slope Backside Ceiling by 3 Tagged Vertex Things"; title = "Slope Backside Ceiling by 3 Tagged Vertex Things";
prefix = "(715)"; prefix = "(715)";
flags8192text = "[13] Use tag and offsets"; flags8192text = "[13] Use tag and offsets";
slope = true;
slopetype = 35;
} }
721 721
{ {
title = "Copy Frontside Ceiling Slope from Line Tag"; title = "Copy Frontside Ceiling Slope from Line Tag";
prefix = "(720)"; prefix = "(720)";
slope = true;
slopetype = 10;
} }
720 720
{ {
title = "Copy Frontside Floor Slope from Line Tag"; title = "Copy Frontside Floor Slope from Line Tag";
prefix = "(721)"; prefix = "(721)";
slope = true;
slopetype = 6;
} }
722 722
{ {
title = "Copy Frontside Floor & Ceiling Slope from Line Tag"; title = "Copy Frontside Floor & Ceiling Slope from Line Tag";
prefix = "(722)"; prefix = "(722)";
slope = true;
slopetype = 14;
} }
} }

View file

@ -46,6 +46,8 @@ namespace CodeImp.DoomBuilder.Config
private readonly bool isknown; private readonly bool isknown;
private readonly bool requiresactivation; //mxd private readonly bool requiresactivation; //mxd
private IDictionary<string, string> flags; private IDictionary<string, string> flags;
private readonly bool slope;
private readonly int slopetype;
#endregion #endregion
@ -63,6 +65,11 @@ namespace CodeImp.DoomBuilder.Config
public bool RequiresActivation { get { return requiresactivation; } } //mxd public bool RequiresActivation { get { return requiresactivation; } } //mxd
public ArgumentInfo[] Args { get { return args; } } public ArgumentInfo[] Args { get { return args; } }
public IDictionary<string, string> Flags { get { return flags; } } public IDictionary<string, string> Flags { get { return flags; } }
public bool Slope { get { return slope; } }
public int SlopeType { get { return slopetype; } }
public bool IsRegularSlope { get { return slope && (slopetype & 0x3) == 1; } }
public bool IsCopySlope { get { return slope && (slopetype & 0x3) == 2; } }
public bool IsVertexSlope { get { return slope && (slopetype & 0x3) == 3; } }
#endregion #endregion
@ -88,6 +95,8 @@ namespace CodeImp.DoomBuilder.Config
this.title = this.prefix + " " + this.name; this.title = this.prefix + " " + this.name;
this.title = this.title.Trim(); this.title = this.title.Trim();
this.flags = new Dictionary<string, string>(ac.Flags); this.flags = new Dictionary<string, string>(ac.Flags);
this.slope = cfg.ReadSetting(actionsetting + ".slope", false);
this.slopetype = cfg.ReadSetting(actionsetting + ".slopetype", 0);
ReadLinedefSpecificFlags(cfg); ReadLinedefSpecificFlags(cfg);
// Read the args // Read the args
@ -107,6 +116,8 @@ namespace CodeImp.DoomBuilder.Config
this.requiresactivation = true; //mxd. Unused, set for consistency sake. this.requiresactivation = true; //mxd. Unused, set for consistency sake.
this.title = title; this.title = title;
this.flags = new Dictionary<string, string>(); this.flags = new Dictionary<string, string>();
this.slope = false;
this.slopetype = 0;
this.args = new ArgumentInfo[Linedef.NUM_ARGS]; this.args = new ArgumentInfo[Linedef.NUM_ARGS];
for(int i = 0; i < Linedef.NUM_ARGS; i++) for(int i = 0; i < Linedef.NUM_ARGS; i++)
this.args[i] = new ArgumentInfo(i); this.args[i] = new ArgumentInfo(i);

View file

@ -43,9 +43,6 @@ namespace CodeImp.DoomBuilder.IO
public DoomMapSetIO(WAD wad, MapManager manager) : base(wad, manager) public DoomMapSetIO(WAD wad, MapManager manager) : base(wad, manager)
{ {
threeDFloorTypes = new Dictionary<int, int[]>() { { 160, new int[3] { -1, -1, -1 } } }; threeDFloorTypes = new Dictionary<int, int[]>() { { 160, new int[3] { -1, -1, -1 } } };
slopeTypes = new Dictionary<int, int[]>() { { 181, new int[2] { -1, -1 } } };
slopeCopyTypes = new Dictionary<int, int[]>() { { 118, new int[2] { -1, -1 } } };
vertexSlopeTypes = new Dictionary<int, int[]>() { };
translucentLineTypes = new Dictionary<int, float>() { { 208, -1.0f } }; translucentLineTypes = new Dictionary<int, float>() { { 208, -1.0f } };
startTypes = new List<int>(); startTypes = new List<int>();
} }

View file

@ -43,9 +43,6 @@ namespace CodeImp.DoomBuilder.IO
public HexenMapSetIO(WAD wad, MapManager manager) : base(wad, manager) public HexenMapSetIO(WAD wad, MapManager manager) : base(wad, manager)
{ {
threeDFloorTypes = new Dictionary<int, int[]>() { { 160, new int[3] { -1, -1, -1 } } }; threeDFloorTypes = new Dictionary<int, int[]>() { { 160, new int[3] { -1, -1, -1 } } };
slopeTypes = new Dictionary<int, int[]>() { { 181, new int[2] { -1, -1 } } };
slopeCopyTypes = new Dictionary<int, int[]>() { { 118, new int[2] { -1, -1 } } };
vertexSlopeTypes = new Dictionary<int, int[]>() { };
translucentLineTypes = new Dictionary<int, float>() { { 208, -1.0f } }; translucentLineTypes = new Dictionary<int, float>() { { 208, -1.0f } };
startTypes = new List<int>(); startTypes = new List<int>();
} }

View file

@ -71,9 +71,6 @@ namespace CodeImp.DoomBuilder.IO
string GetElementName(MapElementType elementtype); //mxd string GetElementName(MapElementType elementtype); //mxd
MapElementType GetElementType(string elementname); //mxd MapElementType GetElementType(string elementname); //mxd
Dictionary<int, int[]> ThreeDFloorTypes { get; } Dictionary<int, int[]> ThreeDFloorTypes { get; }
Dictionary<int,int[]> SlopeTypes { get; }
Dictionary<int, int[]> SlopeCopyTypes { get; }
Dictionary<int, int[]> VertexSlopeTypes { get; }
Dictionary<int, float> TranslucentLineTypes { get; } Dictionary<int, float> TranslucentLineTypes { get; }
int SlopeVertexType { get; } int SlopeVertexType { get; }
int Custom3DFloorType { get; } int Custom3DFloorType { get; }

View file

@ -46,9 +46,6 @@ namespace CodeImp.DoomBuilder.IO
protected Dictionary<MapElementType, Dictionary<string, UniversalType>> uifields; protected Dictionary<MapElementType, Dictionary<string, UniversalType>> uifields;
protected Dictionary<int, int[]> threeDFloorTypes; protected Dictionary<int, int[]> threeDFloorTypes;
protected Dictionary<int, int[]> slopeTypes;
protected Dictionary<int, int[]> slopeCopyTypes;
protected Dictionary<int, int[]> vertexSlopeTypes;
protected Dictionary<int, float> translucentLineTypes; protected Dictionary<int, float> translucentLineTypes;
protected List<int> startTypes; protected List<int> startTypes;
#endregion #endregion
@ -98,9 +95,6 @@ namespace CodeImp.DoomBuilder.IO
public abstract int MinThingAngle { get; } public abstract int MinThingAngle { get; }
public abstract Dictionary<MapElementType, Dictionary<string, UniversalType>> UIFields { get; } //mxd public abstract Dictionary<MapElementType, Dictionary<string, UniversalType>> UIFields { get; } //mxd
public Dictionary<int, int[]> ThreeDFloorTypes { get { return threeDFloorTypes; } } public Dictionary<int, int[]> ThreeDFloorTypes { get { return threeDFloorTypes; } }
public Dictionary<int, int[]> SlopeTypes { get { return slopeTypes; } }
public Dictionary<int, int[]> SlopeCopyTypes { get { return slopeCopyTypes; } }
public Dictionary<int, int[]> VertexSlopeTypes { get { return vertexSlopeTypes; } }
public Dictionary<int, float> TranslucentLineTypes { get { return translucentLineTypes; } } public Dictionary<int, float> TranslucentLineTypes { get { return translucentLineTypes; } }
public abstract int SlopeVertexType { get; } public abstract int SlopeVertexType { get; }
public abstract int Custom3DFloorType { get; } public abstract int Custom3DFloorType { get; }

View file

@ -102,35 +102,6 @@ namespace CodeImp.DoomBuilder.IO
{ 259, new int[4] { 1, 0, 2, 0} } { 259, new int[4] { 1, 0, 2, 0} }
}; };
//Dictionary contents: floor, ceiling (0 = no slope, 1 = slope front, 2 = slope back)
slopeTypes = new Dictionary<int, int[]>() {
{ 700, new int[2] { 1, 0 } },
{ 701, new int[2] { 0, 1 } },
{ 702, new int[2] { 1, 1 } },
{ 703, new int[2] { 1, 2 } },
{ 710, new int[2] { 2, 0 } },
{ 711, new int[2] { 0, 2 } },
{ 712, new int[2] { 2, 2 } },
{ 713, new int[2] { 2, 1 } }
};
//Dictionary contents: floor, ceiling (0 = no slope, 1 = slope front, 2 = slope back)
slopeCopyTypes = new Dictionary<int, int[]>() {
{ 720, new int[2] { 1, 0 } },
{ 721, new int[2] { 0, 1 } },
{ 722, new int[2] { 1, 1 } },
};
//Dictionary contents:
//1. 0 = slope front, 1 = slope back
//2. 0 = slope floor, 1 = slope ceiling
vertexSlopeTypes = new Dictionary<int, int[]>() {
{ 704, new int[2] { 0, 0 } },
{ 705, new int[2] { 0, 1 } },
{ 714, new int[2] { 1, 0 } },
{ 715, new int[2] { 1, 1 } },
};
translucentLineTypes = new Dictionary<int, float>() { translucentLineTypes = new Dictionary<int, float>() {
{ 900, 0.9f }, { 900, 0.9f },
{ 901, 0.8f }, { 901, 0.8f },

View file

@ -48,9 +48,6 @@ namespace CodeImp.DoomBuilder.IO
if((manager != null) && (manager.Config != null)) if((manager != null) && (manager.Config != null))
{ {
threeDFloorTypes = new Dictionary<int, int[]>() { { 160, new int[3] { -1, -1, -1 } } }; threeDFloorTypes = new Dictionary<int, int[]>() { { 160, new int[3] { -1, -1, -1 } } };
slopeTypes = new Dictionary<int, int[]>() { { 181, new int[2] { -1, -1 } } };
slopeCopyTypes = new Dictionary<int, int[]>() { { 118, new int[2] { -1, -1 } } };
vertexSlopeTypes = new Dictionary<int, int[]>() { };
translucentLineTypes = new Dictionary<int, float>() { { 208, -1.0f } }; translucentLineTypes = new Dictionary<int, float>() { { 208, -1.0f } };
startTypes = new List<int>(); startTypes = new List<int>();

View file

@ -92,9 +92,9 @@ namespace CodeImp.DoomBuilder.Map
public int Action { get { return action; } set { BeforePropsChange(); action = value; UpdateColorPreset(); } } public int Action { get { return action; } set { BeforePropsChange(); action = value; UpdateColorPreset(); } }
public int Activate { get { return activate; } set { BeforePropsChange(); activate = value; UpdateColorPreset(); } } public int Activate { get { return activate; } set { BeforePropsChange(); activate = value; UpdateColorPreset(); } }
public bool Is3DFloor { get { return General.Map.FormatInterface.ThreeDFloorTypes.ContainsKey(Action); } } public bool Is3DFloor { get { return General.Map.FormatInterface.ThreeDFloorTypes.ContainsKey(Action); } }
public bool IsSlope { get { return General.Map.FormatInterface.SlopeTypes.ContainsKey(Action); } } public bool IsRegularSlope { get { return (!General.Map.SRB2 && Action == 181) || General.Map.Config.GetLinedefActionInfo(Action).IsRegularSlope; } }
public bool IsSlopeCopy { get { return General.Map.FormatInterface.SlopeCopyTypes.ContainsKey(Action); } } public bool IsCopySlope { get { return (!General.Map.SRB2 && Action == 118) || General.Map.Config.GetLinedefActionInfo(Action).IsCopySlope; } }
public bool IsVertexSlope { get { return General.Map.FormatInterface.VertexSlopeTypes.ContainsKey(Action); } } public bool IsVertexSlope { get { return General.Map.Config.GetLinedefActionInfo(Action).IsVertexSlope; } }
public bool IsTranslucentLine { get { return General.Map.FormatInterface.TranslucentLineTypes.ContainsKey(Action); } } public bool IsTranslucentLine { get { return General.Map.FormatInterface.TranslucentLineTypes.ContainsKey(Action); } }
public bool IsColormap { get { return Action == General.Map.FormatInterface.ColormapType; } } public bool IsColormap { get { return Action == General.Map.FormatInterface.ColormapType; } }
public bool IsFlatAlignment { get { return Action == General.Map.FormatInterface.FlatAlignmentType; } } public bool IsFlatAlignment { get { return Action == General.Map.FormatInterface.FlatAlignmentType; } }
@ -861,20 +861,42 @@ namespace CodeImp.DoomBuilder.Map
//Set slope arguments for SRB2-style slopes. See http://zdoom.org/wiki/Plane_Align. //Set slope arguments for SRB2-style slopes. See http://zdoom.org/wiki/Plane_Align.
public void SetSlopeArgs() public void SetSlopeArgs()
{ {
int[] settings = General.Map.FormatInterface.SlopeTypes[Action]; //0 = set from args, 1 = normal, 2 = copy, 3 = vertices, +4 = frontside floor, +8 = frontside ceiling, +16 = backside floor, +32 = backside ceiling
Args[0] = settings[0]; //floor int slopevalue = General.Map.Config.GetLinedefActionInfo(Action).SlopeType;
Args[1] = settings[1]; //ceiling bool frontfloor = (slopevalue & 0x4) == 0x4;
bool frontceiling = (slopevalue & 0x8) == 0x8;
bool backfloor = (slopevalue & 0x10) == 0x10;
bool backceiling = (slopevalue & 0x20) == 0x20;
Args[0] = frontfloor ? 1 : (backfloor ? 2 : 0); //floor
Args[1] = frontceiling ? 1 : (backceiling ? 2 : 0); //ceiling
Args[2] = 0; //lineid (irrelevant for SRB2) Args[2] = 0; //lineid (irrelevant for SRB2)
} }
//Finds the appropriate slope type for the current arguments. Sadly there's no better way to do this generically than to iterate over all types. Oh well. //Finds the appropriate slope type for the current arguments. Sadly there's no better way to do this generically than to iterate over all linedef types. Oh well.
public void SetSlopeTypeFromArgs() public void SetSlopeTypeFromArgs()
{ {
foreach (KeyValuePair<int, int[]> type in General.Map.FormatInterface.SlopeTypes) if (!General.Map.SRB2) Action = 181;
foreach (KeyValuePair<int, LinedefActionInfo> type in General.Map.Config.LinedefActions)
{ {
if ((type.Value[0] == Args[0] && type.Value[1] == Args[1]) || (type.Value[0] == -1 && type.Value[1] == -1)) { if (!type.Value.IsRegularSlope) continue;
Action = type.Key; //0 = set from args, 1 = normal, 2 = copy, 3 = vertices, +4 = frontside floor, +8 = frontside ceiling, +16 = backside floor, +32 = backside ceiling
return; int slopevalue = type.Value.SlopeType;
if (slopevalue == 0)
{
Action = type.Key;
return;
}
bool frontfloor = (slopevalue & 0x4) == 0x4;
bool frontceiling = (slopevalue & 0x8) == 0x8;
bool backfloor = (slopevalue & 0x10) == 0x10;
bool backceiling = (slopevalue & 0x20) == 0x20;
int args0 = frontfloor ? 1 : (backfloor ? 2 : 0);
int args1 = frontceiling ? 1 : (backceiling ? 2 : 0);
if (Args[0] == args0 && Args[1] == args1)
{
Action = type.Key;
return;
} }
} }
} }
@ -882,11 +904,16 @@ namespace CodeImp.DoomBuilder.Map
//Set slope arguments for SRB2-style copy slopes. See http://zdoom.org/wiki/Plane_Copy. //Set slope arguments for SRB2-style copy slopes. See http://zdoom.org/wiki/Plane_Copy.
public void SetSlopeCopyArgs() public void SetSlopeCopyArgs()
{ {
int[] settings = General.Map.FormatInterface.SlopeCopyTypes[Action]; //0 = set from args, 1 = normal, 2 = copy, 3 = vertices, +4 = frontside floor, +8 = frontside ceiling, +16 = backside floor, +32 = backside ceiling
if (settings[0] == 1) Args[0] = Tag; //front floor int slopevalue = General.Map.Config.GetLinedefActionInfo(Action).SlopeType;
if (settings[0] == 2) Args[2] = Tag; //back floor bool frontfloor = (slopevalue & 0x4) == 0x4;
if (settings[1] == 1) Args[1] = Tag; //front ceiling bool frontceiling = (slopevalue & 0x8) == 0x8;
if (settings[1] == 2) Args[3] = Tag; //back ceiling bool backfloor = (slopevalue & 0x10) == 0x10;
bool backceiling = (slopevalue & 0x20) == 0x20;
if (frontfloor) Args[0] = Tag; //front floor
if (frontceiling) Args[1] = Tag; //front ceiling
if (backfloor) Args[2] = Tag; //back floor
if (backceiling) Args[3] = Tag; //back ceiling
Args[4] = 0; //share (irrelevant for SRB2) Args[4] = 0; //share (irrelevant for SRB2)
} }
@ -895,9 +922,14 @@ namespace CodeImp.DoomBuilder.Map
//Args[1]: 0 = slope floor, 1 = slope ceiling //Args[1]: 0 = slope floor, 1 = slope ceiling
public void SetVertexSlopeArgs() public void SetVertexSlopeArgs()
{ {
int[] settings = General.Map.FormatInterface.VertexSlopeTypes[Action]; //0 = set from args, 1 = normal, 2 = copy, 3 = vertices, +4 = frontside floor, +8 = frontside ceiling, +16 = backside floor, +32 = backside ceiling
Args[0] = settings[0]; int slopevalue = General.Map.Config.GetLinedefActionInfo(Action).SlopeType;
Args[1] = settings[1]; bool frontfloor = (slopevalue & 0x4) == 0x4;
bool frontceiling = (slopevalue & 0x8) == 0x8;
bool backfloor = (slopevalue & 0x10) == 0x10;
bool backceiling = (slopevalue & 0x20) == 0x20;
Args[0] = (frontfloor || frontceiling) ? 0 : 1;
Args[1] = (frontfloor || backfloor) ? 0 : 1;
} }
//Set translucent line arguments for SRB2-style translucent walls. See http://zdoom.org/wiki/TranslucentLine. //Set translucent line arguments for SRB2-style translucent walls. See http://zdoom.org/wiki/TranslucentLine.

View file

@ -671,7 +671,7 @@ namespace CodeImp.DoomBuilder.Map
{ {
// Carbon copy of EffectLineSlope class here... // Carbon copy of EffectLineSlope class here...
// MascaraSnake: Handle slopes // MascaraSnake: Handle slopes
if(side.Line.IsSlope && ((side.Line.Args[0] == 1 && side == side.Line.Front) || side.Line.Args[0] == 2) && side.Other != null) if(side.Line.IsRegularSlope && ((side.Line.Args[0] == 1 && side == side.Line.Front) || side.Line.Args[0] == 2) && side.Other != null)
{ {
Linedef l = side.Line; Linedef l = side.Line;
@ -752,7 +752,7 @@ namespace CodeImp.DoomBuilder.Map
{ {
// Carbon copy of EffectLineSlope class here... // Carbon copy of EffectLineSlope class here...
// MascaraSnake: Handle slopes // MascaraSnake: Handle slopes
if(side.Line.IsSlope && ((side.Line.Args[1] == 1 && side == side.Line.Front) || side.Line.Args[1] == 2) && side.Other != null) if(side.Line.IsRegularSlope && ((side.Line.Args[1] == 1 && side == side.Line.Front) || side.Line.Args[1] == 2) && side.Other != null)
{ {
Linedef l = side.Line; Linedef l = side.Line;

View file

@ -60,7 +60,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
if(sd.HighRequired() && sd.HighTexture == "-") if(sd.HighRequired() && sd.HighTexture == "-")
{ {
// MascaraSnake: Slope handling // MascaraSnake: Slope handling
if(sd.Line.IsSlope && sd.Line.Args[1] > 0) continue; //mxd. Ceiling slopes doesn't require upper texture if(sd.Line.IsRegularSlope && sd.Line.Args[1] > 0) continue; //mxd. Ceiling slopes doesn't require upper texture
if(sd.Other != null && sd.Other.Sector.CeilTexture != General.Map.Config.SkyFlatName) if(sd.Other != null && sd.Other.Sector.CeilTexture != General.Map.Config.SkyFlatName)
{ {
SubmitResult(new ResultMissingTexture(sd, SidedefPart.Upper)); SubmitResult(new ResultMissingTexture(sd, SidedefPart.Upper));
@ -79,7 +79,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
if(sd.LowRequired() && sd.LowTexture == "-") if(sd.LowRequired() && sd.LowTexture == "-")
{ {
// MascaraSnake: Slope handling // MascaraSnake: Slope handling
if (sd.Line.IsSlope && sd.Line.Args[0] > 0) continue; //mxd. Floor slopes doesn't require lower texture if (sd.Line.IsRegularSlope && sd.Line.Args[0] > 0) continue; //mxd. Floor slopes doesn't require lower texture
if(sd.Other != null && sd.Other.Sector.FloorTexture != General.Map.Config.SkyFlatName) if(sd.Other != null && sd.Other.Sector.FloorTexture != General.Map.Config.SkyFlatName)
{ {
SubmitResult(new ResultMissingTexture(sd, SidedefPart.Lower)); SubmitResult(new ResultMissingTexture(sd, SidedefPart.Lower));

View file

@ -902,7 +902,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
{ {
// MascaraSnake: Slope handling // MascaraSnake: Slope handling
// ========== Plane Align (see http://zdoom.org/wiki/Plane_Align) ========== // ========== Plane Align (see http://zdoom.org/wiki/Plane_Align) ==========
if (l.IsSlope) if (l.IsRegularSlope)
{ {
if (!General.Map.FormatInterface.HasLinedefParameters) l.SetSlopeArgs(); if (!General.Map.FormatInterface.HasLinedefParameters) l.SetSlopeArgs();
if (((l.Args[0] == 1) || (l.Args[1] == 1)) && (l.Front != null)) if (((l.Args[0] == 1) || (l.Args[1] == 1)) && (l.Front != null))
@ -919,7 +919,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
// MascaraSnake: Slope handling // MascaraSnake: Slope handling
// ========== Plane Copy (mxd) (see http://zdoom.org/wiki/Plane_Copy) ========== // ========== Plane Copy (mxd) (see http://zdoom.org/wiki/Plane_Copy) ==========
if (l.IsSlopeCopy) if (l.IsCopySlope)
{ {
if (!General.Map.FormatInterface.HasLinedefParameters) l.SetSlopeCopyArgs(); if (!General.Map.FormatInterface.HasLinedefParameters) l.SetSlopeCopyArgs();
//check the flags... //check the flags...
@ -3748,12 +3748,12 @@ namespace CodeImp.DoomBuilder.BuilderModes
if(vg.GeometryType == VisualGeometryType.WALL_LOWER) if(vg.GeometryType == VisualGeometryType.WALL_LOWER)
{ {
// MascaraSnake: Slope handling // MascaraSnake: Slope handling
if(vg.Sidedef.Line.Action == 0 || (vg.Sidedef.Line.IsSlope && vg.Sidedef.Line.Args[0] == 0)) if(vg.Sidedef.Line.Action == 0 || (vg.Sidedef.Line.IsRegularSlope && vg.Sidedef.Line.Args[0] == 0))
{ {
//check if the sector already has floor slopes //check if the sector already has floor slopes
foreach(Sidedef side in vg.Sidedef.Sector.Sidedefs) foreach(Sidedef side in vg.Sidedef.Sector.Sidedefs)
{ {
if(side == vg.Sidedef || !side.Line.IsSlope) continue; if(side == vg.Sidedef || !side.Line.IsRegularSlope) continue;
int arg = (side == side.Line.Front ? 1 : 2); int arg = (side == side.Line.Front ? 1 : 2);
@ -3778,12 +3778,12 @@ namespace CodeImp.DoomBuilder.BuilderModes
else if(vg.GeometryType == VisualGeometryType.WALL_UPPER) else if(vg.GeometryType == VisualGeometryType.WALL_UPPER)
{ {
// MascaraSnake: Slope handling // MascaraSnake: Slope handling
if (vg.Sidedef.Line.Action == 0 || (vg.Sidedef.Line.IsSlope && vg.Sidedef.Line.Args[1] == 0)) if (vg.Sidedef.Line.Action == 0 || (vg.Sidedef.Line.IsRegularSlope && vg.Sidedef.Line.Args[1] == 0))
{ {
//check if the sector already has ceiling slopes //check if the sector already has ceiling slopes
foreach(Sidedef side in vg.Sidedef.Sector.Sidedefs) foreach(Sidedef side in vg.Sidedef.Sector.Sidedefs)
{ {
if (side == vg.Sidedef || !side.Line.IsSlope) continue; if (side == vg.Sidedef || !side.Line.IsRegularSlope) continue;
int arg = (side == side.Line.Front ? 1 : 2); int arg = (side == side.Line.Front ? 1 : 2);
@ -3811,7 +3811,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
foreach(Sidedef side in vg.Sector.Sector.Sidedefs) foreach(Sidedef side in vg.Sector.Sector.Sidedefs)
{ {
// MascaraSnake: Slope handling // MascaraSnake: Slope handling
if (!side.Line.IsSlope) continue; if (!side.Line.IsRegularSlope) continue;
int arg = (side == side.Line.Front ? 1 : 2); int arg = (side == side.Line.Front ? 1 : 2);
@ -3835,7 +3835,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
foreach(Sidedef side in vg.Sector.Sector.Sidedefs) foreach(Sidedef side in vg.Sector.Sector.Sidedefs)
{ {
// MascaraSnake: Slope handling // MascaraSnake: Slope handling
if (!side.Line.IsSlope) continue; if (!side.Line.IsRegularSlope) continue;
int arg = (side == side.Line.Front ? 1 : 2); int arg = (side == side.Line.Front ? 1 : 2);

View file

@ -577,7 +577,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
foreach(Sidedef side in Sector.Sector.Sidedefs) foreach(Sidedef side in Sector.Sector.Sidedefs)
{ {
// MascaraSnake: Slope handling // MascaraSnake: Slope handling
if(side.Line.IsSlope) if(side.Line.IsRegularSlope)
{ {
if(side.Line.Args[1] == 1 && side.Line.Front != null && side.Line.Front == side) if(side.Line.Args[1] == 1 && side.Line.Front != null && side.Line.Front == side)
{ {

View file

@ -543,7 +543,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
foreach(Sidedef side in Sector.Sector.Sidedefs) foreach(Sidedef side in Sector.Sector.Sidedefs)
{ {
// MascaraSnake: Slope handling // MascaraSnake: Slope handling
if(side.Line.IsSlope) if(side.Line.IsRegularSlope)
{ {
if(side.Line.Args[0] == 1 && side.Line.Front != null && side.Line.Front == side) if(side.Line.Args[0] == 1 && side.Line.Front != null && side.Line.Front == side)
{ {