4
0
Fork 0

Patch bug blocage mur

This commit is contained in:
rick 2020-12-06 19:43:41 +01:00
parent 370c276d5c
commit c6da53f871
1 changed files with 4 additions and 4 deletions

View File

@ -21,13 +21,13 @@ if (isAttack) {
compteurFrames += 0.25;
} else {
if ((deplaceHorizontal > 0 && !place_meeting(x+1, y, oWall))
|| (deplaceHorizontal < 0 && !place_meeting(x-1, y, oWall))) {
if ((deplaceHorizontal > 0 && !place_meeting(x+2, y, oWall))
|| (deplaceHorizontal < 0 && !place_meeting(x-2, y, oWall))) {
x += deplaceHorizontal*spd;
}
if ((deplaceVertical > 0 && !place_meeting(x, y+1, oWall))
|| (deplaceVertical < 0 && !place_meeting(x, y-1, oWall))) {
if ((deplaceVertical > 0 && !place_meeting(x, y+2, oWall))
|| (deplaceVertical < 0 && !place_meeting(x, y-2, oWall))) {
y += deplaceVertical*spd;
}