diff --git a/GAME/src/move.c b/GAME/src/move.c index 9e109984a33168387a8d3db758bcccb2f5c908ad..998ec0c0aaeba08fd70b398f0c977800d022b7cd 100644 --- a/GAME/src/move.c +++ b/GAME/src/move.c @@ -124,7 +124,7 @@ void prof_move(Prof *prof, int * predirection, SDL_Rect * prof_rect, MAP * map, do { randdirect = rand()%4; } - while(((randdirect == 0) && (predirection == 1)) || ((randdirect == 1) && (predirection == 0)) || ((randdirect == 2) && (predirection == 3)) || ((randdirect == 3) && (predirection == 2))); + while(((randdirect == 0) && (*predirection == 1)) || ((randdirect == 1) && (*predirection == 0)) || ((randdirect == 2) && (*predirection == 3)) || ((randdirect == 3) && (*predirection == 2))); *predirection = randdirect; break; }