mirror of
https://git.do.srb2.org/STJr/ZoneBuilder.git
synced 2024-11-10 06:41:49 +00:00
Only rebuild changed parts of the blockmap in visual mode
This commit is contained in:
parent
fce59907eb
commit
b1f3641f3c
1 changed files with 36 additions and 1 deletions
|
@ -1606,7 +1606,42 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
||||||
sd.Sector.Marked = true;
|
sd.Sector.Marked = true;
|
||||||
|
|
||||||
// Make new blockmap
|
// Make new blockmap
|
||||||
FillBlockMap();
|
foreach (MapElement e in General.Map.Map.RemovedElements)
|
||||||
|
{
|
||||||
|
if (e is Linedef)
|
||||||
|
blockmap.RemoveLinedef(e as Linedef);
|
||||||
|
else if (e is Thing)
|
||||||
|
blockmap.RemoveThing(e as Thing);
|
||||||
|
else if (e is Sector)
|
||||||
|
blockmap.RemoveSector(e as Sector);
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach (Linedef l in General.Map.Map.Linedefs)
|
||||||
|
{
|
||||||
|
if (l.Marked)
|
||||||
|
{
|
||||||
|
blockmap.RemoveLinedef(l);
|
||||||
|
blockmap.AddLinedef(l);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach (Thing t in General.Map.Map.Things)
|
||||||
|
{
|
||||||
|
if (t.Marked)
|
||||||
|
{
|
||||||
|
blockmap.RemoveThing(t);
|
||||||
|
blockmap.AddThing(t);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach (Sector s in General.Map.Map.Sectors)
|
||||||
|
{
|
||||||
|
if (s.Marked)
|
||||||
|
{
|
||||||
|
blockmap.RemoveSector(s);
|
||||||
|
blockmap.AddSector(s);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
RebuildElementData(true);
|
RebuildElementData(true);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue