1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-11-20 11:54:48 +00:00

no more crashes in some Euclidean lands

This commit is contained in:
Zeno Rogue 2019-01-28 21:38:42 +01:00
parent 98f03dc076
commit 797a852b31

View File

@ -720,12 +720,14 @@ void setLandQuotient(cell *c) {
else
c->land = specialland, c->landparam = d;
}
if(specialland == laWestWall) c->land = laCrossroads4;
}
void setLandSphere(cell *c) {
setland(c, specialland);
if(specialland == laWarpCoast)
setland(c, getHemisphere(c, 0) > 0 ? laWarpCoast : laWarpSea);
if(specialland == laWestWall) c->land = laCrossroads4;
if(specialland == laClearing)
c->land = laClearing;
if(specialland == laElementalWall) {
@ -857,6 +859,15 @@ void setLandEuclid(cell *c) {
else if(y<0) setland(c, laRlyeh);
else c->landparam = y;
}
if(specialland == laWestWall) {
int x, y;
tie(x,y) = cell_to_pair(c);
x = -5 - x;
if(x == 0)
{setland(c, laBarrier); if(ishept(c)) setland(c, laMotion); }
else if(x<0) setland(c, laMotion);
else c->landparam = x;
}
if(specialland == laIvoryTower || specialland == laDungeon) {
int x, y;
tie(x,y) = cell_to_pair(c); y = -5 - y;