Difference for server/player.c from version 1.72 to 1.73


version 1.72 version 1.73
Line 1
 
Line 1
 /*  /*
  * static char *rcsid_player_c =   * static char *rcsid_player_c =
  *   "$Id: player.c,v 1.72 2001/11/17 21:25:21 michtoen Exp $";   *   "$Id: player.c,v 1.73 2001/11/26 17:52:26 michtoen Exp $";
  */   */
   
 /*  /*
Line 347
 
Line 347
     mapstruct *m ,*lastmap;      mapstruct *m ,*lastmap;
   
     get_rangevector(mon, pl, &rv, 0);      get_rangevector(mon, pl, &rv, 0);
   
     if (rv.distance<mindiff) return 0;      if (rv.distance<mindiff) return 0;
   
     x=mon->x;      x=mon->x;
     y=mon->y;      y=mon->y;
     m=mon->map;      m=mon->map;
     dir = rv.direction;      dir = rv.direction;
     lastdir = rv.direction;      lastdir = firstdir = rv.direction; /* perhaps we stand next to pl, init firstdir too */
     diff = FABS(rv.distance_x)>FABS(rv.distance_y)?FABS(rv.distance_x):FABS(rv.distance_y);      diff = FABS(rv.distance_x)>FABS(rv.distance_y)?FABS(rv.distance_x):FABS(rv.distance_y);
     /* If we can't solve it within the search distance, return now. */      /* If we can't solve it within the search distance, return now. */
     if (diff>max) return 0;      if (diff>max) return 0;
Line 379
 
Line 380
  x = lastx;   x = lastx;
  y = lasty;   y = lasty;
  m = lastmap;   m = lastmap;
  dir = rv.direction;   dir = firstdir = rv.direction;
      } else {       } else {
  /* direct path is blocked - try taking a side step to   /* direct path is blocked - try taking a side step to
  * either the left or right.   * either the left or right.
Line 440
 
Line 441
     }      }
     /* If we reached the max, didn't find a direction in time */      /* If we reached the max, didn't find a direction in time */
     if (!max) return 0;      if (!max) return 0;
   
     return firstdir;      return firstdir;
 }  }
   


Legend:
line(s) removed in v.1.72 
line(s) changed
 line(s) added in v.1.73

File made using version 1.98 of cvs2html by leaf at 2011-07-21 17:41