ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/common/los.C
(Generate patch)

Comparing deliantra/server/common/los.C (file contents):
Revision 1.19 by pippijn, Mon Jan 15 21:06:18 2007 UTC vs.
Revision 1.20 by root, Mon Jan 29 16:11:48 2007 UTC

296 } 296 }
297 297
298 if (op->map->darkness > 0) /* player is on a dark map */ 298 if (op->map->darkness > 0) /* player is on a dark map */
299 expand_lighted_sight (op); 299 expand_lighted_sight (op);
300 300
301
302 /* clear mark squares */ 301 /* clear mark squares */
303 for (x = 0; x < op->contr->ns->mapx; x++) 302 for (x = 0; x < op->contr->ns->mapx; x++)
304 for (y = 0; y < op->contr->ns->mapy; y++) 303 for (y = 0; y < op->contr->ns->mapy; y++)
305 if (op->contr->blocked_los[x][y] < 0) 304 if (op->contr->blocked_los[x][y] < 0)
306 op->contr->blocked_los[x][y] = 0; 305 op->contr->blocked_los[x][y] = 0;
307} 306}
308
309
310
311 307
312/* returns true if op carries one or more lights 308/* returns true if op carries one or more lights
313 * This is a trivial function now days, but it used to 309 * This is a trivial function now days, but it used to
314 * be a bit longer. Probably better for callers to just 310 * be a bit longer. Probably better for callers to just
315 * check the op->glow_radius instead of calling this. 311 * check the op->glow_radius instead of calling this.
487 * could be examined multile times, as each path would be looked at. 483 * could be examined multile times, as each path would be looked at.
488 */ 484 */
489 for (x = (MAP_CLIENT_X - op->contr->ns->mapx) / 2 - 1; x < (MAP_CLIENT_X + op->contr->ns->mapx) / 2 + 1; x++) 485 for (x = (MAP_CLIENT_X - op->contr->ns->mapx) / 2 - 1; x < (MAP_CLIENT_X + op->contr->ns->mapx) / 2 + 1; x++)
490 for (y = (MAP_CLIENT_Y - op->contr->ns->mapy) / 2 - 1; y < (MAP_CLIENT_Y + op->contr->ns->mapy) / 2 + 1; y++) 486 for (y = (MAP_CLIENT_Y - op->contr->ns->mapy) / 2 - 1; y < (MAP_CLIENT_Y + op->contr->ns->mapy) / 2 + 1; y++)
491 check_wall (op, x, y); 487 check_wall (op, x, y);
492
493 488
494 /* do the los of the player. 3 (potential) cases */ 489 /* do the los of the player. 3 (potential) cases */
495 if (QUERY_FLAG (op, FLAG_BLIND)) /* player is blind */ 490 if (QUERY_FLAG (op, FLAG_BLIND)) /* player is blind */
496 blinded_sight (op); 491 blinded_sight (op);
497 else 492 else

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines