version 1.13 | | version 1.14 |
---|
| | |
/* | | /* |
* static char *rcsid_los_c = | | * static char *rcsid_los_c = |
* "$Id: los.c,v 1.13 2005/07/15 13:51:49 ryo_saeba Exp $"; | | * "$Id: los.c,v 1.14 2005/08/17 07:44:45 akirschbaum Exp $"; |
*/ | | */ |
| | |
/* | | /* |
| | |
* value) than to recalculate them down below. | | * value) than to recalculate them down below. |
*/ | | */ |
for (x=(op->x - op->contr->socket.mapx/2 - MAX_LIGHT_RADII), basex=-MAX_LIGHT_RADII; | | for (x=(op->x - op->contr->socket.mapx/2 - MAX_LIGHT_RADII), basex=-MAX_LIGHT_RADII; |
x < (op->x + op->contr->socket.mapx/2 + MAX_LIGHT_RADII); x++, basex++) { | | x <= (op->x + op->contr->socket.mapx/2 + MAX_LIGHT_RADII); x++, basex++) { |
| | |
for (y=(op->y - op->contr->socket.mapy/2 - MAX_LIGHT_RADII), basey=-MAX_LIGHT_RADII; | | for (y=(op->y - op->contr->socket.mapy/2 - MAX_LIGHT_RADII), basey=-MAX_LIGHT_RADII; |
y < (op->y + op->contr->socket.mapy/2 + MAX_LIGHT_RADII); y++, basey++) { | | y <= (op->y + op->contr->socket.mapy/2 + MAX_LIGHT_RADII); y++, basey++) { |
m = op->map; | | m = op->map; |
nx = x; | | nx = x; |
ny = y; | | ny = y; |
| | |
fprintf(stderr,"expand_lighted_sight: Found light at x=%d, y=%d, basex=%d, basey=%d\n", | | fprintf(stderr,"expand_lighted_sight: Found light at x=%d, y=%d, basex=%d, basey=%d\n", |
x, y, basex, basey); | | x, y, basex, basey); |
#endif | | #endif |
for (ax=basex - light; ax<basex+light; ax++) { | | for (ax=basex - light; ax<=basex+light; ax++) { |
if (ax<0 || ax>=op->contr->socket.mapx) continue; | | if (ax<0 || ax>=op->contr->socket.mapx) continue; |
for (ay=basey - light; ay<basey+light; ay++) { | | for (ay=basey - light; ay<=basey+light; ay++) { |
if (ay<0 || ay>=op->contr->socket.mapy) continue; | | if (ay<0 || ay>=op->contr->socket.mapy) continue; |
| | |
/* If the space is fully blocked, do nothing. Otherwise, we | | /* If the space is fully blocked, do nothing. Otherwise, we |