diff --git a/game.cpp b/game.cpp index 4cf4a61c..946fa401 100644 --- a/game.cpp +++ b/game.cpp @@ -4062,6 +4062,7 @@ int stayval(cell *c, flagtype mf) { } int totalbulldistance(cell *c, int k) { + shpos.resize(SHSIZE); int tbd = 0; for(int p=0; pmonst == moShadow) { diff --git a/hyper.h b/hyper.h index 099f51da..6ef433d9 100644 --- a/hyper.h +++ b/hyper.h @@ -2318,7 +2318,8 @@ color_t darkena(color_t c, int lev, int a); #define SHSIZE 16 -extern cell *shpos[MAXPLAYER][SHSIZE]; + +extern vector> shpos; extern int cshpos; #if CAP_ANIMATIONS diff --git a/system.cpp b/system.cpp index c8b17855..09222f8c 100644 --- a/system.cpp +++ b/system.cpp @@ -1395,6 +1395,7 @@ addHook(hooks_gamedata, 0, [] (gamedata* gd) { gd->store(gravity_state); gd->store(last_gravity_state); gd->store(shpos); + gd->store(cshpos); }) + addHook(hooks_removecells, 0, [] () { eliminate_if(crush_next, is_cell_removed);