Fixed a problem where generalized effects could output a warning if they are made up of multiple bits (like in the MBF21 generalized sector effects)

This commit is contained in:
biwa 2021-09-04 09:12:16 +02:00
parent 2abd39fa97
commit ea37ed18fc

View file

@ -90,6 +90,9 @@ namespace CodeImp.DoomBuilder.Config
bits.Sort();
//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
@ -102,7 +105,8 @@ namespace CodeImp.DoomBuilder.Config
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
// We have no destructor
GC.SuppressFinalize(this);
}