Suppression bug coincage dans les murs quand poussé par monstre
This commit is contained in:
parent
000e34f223
commit
f46c8e34ce
1 changed files with 9 additions and 8 deletions
|
@ -8,12 +8,13 @@ if (pdv <= 0) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// pushback
|
// pushback
|
||||||
if (other.x > x) {
|
knockback = 10;
|
||||||
x -= 10;
|
if (other.x > x && !place_meeting(x-knockback-1, y, oWall)) {
|
||||||
} else if (other.x < x) {
|
x -= knockback;
|
||||||
x += 10;
|
} else if (other.x < x && !place_meeting(x+knockback+1, y, oWall)) {
|
||||||
} else if (other.y > y) {
|
x += knockback;
|
||||||
y -= 10;
|
} else if (other.y > y && !place_meeting(x, y-knockback-1, oWall)) {
|
||||||
} else if (other.y < y) {
|
y -= knockback;
|
||||||
y += 10;
|
} else if (other.y < y && !place_meeting(x, y+knockback+1, oWall)) {
|
||||||
|
y += knockback;
|
||||||
}
|
}
|
Reference in a new issue