mirror of
https://git.do.srb2.org/STJr/UltimateZoneBuilder.git
synced 2025-02-17 01:22:18 +00:00
Fixed a bug with generalized options introduced in ea37ed1
This commit is contained in:
parent
e362df1d98
commit
d766f27e75
1 changed files with 8 additions and 7 deletions
|
@ -92,28 +92,29 @@ namespace CodeImp.DoomBuilder.Config
|
|||
//mxd. Determine and check increment steps
|
||||
// biwa. Setting this to be in debug build only. There are valid scenarios where this isn't a problem, specifically MBF21,
|
||||
// where the "alternate damage mode" for sectors is made up of 3 bits.
|
||||
#if DEBUG
|
||||
|
||||
if(bits.Count > 1)
|
||||
{
|
||||
// Use the second bit as the structure's step
|
||||
bitstep = bits[1].Index;
|
||||
|
||||
bitstep = bits[1].Index;
|
||||
|
||||
#if DEBUG
|
||||
// Check the rest of the values
|
||||
for(int i = 1; i < bits.Count; i++)
|
||||
{
|
||||
if(bits[i].Index - bits[i - 1].Index != bitstep)
|
||||
General.ErrorLogger.Add(ErrorType.Warning, "Structure \"" + fullpath + "." + name + "\" contains options with mixed increments (option \"" + bits[i].Title + "\" increment (" + (bits[i - 1].Index - bits[i].Index) + ") doesn't match the structure increment (" + bitstep + ")).");
|
||||
}
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
// We have no destructor
|
||||
GC.SuppressFinalize(this);
|
||||
}
|
||||
|
||||
#endregion
|
||||
#endregion
|
||||
|
||||
#region ================== Methods
|
||||
#region ================== Methods
|
||||
|
||||
// This presents the item as string
|
||||
public override string ToString()
|
||||
|
@ -121,6 +122,6 @@ namespace CodeImp.DoomBuilder.Config
|
|||
return name;
|
||||
}
|
||||
|
||||
#endregion
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue