Don't iterate over all sectors twice in RebuildElementData.

This commit is contained in:
sphere 2021-10-17 14:52:19 +02:00
parent e9c9d008ff
commit 34831d6042

View file

@ -847,19 +847,16 @@ namespace CodeImp.DoomBuilder.BuilderModes
if (!General.Settings.GZDoomRenderingEffects) return; //mxd
// Find all sector who's tag is not 0 and hash them so that we can find them quicly
foreach (Sector s in General.Map.Map.Sectors)
{
foreach(int tag in s.Tags)
// Find all sector whose tag is not 0 and hash them so that we can find them quickly
foreach (int tag in s.Tags)
{
if(tag == 0) continue;
if(!sectortags.ContainsKey(tag)) sectortags[tag] = new List<Sector>();
sectortags[tag].Add(s);
}
}
foreach (Sector s in General.Map.Map.Sectors)
{
if (General.Map.SRB2) s.Fields.Clear(); //Reset fake UDMF properties (since the linedef special that set them might no longer be there)
else
{