Don't iterate over all sectors twice in RebuildElementData.
This commit is contained in:
parent
e9c9d008ff
commit
34831d6042
|
@ -847,19 +847,16 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
||||||
|
|
||||||
if (!General.Settings.GZDoomRenderingEffects) return; //mxd
|
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 (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(tag == 0) continue;
|
||||||
if(!sectortags.ContainsKey(tag)) sectortags[tag] = new List<Sector>();
|
if(!sectortags.ContainsKey(tag)) sectortags[tag] = new List<Sector>();
|
||||||
sectortags[tag].Add(s);
|
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)
|
if (General.Map.SRB2) s.Fields.Clear(); //Reset fake UDMF properties (since the linedef special that set them might no longer be there)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue