mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-02-21 05:20:38 +00:00
dual:: cshpos fixup to save all
This commit is contained in:
parent
7d086da036
commit
5110a29d4d
5
game.cpp
5
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; p<numplayers(); p++) {
|
||||
cell *c2 = shpos[p][(cshpos+SHSIZE-k-1)%SHSIZE];
|
||||
@ -5069,12 +5070,13 @@ void movemutant() {
|
||||
}
|
||||
}
|
||||
|
||||
cell *shpos[MAXPLAYER][SHSIZE];
|
||||
__typeof(shpos) shpos;
|
||||
int cshpos = 0;
|
||||
|
||||
cell *lastmountpos[MAXPLAYER];
|
||||
|
||||
void clearshadow() {
|
||||
shpos.resize(SHSIZE);
|
||||
for(int i=0; i<SHSIZE; i++) for(int p=0; p<MAXPLAYER; p++)
|
||||
shpos[p][i] = NULL;
|
||||
}
|
||||
@ -5083,6 +5085,7 @@ void moveshadow() {
|
||||
|
||||
cell *shfrom = NULL;
|
||||
|
||||
shpos.resize(SHSIZE);
|
||||
for(int p=0; p<numplayers(); p++) {
|
||||
cell *c = shpos[p][cshpos];
|
||||
if(c && c->monst == moShadow) {
|
||||
|
3
hyper.h
3
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<array<cell*, MAXPLAYER>> shpos;
|
||||
extern int cshpos;
|
||||
|
||||
#if CAP_ANIMATIONS
|
||||
|
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user