Difference for socket/request.c from version 1.39 to 1.40


version 1.39 version 1.40
Line 1
 
Line 1
 /*  /*
  * static char *rcsid_init_c =   * static char *rcsid_init_c =
  *    "$Id: request.c,v 1.39 2002/06/07 07:00:45 mwedel Exp $";   *    "$Id: request.c,v 1.40 2002/07/01 23:04:10 mwedel Exp $";
  */   */
   
 /*  /*
Line 1425
 
Line 1425
      * basically some number of spaces around the player)       * basically some number of spaces around the player)
      * ax and ay are values from within the viewport (ie, 0, 0 is upper       * ax and ay are values from within the viewport (ie, 0, 0 is upper
      * left corner) and are thus disconnected from the map values.       * left corner) and are thus disconnected from the map values.
        * Subtract 1 from the max values so that we properly handle cases where
        * player has specified an even map.  Otherwise, we try to send them too
        * much, ie, if mapx is 10, we would try to send from -5 to 5, which is actually
        * 11 spaces.  Now, we would send from -5 to 4, which is properly.  If mapx is
        * odd, this still works fine.
      */       */
     ay=0;      ay=0;
     for(j=pl->y-pl->contr->socket.mapy/2; j<=pl->y+pl->contr->socket.mapy/2;j++, ay++) {      for(j=pl->y-pl->contr->socket.mapy/2; j<=pl->y+(pl->contr->socket.mapy-1)/2;j++, ay++) {
  ax=0;   ax=0;
  for(i=pl->x-pl->contr->socket.mapx/2;i<=pl->x+pl->contr->socket.mapx/2;i++, ax++) {   for(i=pl->x-pl->contr->socket.mapx/2;i<=pl->x+(pl->contr->socket.mapx-1)/2;i++, ax++) {
   
      d =  pl->contr->blocked_los[ax][ay];       d =  pl->contr->blocked_los[ax][ay];
      /* note the out_of_map and d>3 checks are both within the same       /* note the out_of_map and d>3 checks are both within the same


Legend:
line(s) removed in v.1.39 
line(s) changed
 line(s) added in v.1.40

File made using version 1.98 of cvs2html by leaf at 2011-07-21 19:37