X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=hacks%2Fpacman_ai.c;h=070f9aa5fe3debb997e419605432339a95ff5614;hb=50be9bb40dc60130c99ffa568e6677779904ff70;hp=0da72384017f70369ef3ffd85e50fa9424f7713e;hpb=447db08c956099b3b183886729108bf5b364c4b8;p=xscreensaver diff --git a/hacks/pacman_ai.c b/hacks/pacman_ai.c index 0da72384..070f9aa5 100644 --- a/hacks/pacman_ai.c +++ b/hacks/pacman_ai.c @@ -177,7 +177,7 @@ ghost_hiding (pacmangamestruct * pp, ghoststruct * g) } #if 1 -void +static void clear_trace(ghoststruct *g) { int i = 0; @@ -310,7 +310,7 @@ recur_back_track ( pacmangamestruct * pp, ghoststruct *g, int row, int col ){ return False; } -void +static void find_home ( pacmangamestruct *pp, ghoststruct *g ){ int i; int r,c; @@ -609,10 +609,8 @@ static void pac_chasing (pacmangamestruct * pp, pacmanstruct * p) { int posdirs[DIRVECS], nrdirs, i, highest = -(1 << 16), - score, dir = 0, prox, worst = 0; - int vx, vy; - - prox = pac_ghost_prox_and_vector (pp, p, &vx, &vy); + score, dir = 0, worst = 0; + int vx = 0, vy = 0; nrdirs = pac_get_posdirs (pp, p, posdirs); @@ -629,7 +627,6 @@ pac_chasing (pacmangamestruct * pp, pacmanstruct * p) } nrdirs--; posdirs[worst] = 0; - highest = -(1 << 16); /* get last possible direction if all else fails */