draw editor:: dt_finish

This commit is contained in:
Zeno Rogue 2020-09-21 12:01:22 +02:00
parent d87287c155
commit 3e66b520ba
1 changed files with 8 additions and 6 deletions

View File

@ -258,6 +258,11 @@ EX namespace mapeditor {
dtfree *cfree; dtfree *cfree;
cell *cfree_at; cell *cfree_at;
EX void dt_finish() {
cfree = nullptr;
cfree_at = nullptr;
}
EX void dt_add_free(shiftpoint h) { EX void dt_add_free(shiftpoint h) {
cell *b = centerover; cell *b = centerover;
@ -2481,10 +2486,8 @@ EX namespace mapeditor {
}; };
lstartcell = nullptr; lstartcell = nullptr;
} }
else { else
cfree = nullptr; dt_finish();
cfree_at = nullptr;
}
} }
if(uni >= 1000 && uni < 1010) if(uni >= 1000 && uni < 1010)
@ -2591,8 +2594,7 @@ EX namespace mapeditor {
if(!cheater) patterns::whichShape = 0; if(!cheater) patterns::whichShape = 0;
modelcell.clear(); modelcell.clear();
mapeditor::dtshapes.clear(); mapeditor::dtshapes.clear();
mapeditor::cfree = nullptr; dt_finish();
mapeditor::cfree_at = nullptr;
drawcell = nullptr; drawcell = nullptr;
}) + }) +
addHook(hooks_removecells, 0, [] () { addHook(hooks_removecells, 0, [] () {