Things that float when given the Ambush flag are now displayed as such in Visual Mode

This commit is contained in:
MascaraSnake 2016-01-13 20:17:19 +01:00
parent c09949b344
commit ed44947404
8 changed files with 11 additions and 0 deletions

View file

@ -49,6 +49,7 @@ namespace CodeImp.DoomBuilder.IO
translucentLineTypes = new Dictionary<int, float>() { { 208, -1.0f } };
unflippableTypes = new List<int>();
startTypes = new List<int>();
floatableTypes = new List<int>();
}
#endregion

View file

@ -49,6 +49,7 @@ namespace CodeImp.DoomBuilder.IO
translucentLineTypes = new Dictionary<int, float>() { { 208, -1.0f } };
unflippableTypes = new List<int>();
startTypes = new List<int>();
floatableTypes = new List<int>();
}
#endregion

View file

@ -83,5 +83,6 @@ namespace CodeImp.DoomBuilder.IO
int AxisTransferLineType { get; }
List<int> UnflippableTypes { get; }
List<int> StartTypes { get; }
List<int> FloatableTypes { get; }
}
}

View file

@ -52,6 +52,7 @@ namespace CodeImp.DoomBuilder.IO
protected Dictionary<int, float> translucentLineTypes;
protected List<int> unflippableTypes;
protected List<int> startTypes;
protected List<int> floatableTypes;
#endregion
#region ================== Properties
@ -111,6 +112,7 @@ namespace CodeImp.DoomBuilder.IO
public abstract int AxisTransferLineType { get; }
public List<int> UnflippableTypes { get { return unflippableTypes; } }
public List<int> StartTypes { get { return startTypes; } }
public List<int> FloatableTypes { get { return floatableTypes; } }
#endregion
#region ================== Constructor / Disposer

View file

@ -146,6 +146,8 @@ namespace CodeImp.DoomBuilder.IO
unflippableTypes = new List<int>() { 604, 605, 606, 607, 608, 609, 1700, 1701, 1702, 1704, 1705, 1713 };
startTypes = new List<int>() { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35 };
floatableTypes = new List<int>() { 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 312, 323, 330, 331, 332, 333, 334, 335, 521, 1800 };
}
#endregion

View file

@ -54,6 +54,7 @@ namespace CodeImp.DoomBuilder.IO
translucentLineTypes = new Dictionary<int, float>() { { 208, -1.0f } };
unflippableTypes = new List<int>();
startTypes = new List<int>();
floatableTypes = new List<int>();
// Make configuration
Configuration config = new Configuration();

View file

@ -130,6 +130,7 @@ namespace CodeImp.DoomBuilder.Map
}
public bool IsReverse { get { return General.Map.SRB2 && !Unflippable && IsFlagSet("2"); } }
public bool Unflippable { get { return General.Map.FormatInterface.UnflippableTypes.Contains(Type); } }
public bool IsFloatable { get { return General.Map.FormatInterface.FloatableTypes.Contains(Type); } }
#endregion
#region ================== Constructor / Disposer

View file

@ -462,6 +462,8 @@ namespace CodeImp.DoomBuilder.BuilderModes
}
}
}
if (Thing.IsFloatable && Thing.IsFlagSet("8")) pos.z += Thing.IsFlipped ? -24 : 24;
// Apply settings
SetPosition(pos);