version 1.14 | | version 1.15 |
---|
| | |
/* | | /* |
* static char *rcsid_los_c = | | * static char *rcsid_los_c = |
* "$Id: los.c,v 1.14 2005/08/17 07:44:45 akirschbaum Exp $"; | | * "$Id: los.c,v 1.15 2005/09/04 16:58:12 akirschbaum Exp $"; |
*/ | | */ |
| | |
/* | | /* |
| | |
block[x][y].y[index]=by; | | block[x][y].y[index]=by; |
block[x][y].index++; | | block[x][y].index++; |
#ifdef LOS_DEBUG | | #ifdef LOS_DEBUG |
fprintf(stderr,"setblock: added %d %d -> %d %d (%d)\n", x, y, bx, by, | | LOG(llevDebug, "setblock: added %d %d -> %d %d (%d)\n", x, y, bx, by, |
block[x][y].index); | | block[x][y].index); |
#endif | | #endif |
} | | } |
| | |
if (ax < 0 || ax>=op->contr->socket.mapx || | | if (ax < 0 || ax>=op->contr->socket.mapx || |
ay < 0 || ay>=op->contr->socket.mapy) continue; | | ay < 0 || ay>=op->contr->socket.mapy) continue; |
#if 0 | | #if 0 |
fprintf(stderr,"blocked %d %d -> %d %d\n", | | LOG(llevDebug, "blocked %d %d -> %d %d\n", |
dx, dy, ax, ay); | | dx, dy, ax, ay); |
#endif | | #endif |
/* we need to adjust to the fact that the socket | | /* we need to adjust to the fact that the socket |
| | |
return; | | return; |
| | |
#if 0 | | #if 0 |
fprintf(stderr,"check_wall, ax,ay=%d, %d x,y = %d, %d blocksview = %d, %d\n", | | LOG(llevDebug, "check_wall, ax,ay=%d, %d x,y = %d, %d blocksview = %d, %d\n", |
ax, ay, x, y, op->x + x - MAP_CLIENT_X/2, op->y + y - MAP_CLIENT_Y/2); | | ax, ay, x, y, op->x + x - MAP_CLIENT_X/2, op->y + y - MAP_CLIENT_Y/2); |
#endif | | #endif |
| | |
| | |
light = GET_MAP_LIGHT(m, nx, ny); | | light = GET_MAP_LIGHT(m, nx, ny); |
if (light != 0) { | | if (light != 0) { |
#if 0 | | #if 0 |
fprintf(stderr,"expand_lighted_sight: Found light at x=%d, y=%d, basex=%d, basey=%d\n", | | LOG(llevDebug, "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++) { |