1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-10-20 16:37:40 +00:00

cellid / fixed some situations when the same seed did not reproduce the same game / fixed a bug with multi::cpid overflow / golems no longer consider Orbs of Safety safe

This commit is contained in:
Zeno Rogue
2018-01-13 19:23:02 +01:00
parent 4de6e9d3e4
commit 3095afc94b
3 changed files with 32 additions and 10 deletions

15
hyper.h
View File

@@ -109,7 +109,15 @@ struct gcell {
} LHU;
gcell() { cellcount++; }
#ifdef CELLID
int cellid;
#endif
gcell() { cellcount++;
#ifdef CELLID
cellid = cellcount;
#endif
}
~gcell() { cellcount--; }
};
@@ -2445,3 +2453,8 @@ bool cannotPickupItem(cell *c, bool telekinesis);
bool canPickupItemWithMagnetism(cell *c, cell *from);
void pickupMovedItems(cell *c);
eMonster genRuinMonster(cell *c);
template<class T> void hrandom_shuffle(T* x, int n) {
for(int k=1; k<n; k++) swap(x[k], x[hrand(k+1)]);
}