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
|
||||
if (other.x > x) {
|
||||
x -= 10;
|
||||
} else if (other.x < x) {
|
||||
x += 10;
|
||||
} else if (other.y > y) {
|
||||
y -= 10;
|
||||
} else if (other.y < y) {
|
||||
y += 10;
|
||||
knockback = 10;
|
||||
if (other.x > x && !place_meeting(x-knockback-1, y, oWall)) {
|
||||
x -= knockback;
|
||||
} else if (other.x < x && !place_meeting(x+knockback+1, y, oWall)) {
|
||||
x += knockback;
|
||||
} else if (other.y > y && !place_meeting(x, y-knockback-1, oWall)) {
|
||||
y -= knockback;
|
||||
} else if (other.y < y && !place_meeting(x, y+knockback+1, oWall)) {
|
||||
y += knockback;
|
||||
}
|
Reference in a new issue