… | |
… | |
3461 | if (pl->ranged_ob == ob) |
3461 | if (pl->ranged_ob == ob) |
3462 | pl->ranged_ob = 0; |
3462 | pl->ranged_ob = 0; |
3463 | } |
3463 | } |
3464 | |
3464 | |
3465 | sint8 |
3465 | sint8 |
3466 | player::visibility_at (maptile *map, int x, int y) const |
3466 | player::darkness_at (maptile *map, int x, int y) const |
3467 | { |
3467 | { |
3468 | if (!ns) |
3468 | if (ns) |
3469 | return 0; |
3469 | return LOS_BLOCKED; |
3470 | |
3470 | |
3471 | int dx, dy; |
3471 | int dx, dy; |
3472 | if (!adjacent_map (map, ns->current_map, &dx, &dy)) |
3472 | if (!adjacent_map (map, ns->current_map, &dx, &dy)) |
3473 | return 0; |
3473 | return LOS_BLOCKED; |
3474 | |
3474 | |
3475 | x += dx - ns->current_x; |
3475 | x += dx - ns->current_x; |
3476 | y += dy - ns->current_y; |
3476 | y += dy - ns->current_y; |
3477 | |
3477 | |
3478 | return 100 - blocked_los (x, y); |
3478 | return blocked_los (x, y); |
3479 | } |
3479 | } |
3480 | |
3480 | |
3481 | void |
3481 | void |
3482 | player::infobox (const char *title, const char *msg, int color) |
3482 | player::infobox (const char *title, const char *msg, int color) |
3483 | { |
3483 | { |