mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-12-20 23:50:27 +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) {
|
EX int gravityLevelDiff(cell *c, cell *d) {
|
||||||
if(c->land != laWestWall || d->land != laWestWall)
|
if(c->land != laWestWall || d->land != laWestWall) {
|
||||||
return gravityLevel(c) - gravityLevel(d);
|
int res = gravityLevel(c) - gravityLevel(d);
|
||||||
|
if(res > 1) return 1;
|
||||||
|
if(res < -1) return -1;
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
|
||||||
if(shmup::on) return 0;
|
if(shmup::on) return 0;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user