Crossfire Server, Branches 1.12  R18729
los.c
Go to the documentation of this file.
1 /*
2  * static char *rcsid_los_c =
3  * "$Id: los.c 11578 2009-02-23 22:02:27Z lalo $";
4  */
5 
6 /*
7  CrossFire, A Multiplayer game for X-windows
8 
9  Copyright (C) 2002-2006 Mark Wedel & Crossfire Development Team
10  Copyright (C) 1992 Frank Tore Johansen
11 
12  This program is free software; you can redistribute it and/or modify
13  it under the terms of the GNU General Public License as published by
14  the Free Software Foundation; either version 2 of the License, or
15  (at your option) any later version.
16 
17  This program is distributed in the hope that it will be useful,
18  but WITHOUT ANY WARRANTY; without even the implied warranty of
19  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20  GNU General Public License for more details.
21 
22  You should have received a copy of the GNU General Public License
23  along with this program; if not, write to the Free Software
24  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
25 
26  The authors can be reached via e-mail at crossfire-devel@real-time.com
27 */
28 
34 /* Nov 95 - inserted USE_LIGHTING code stuff in here - b.t. */
35 
36 #include <global.h>
37 #include <math.h>
38 
46 #define SPACE_BLOCK 0.5
47 
48 typedef struct blstr {
49  int x[4], y[4];
50  int index;
51 } blocks;
52 
54 
55 static void expand_lighted_sight(object *op);
56 
75 static void set_block(int x, int y, int bx, int by) {
76  int index = block[x][y].index, i;
77 
78  /* Due to flipping, we may get duplicates - better safe than sorry.
79  */
80  for (i = 0; i < index; i++) {
81  if (block[x][y].x[i] == bx
82  && block[x][y].y[i] == by)
83  return;
84  }
85 
86  block[x][y].x[index] = bx;
87  block[x][y].y[index] = by;
88  block[x][y].index++;
89 #ifdef LOS_DEBUG
90  LOG(llevDebug, "setblock: added %d %d -> %d %d (%d)\n", x, y, bx, by, block[x][y].index);
91 #endif
92 }
93 
102 void init_block(void) {
103  int x, y, dx, dy, i;
104  static const int block_x[3] = {
105  -1, -1, 0
106  }, block_y[3] = {
107  -1, 0, -1
108  };
109 
110  for (x = 0; x < MAP_CLIENT_X; x++)
111  for (y = 0; y < MAP_CLIENT_Y; y++) {
112  block[x][y].index = 0;
113  }
114 
115  /* The table should be symmetric, so only do the upper left
116  * quadrant - makes the processing easier.
117  */
118  for (x = 1; x <= MAP_CLIENT_X/2; x++) {
119  for (y = 1; y <= MAP_CLIENT_Y/2; y++) {
120  for (i = 0; i < 3; i++) {
121  dx = x+block_x[i];
122  dy = y+block_y[i];
123 
124  /* center space never blocks */
125  if (x == MAP_CLIENT_X/2 && y == MAP_CLIENT_Y/2)
126  continue;
127 
128  /* If its a straight line, its blocked */
129  if ((dx == x && x == MAP_CLIENT_X/2)
130  || (dy == y && y == MAP_CLIENT_Y/2)) {
131  /* For simplicity, we mirror the coordinates to block the other
132  * quadrants.
133  */
134  set_block(x, y, dx, dy);
135  if (x == MAP_CLIENT_X/2) {
136  set_block(x, MAP_CLIENT_Y-y-1, dx, MAP_CLIENT_Y-dy-1);
137  } else if (y == MAP_CLIENT_Y/2) {
138  set_block(MAP_CLIENT_X-x-1, y, MAP_CLIENT_X-dx-1, dy);
139  }
140  } else {
141  float d1, r, s, l;
142 
143  /* We use the algorihm that found out how close the point
144  * (x,y) is to the line from dx,dy to the center of the viewable
145  * area. l is the distance from x,y to the line.
146  * r is more a curiosity - it lets us know what direction (left/right)
147  * the line is off
148  */
149 
150  d1 = (float)(pow(MAP_CLIENT_X/2-dx, 2)+pow(MAP_CLIENT_Y/2-dy, 2));
151  r = (float)((dy-y)*(dy-MAP_CLIENT_Y/2)-(dx-x)*(MAP_CLIENT_X/2-dx))/d1;
152  s = (float)((dy-y)*(MAP_CLIENT_X/2-dx)-(dx-x)*(MAP_CLIENT_Y/2-dy))/d1;
153  l = FABS(sqrt(d1)*s);
154 
155  if (l <= SPACE_BLOCK) {
156  /* For simplicity, we mirror the coordinates to block the other
157  * quadrants.
158  */
159  set_block(x, y, dx, dy);
160  set_block(MAP_CLIENT_X-x-1, y, MAP_CLIENT_X-dx-1, dy);
161  set_block(x, MAP_CLIENT_Y-y-1, dx, MAP_CLIENT_Y-dy-1);
162  set_block(MAP_CLIENT_X-x-1, MAP_CLIENT_Y-y-1, MAP_CLIENT_X-dx-1, MAP_CLIENT_Y-dy-1);
163  }
164  }
165  }
166  }
167  }
168 }
169 
185 static void set_wall(object *op, int x, int y) {
186  int i;
187 
188  for (i = 0; i < block[x][y].index; i++) {
189  int dx = block[x][y].x[i], dy = block[x][y].y[i], ax, ay;
190 
191  /* ax, ay are the values as adjusted to be in the
192  * socket look structure.
193  */
194  ax = dx-(MAP_CLIENT_X-op->contr->socket.mapx)/2;
195  ay = dy-(MAP_CLIENT_Y-op->contr->socket.mapy)/2;
196 
197  if (ax < 0 || ax >= op->contr->socket.mapx
198  || ay < 0 || ay >= op->contr->socket.mapy)
199  continue;
200  /* we need to adjust to the fact that the socket
201  * code wants the los to start from the 0,0
202  * and not be relative to middle of los array.
203  */
204  op->contr->blocked_los[ax][ay] = 100;
205  set_wall(op, dx, dy);
206  }
207 }
208 
220 static void check_wall(object *op, int x, int y) {
221  int ax, ay;
222 
223  if (!block[x][y].index)
224  return;
225 
226  /* ax, ay are coordinates as indexed into the look window */
227  ax = x-(MAP_CLIENT_X-op->contr->socket.mapx)/2;
228  ay = y-(MAP_CLIENT_Y-op->contr->socket.mapy)/2;
229 
230  /* If the converted coordinates are outside the viewable
231  * area for the client, return now.
232  */
233  if (ax < 0 || ay < 0 || ax >= op->contr->socket.mapx || ay >= op->contr->socket.mapy)
234  return;
235 
236  /* If this space is already blocked, prune the processing - presumably
237  * whatever has set this space to be blocked has done the work and already
238  * done the dependency chain.
239  */
240  if (op->contr->blocked_los[ax][ay] == 100)
241  return;
242 
243 
244  if (get_map_flags(op->map, NULL, op->x+x-MAP_CLIENT_X/2, op->y+y-MAP_CLIENT_Y/2, NULL, NULL)&(P_BLOCKSVIEW|P_OUT_OF_MAP))
245  set_wall(op, x, y);
246 }
247 
258 void clear_los(object *op) {
259  /* This is safer than using the socket->mapx, mapy because
260  * we index the blocked_los as a 2 way array, so clearing
261  * the first z spaces may not not cover the spaces we are
262  * actually going to use
263  */
264  (void)memset((void *)op->contr->blocked_los, 0, MAP_CLIENT_X*MAP_CLIENT_Y);
265 }
266 
278 static void expand_sight(object *op) {
279  int i, x, y, dx, dy;
280 
281  for (x = 1; x < op->contr->socket.mapx-1; x++) /* loop over inner squares */
282  for (y = 1; y < op->contr->socket.mapy-1; y++) {
283  if (!op->contr->blocked_los[x][y]
284  && !(get_map_flags(op->map, NULL,
285  op->x-op->contr->socket.mapx/2+x,
286  op->y-op->contr->socket.mapy/2+y,
287  NULL, NULL)&(P_BLOCKSVIEW|P_OUT_OF_MAP))) {
288 
289  for (i = 1; i <= 8; i += 1) { /* mark all directions */
290  dx = x+freearr_x[i];
291  dy = y+freearr_y[i];
292  if (op->contr->blocked_los[dx][dy] > 0) /* for any square blocked */
293  op->contr->blocked_los[dx][dy] = -1;
294  }
295  }
296  }
297 
298  if (MAP_DARKNESS(op->map) > 0) /* player is on a dark map */
300 
301 
302  /* clear mark squares */
303  for (x = 0; x < op->contr->socket.mapx; x++)
304  for (y = 0; y < op->contr->socket.mapy; y++)
305  if (op->contr->blocked_los[x][y] < 0)
306  op->contr->blocked_los[x][y] = 0;
307 }
308 
322 int has_carried_lights(const object *op) {
323  /* op may glow! */
324  if (op->glow_radius > 0)
325  return 1;
326 
327  return 0;
328 }
329 
336 static void expand_lighted_sight(object *op) {
337  int x, y, darklevel, ax, ay, basex, basey, mflags, light, x1, y1;
338  mapstruct *m = op->map;
339  sint16 nx, ny;
340 
341  darklevel = MAP_DARKNESS(m);
342 
343  /* If the player can see in the dark, lower the darklevel for him */
344  if (QUERY_FLAG(op, FLAG_SEE_IN_DARK))
345  darklevel -= 2;
346 
347  /* add light, by finding all (non-null) nearby light sources, then
348  * mark those squares specially. If the darklevel<1, there is no
349  * reason to do this, so we skip this function
350  */
351  if (darklevel < 1)
352  return;
353 
354  /* Do a sanity check. If not valid, some code below may do odd
355  * things.
356  */
357  if (darklevel > MAX_DARKNESS) {
358  LOG(llevError, "Map darkness for %s on %s is too high (%d)\n", op->name, op->map->path, darklevel);
359  darklevel = MAX_DARKNESS;
360  }
361 
362  /* First, limit player furthest (unlighted) vision */
363  for (x = 0; x < op->contr->socket.mapx; x++)
364  for (y = 0; y < op->contr->socket.mapy; y++)
365  if (op->contr->blocked_los[x][y] != 100)
366  op->contr->blocked_los[x][y] = MAX_LIGHT_RADII;
367 
368  /* the spaces[] darkness value contains the information we need.
369  * Only process the area of interest.
370  * the basex, basey values represent the position in the op->contr->blocked_los
371  * array. Its easier to just increment them here (and start with the right
372  * value) than to recalculate them down below.
373  */
374  for (x = (op->x-op->contr->socket.mapx/2-MAX_LIGHT_RADII), basex = -MAX_LIGHT_RADII;
375  x <= (op->x+op->contr->socket.mapx/2+MAX_LIGHT_RADII); x++, basex++) {
376 
377  for (y = (op->y-op->contr->socket.mapy/2-MAX_LIGHT_RADII), basey = -MAX_LIGHT_RADII;
378  y <= (op->y+op->contr->socket.mapy/2+MAX_LIGHT_RADII); y++, basey++) {
379  m = op->map;
380  nx = x;
381  ny = y;
382 
383  mflags = get_map_flags(m, &m, nx, ny, &nx, &ny);
384 
385  if (mflags&P_OUT_OF_MAP)
386  continue;
387 
388  /* This space is providing light, so we need to brighten up the
389  * spaces around here.
390  */
391  light = GET_MAP_LIGHT(m, nx, ny);
392  if (light != 0) {
393  for (ax = basex-light; ax <= basex+light; ax++) {
394  if (ax < 0 || ax >= op->contr->socket.mapx)
395  continue;
396  for (ay = basey-light; ay <= basey+light; ay++) {
397  if (ay < 0 || ay >= op->contr->socket.mapy)
398  continue;
399 
400  /* If the space is fully blocked, do nothing. Otherwise, we
401  * brighten the space. The further the light is away from the
402  * source (basex-x), the less effect it has. Though light used
403  * to dim in a square manner, it now dims in a circular manner
404  * using the the pythagorean theorem. glow_radius still
405  * represents the radius
406  */
407  if (op->contr->blocked_los[ax][ay] != 100) {
408  x1 = abs(basex-ax)*abs(basex-ax);
409  y1 = abs(basey-ay)*abs(basey-ay);
410  if (light > 0)
411  op->contr->blocked_los[ax][ay] -= MAX((light-isqrt(x1+y1)), 0);
412  if (light < 0)
413  op->contr->blocked_los[ax][ay] -= MIN((light+isqrt(x1+y1)), 0);
414  }
415  } /* for ay */
416  } /* for ax */
417  } /* if this space is providing light */
418  } /* for y */
419  } /* for x */
420 
421  /* Outdoor should never really be completely pitch black dark like
422  * a dungeon, so let the player at least see a little around themselves
423  */
424  if (op->map->outdoor && darklevel > (MAX_DARKNESS-3)) {
425  if (op->contr->blocked_los[op->contr->socket.mapx/2][op->contr->socket.mapy/2] > (MAX_DARKNESS-3))
426  op->contr->blocked_los[op->contr->socket.mapx/2][op->contr->socket.mapy/2] = MAX_DARKNESS-3;
427 
428  for (x = -1; x <= 1; x++)
429  for (y = -1; y <= 1; y++) {
430  if (op->contr->blocked_los[x+op->contr->socket.mapx/2][y+op->contr->socket.mapy/2] > (MAX_DARKNESS-2))
431  op->contr->blocked_los[x+op->contr->socket.mapx/2][y+op->contr->socket.mapy/2] = MAX_DARKNESS-2;
432  }
433  }
434  /* grant some vision to the player, based on the darklevel */
435  for (x = darklevel-MAX_DARKNESS; x < MAX_DARKNESS+1-darklevel; x++)
436  for (y = darklevel-MAX_DARKNESS; y < MAX_DARKNESS+1-darklevel; y++)
437  if (!(op->contr->blocked_los[x+op->contr->socket.mapx/2][y+op->contr->socket.mapy/2] == 100))
438  op->contr->blocked_los[x+op->contr->socket.mapx/2][y+op->contr->socket.mapy/2] -= MAX(0, 6-darklevel-MAX(abs(x), abs(y)));
439 }
440 
450 static void blinded_sight(object *op) {
451  int x, y;
452 
453  for (x = 0; x < op->contr->socket.mapx; x++)
454  for (y = 0; y < op->contr->socket.mapy; y++)
455  op->contr->blocked_los[x][y] = 100;
456 
457  op->contr->blocked_los[op->contr->socket.mapx/2][op->contr->socket.mapy/2] = 0;
458 }
459 
467 void update_los(object *op) {
468  int dx = op->contr->socket.mapx/2, dy = op->contr->socket.mapy/2, x, y;
469 
470  if (QUERY_FLAG(op, FLAG_REMOVED))
471  return;
472 
473  clear_los(op);
474  if (QUERY_FLAG(op, FLAG_WIZ) /* || XRAYS(op) */)
475  return;
476 
477  /* For larger maps, this is more efficient than the old way which
478  * used the chaining of the block array. Since many space views could
479  * be blocked by different spaces in front, this mean that a lot of spaces
480  * could be examined multile times, as each path would be looked at.
481  */
482  for (x = (MAP_CLIENT_X-op->contr->socket.mapx)/2+1; x < (MAP_CLIENT_X+op->contr->socket.mapx)/2-1; x++)
483  for (y = (MAP_CLIENT_Y-op->contr->socket.mapy)/2+1; y < (MAP_CLIENT_Y+op->contr->socket.mapy)/2-1; y++)
484  check_wall(op, x, y);
485 
486 
487  /* do the los of the player. 3 (potential) cases */
488  if (QUERY_FLAG(op, FLAG_BLIND)) /* player is blind */
489  blinded_sight(op);
490  else
491  expand_sight(op);
492 
493  if (QUERY_FLAG(op, FLAG_XRAYS)) {
494  int x, y;
495  for (x = -2; x <= 2; x++)
496  for (y = -2; y <= 2; y++)
497  op->contr->blocked_los[dx+x][dy+y] = 0;
498  }
499 }
500 
517  player *pl;
518 
519  for (pl = first_player; pl != NULL; pl = pl->next) {
520  if (pl->ob->map == map)
521  pl->do_los = 1;
522  }
523 }
524 
544 void update_all_los(const mapstruct *map, int x, int y) {
545  player *pl;
546 
547  for (pl = first_player; pl != NULL; pl = pl->next) {
548  /* Player should not have a null map, but do this
549  * check as a safety
550  */
551  if (!pl->ob->map)
552  continue;
553 
554  /* Same map is simple case - see if pl is close enough.
555  * Note in all cases, we did the check for same map first,
556  * and then see if the player is close enough and update
557  * los if that is the case. If the player is on the
558  * corresponding map, but not close enough, then the
559  * player can't be on another map that may be closer,
560  * so by setting it up this way, we trim processing
561  * some.
562  */
563  if (pl->ob->map == map) {
564  if ((abs(pl->ob->x-x) <= pl->socket.mapx/2)
565  && (abs(pl->ob->y-y) <= pl->socket.mapy/2))
566  pl->do_los = 1;
567  }
568  /* Now we check to see if player is on adjacent
569  * maps to the one that changed and also within
570  * view. The tile_maps[] could be null, but in that
571  * case it should never match the pl->ob->map, so
572  * we want ever try to dereference any of the data in it.
573  */
574 
575  /* The logic for 0 and 3 is to see how far the player is
576  * from the edge of the map (height/width) - pl->ob->(x,y)
577  * and to add current position on this map - that gives a
578  * distance.
579  * For 1 and 2, we check to see how far the given
580  * coordinate (x,y) is from the corresponding edge,
581  * and then add the players location, which gives
582  * a distance.
583  */
584  else if (pl->ob->map == map->tile_map[0]) {
585  if ((abs(pl->ob->x-x) <= pl->socket.mapx/2)
586  && (abs(y+MAP_HEIGHT(map->tile_map[0])-pl->ob->y) <= pl->socket.mapy/2))
587  pl->do_los = 1;
588  } else if (pl->ob->map == map->tile_map[2]) {
589  if ((abs(pl->ob->x-x) <= pl->socket.mapx/2)
590  && (abs(pl->ob->y+MAP_HEIGHT(map)-y) <= pl->socket.mapy/2))
591  pl->do_los = 1;
592  } else if (pl->ob->map == map->tile_map[1]) {
593  if ((abs(pl->ob->x+MAP_WIDTH(map)-x) <= pl->socket.mapx/2)
594  && (abs(pl->ob->y-y) <= pl->socket.mapy/2))
595  pl->do_los = 1;
596  } else if (pl->ob->map == map->tile_map[3]) {
597  if ((abs(x+MAP_WIDTH(map->tile_map[3])-pl->ob->x) <= pl->socket.mapx/2)
598  && (abs(pl->ob->y-y) <= pl->socket.mapy/2))
599  pl->do_los = 1;
600  }
601  }
602 }
603 
614 void print_los(object *op) {
615  int x, y;
616  char buf[MAP_CLIENT_X*2+20], buf2[10];
617 
618  snprintf(buf, sizeof(buf), "[fixed] ");
619  for (x = 0; x < op->contr->socket.mapx; x++) {
620  snprintf(buf2, sizeof(buf2), "%2d", x);
621  strncat(buf, buf2, sizeof(buf)-strlen(buf)-1);
622  }
624  for (y = 0; y < op->contr->socket.mapy; y++) {
625  snprintf(buf, sizeof(buf), "[fixed]%2d:", y);
626  for (x = 0; x < op->contr->socket.mapx; x++) {
627  snprintf(buf2, sizeof(buf2), " %1d", op->contr->blocked_los[x][y] == 100 ? 1 : 0);
628  strncat(buf, buf2, sizeof(buf)-strlen(buf)-1);
629  }
631  }
632 }
633 
644 void make_sure_seen(const object *op) {
645  player *pl;
646 
647  for (pl = first_player; pl; pl = pl->next)
648  if (pl->ob->map == op->map
649  && pl->ob->y-pl->socket.mapy/2 <= op->y
650  && pl->ob->y+pl->socket.mapy/2 >= op->y
651  && pl->ob->x-pl->socket.mapx/2 <= op->x
652  && pl->ob->x+pl->socket.mapx/2 >= op->x)
653  pl->blocked_los[pl->socket.mapx/2+op->x-pl->ob->x][pl->socket.mapy/2+op->y-pl->ob->y] = 0;
654 }
655 
667 void make_sure_not_seen(const object *op) {
668  player *pl;
669 
670  for (pl = first_player; pl; pl = pl->next)
671  if (pl->ob->map == op->map
672  && pl->ob->y-pl->socket.mapy/2 <= op->y
673  && pl->ob->y+pl->socket.mapy/2 >= op->y
674  && pl->ob->x-pl->socket.mapx/2 <= op->x
675  && pl->ob->x+pl->socket.mapx/2 >= op->x)
676  pl->do_los = 1;
677 }
char path[HUGE_BUF]
Definition: map.h:384
int get_map_flags(mapstruct *oldmap, mapstruct **newmap, sint16 x, sint16 y, sint16 *nx, sint16 *ny)
Definition: map.c:330
Definition: player.h:146
#define FLAG_SEE_IN_DARK
Definition: define.h:634
signed short sint16
Definition: global.h:72
static void blinded_sight(object *op)
Definition: los.c:450
void init_block(void)
Definition: los.c:102
static void expand_lighted_sight(object *op)
Definition: los.c:336
#define MAX_LIGHT_RADII
Definition: define.h:759
#define FABS(x)
Definition: define.h:61
struct mapdef * tile_map[4]
Definition: map.h:383
#define MAP_HEIGHT(m)
Definition: map.h:99
socket_struct socket
Definition: player.h:148
short freearr_x[SIZEOFFREE]
Definition: object.c:75
#define MAX_DARKNESS
Definition: define.h:763
static void expand_sight(object *op)
Definition: los.c:278
void draw_ext_info(int flags, int pri, const object *pl, uint8 type, uint8 subtype, const char *message, const char *oldmessage)
Definition: standalone.c:171
sint16 x
Definition: object.h:179
void make_sure_seen(const object *op)
Definition: los.c:644
static void check_wall(object *op, int x, int y)
Definition: los.c:220
#define FLAG_REMOVED
Definition: define.h:528
short freearr_y[SIZEOFFREE]
Definition: object.c:81
Definition: los.c:48
static blocks block[MAP_CLIENT_X][MAP_CLIENT_Y]
Definition: los.c:53
#define MAP_DARKNESS(m)
Definition: map.h:94
void update_all_los(const mapstruct *map, int x, int y)
Definition: los.c:544
struct mapdef * map
Definition: object.h:155
static void set_wall(object *op, int x, int y)
Definition: los.c:185
static void set_block(int x, int y, int bx, int by)
Definition: los.c:75
const char * name
Definition: object.h:167
#define GET_MAP_LIGHT(M, X, Y)
Definition: map.h:186
#define P_OUT_OF_MAP
Definition: map.h:272
#define SPACE_BLOCK
Definition: los.c:46
sint16 y
Definition: object.h:179
struct pl * contr
Definition: object.h:134
#define FLAG_XRAYS
Definition: define.h:597
#define MAX(x, y)
Definition: define.h:70
#define QUERY_FLAG(xyz, p)
Definition: define.h:514
void clear_los(object *op)
Definition: los.c:258
#define FLAG_WIZ
Definition: define.h:527
#define MSG_TYPE_COMMAND_DEBUG
Definition: newclient.h:446
#define MAP_CLIENT_X
Definition: config.h:212
int y[4]
Definition: los.c:49
int x[4]
Definition: los.c:49
#define MIN(x, y)
Definition: define.h:67
object * ob
Definition: player.h:207
int has_carried_lights(const object *op)
Definition: los.c:322
int snprintf(char *dest, int max, const char *format,...)
Definition: porting.c:498
#define MAP_CLIENT_Y
Definition: config.h:213
#define FLAG_BLIND
Definition: define.h:633
void print_los(object *op)
Definition: los.c:614
void update_all_map_los(mapstruct *map)
Definition: los.c:516
#define MAP_WIDTH(m)
Definition: map.h:97
int index
Definition: los.c:50
uint32 do_los
Definition: player.h:180
int isqrt(int n)
Definition: porting.c:573
#define MSG_TYPE_COMMAND
Definition: newclient.h:326
void update_los(object *op)
Definition: los.c:467
EXTERN player * first_player
Definition: global.h:190
struct pl * next
Definition: player.h:147
sint8 glow_radius
Definition: object.h:215
#define NDI_UNIQUE
Definition: newclient.h:219
void LOG(LogLevel logLevel, const char *format,...)
Definition: logger.c:63
#define P_BLOCKSVIEW
Definition: map.h:247
Definition: map.h:346
struct blstr blocks
void make_sure_not_seen(const object *op)
Definition: los.c:667
uint32 outdoor
Definition: map.h:361
sint8 blocked_los[MAP_CLIENT_X][MAP_CLIENT_Y]
Definition: player.h:210