version 1.19 | | version 1.20 |
---|
| | |
/* | | /* |
* static char *rcsid_init_c = | | * static char *rcsid_init_c = |
* "$Id: request.c,v 1.19 2001/07/16 04:38:15 mwedel Exp $"; | | * "$Id: request.c,v 1.20 2001/07/20 06:04:23 mwedel Exp $"; |
*/ | | */ |
| | |
/* | | /* |
| | |
* locations. | | * locations. |
*/ | | */ |
ay=0; | | ay=0; |
for(y=pl->y-pl->contr->socket.mapy/2; y<=pl->y+pl->contr->socket.mapy/2;y++,ay++) { | | for(y=pl->y-pl->contr->socket.mapy/2; y<pl->y+(pl->contr->socket.mapy+1)/2;y++,ay++) { |
ax=0; | | ax=0; |
for(x=pl->x-pl->contr->socket.mapx/2;x<=pl->x+pl->contr->socket.mapx/2;x++,ax++) { | | for(x=pl->x-pl->contr->socket.mapx/2;x<pl->x+(pl->contr->socket.mapx+1)/2;x++,ax++) { |
d = pl->contr->blocked_los[ax][ay]; | | d = pl->contr->blocked_los[ax][ay]; |
mask = (ax & 0x3f) << 10 | (ay & 0x3f) << 4; | | mask = (ax & 0x3f) << 10 | (ay & 0x3f) << 4; |
| | |
| | |
if (pl->map->in_memory!=MAP_IN_MEMORY) return; | | if (pl->map->in_memory!=MAP_IN_MEMORY) return; |
memset(&newmap, 0, sizeof(struct Map)); | | memset(&newmap, 0, sizeof(struct Map)); |
| | |
for(j = (pl->y - pl->contr->socket.mapy/2) ; j <= (pl->y + pl->contr->socket.mapy/2); j++) { | | for(j = (pl->y - pl->contr->socket.mapy/2) ; j < (pl->y + (pl->contr->socket.mapy+1)/2); j++) { |
for(i = (pl->x - pl->contr->socket.mapx/2) ; i <= (pl->x + pl->contr->socket.mapx/2); i++) { | | for(i = (pl->x - pl->contr->socket.mapx/2) ; i < (pl->x + (pl->contr->socket.mapx+1)/2); i++) { |
ax=i; | | ax=i; |
ay=j; | | ay=j; |
m = get_map_from_coord(pl->map, &ax, &ay); | | m = get_map_from_coord(pl->map, &ax, &ay); |