diff --git a/rogueviz/flocking.cpp b/rogueviz/flocking.cpp index 7e5fd8b4..0ad3f6e3 100644 --- a/rogueviz/flocking.cpp +++ b/rogueviz/flocking.cpp @@ -220,9 +220,8 @@ namespace flocking { m->ori = oris[i]; virtualRebase(m); m->vel = vels[i]; + m->store(); } - shmup::fixStorage(); - } bool turn(int delta) { diff --git a/rogueviz/graphs.cpp b/rogueviz/graphs.cpp index 0567448f..78015002 100644 --- a/rogueviz/graphs.cpp +++ b/rogueviz/graphs.cpp @@ -182,8 +182,11 @@ void clear_extenders(edgeinfo *ei); void redo_extenders(edgeinfo *ei); void vertexdata::be_nowhere() { - if(m) m->dead = true; - m = nullptr; + if(m) { + m->dead = true; + m->unlist_and_unref(); + m = nullptr; + } for(auto& ei: edges) clear_extenders(ei.second); } @@ -193,8 +196,7 @@ int extender_levels = 3; int rv_quality = 4; void vertexdata::be(cell *c, transmatrix at) { - be_nowhere(); - m = new shmup::monster; + if(!m) m = new shmup::monster; m->pid = id; m->type = moRogueviz; m->base = c; diff --git a/rogueviz/sag/cells.cpp b/rogueviz/sag/cells.cpp index 0614d0f4..5f7bf48d 100644 --- a/rogueviz/sag/cells.cpp +++ b/rogueviz/sag/cells.cpp @@ -393,6 +393,7 @@ void compute_creq_neighbors() { vector>> dijkstra_edges; void find_cells() { + if(!game_active) start_game(); DEBBI(debug_init_sag, ("find_cells with ", cellcount, " cells")); ensure_subcell_points(); struct qitem {