- fixed some unneeded rebuilding of geometry in Visual Mode

- changed initial undo memory usage
This commit is contained in:
codeimp 2009-01-17 09:03:14 +00:00
parent b6ec1bb29e
commit 88124438aa
2 changed files with 9 additions and 4 deletions

View file

@ -173,12 +173,17 @@ namespace CodeImp.DoomBuilder.BuilderModes
}
// Also rebuild surrounding sectors, because outside sidedefs may need to be adjusted
Dictionary<Sector, int> rebuilt = new Dictionary<Sector, int>();
foreach(Sidedef sd in Sector.Sector.Sidedefs)
{
if((sd.Other != null) && mode.VisualSectorExists(sd.Other.Sector))
if((sd.Other != null) && !rebuilt.ContainsKey(sd.Other.Sector))
{
BaseVisualSector bvs = (BaseVisualSector)mode.GetVisualSector(sd.Other.Sector);
bvs.Rebuild();
if(mode.VisualSectorExists(sd.Other.Sector))
{
BaseVisualSector bvs = (BaseVisualSector)mode.GetVisualSector(sd.Other.Sector);
rebuilt.Add(sd.Other.Sector, 1);
bvs.Rebuild();
}
}
}
}

View file

@ -572,7 +572,7 @@ namespace CodeImp.DoomBuilder.Map
// This serializes the MapSet
internal MemoryStream Serialize()
{
MemoryStream stream = new MemoryStream(1000000);
MemoryStream stream = new MemoryStream(512000);
SerializerStream serializer = new SerializerStream(stream);
// Write private data