mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-11-17 10:44:48 +00:00
gravityLevelDiff is now clamped to [-1,1]
This commit is contained in:
parent
6a3e12836f
commit
e55fe37803
@ -587,8 +587,12 @@ EX int gravityLevel(cell *c) {
|
||||
}
|
||||
|
||||
EX int gravityLevelDiff(cell *c, cell *d) {
|
||||
if(c->land != laWestWall || d->land != laWestWall)
|
||||
return gravityLevel(c) - gravityLevel(d);
|
||||
if(c->land != laWestWall || d->land != laWestWall) {
|
||||
int res = gravityLevel(c) - gravityLevel(d);
|
||||
if(res > 1) return 1;
|
||||
if(res < -1) return -1;
|
||||
return res;
|
||||
}
|
||||
|
||||
if(shmup::on) return 0;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user