… | |
… | |
490 | * change_map_light function |
490 | * change_map_light function |
491 | */ |
491 | */ |
492 | void |
492 | void |
493 | update_all_map_los (maptile *map) |
493 | update_all_map_los (maptile *map) |
494 | { |
494 | { |
495 | for_all_players (pl) |
495 | for_all_players_on_map (pl, map) |
496 | if (pl->ob && pl->ob->map == map) |
|
|
497 | pl->do_los = 1; |
496 | pl->do_los = 1; |
498 | } |
497 | } |
499 | |
498 | |
500 | /* |
499 | /* |
501 | * This function makes sure that update_los() will be called for all |
500 | * This function makes sure that update_los() will be called for all |
502 | * players on the given map within the next frame. |
501 | * players on the given map within the next frame. |
… | |
… | |
510 | * map is the map that changed, x and y are the coordinates. |
509 | * map is the map that changed, x and y are the coordinates. |
511 | */ |
510 | */ |
512 | void |
511 | void |
513 | update_all_los (const maptile *map, int x, int y) |
512 | update_all_los (const maptile *map, int x, int y) |
514 | { |
513 | { |
|
|
514 | map->at (x, y).invalidate (); |
|
|
515 | |
515 | for_all_players (pl) |
516 | for_all_players (pl) |
516 | { |
517 | { |
517 | /* Player should not have a null map, but do this |
518 | /* Player should not have a null map, but do this |
518 | * check as a safety |
519 | * check as a safety |
519 | */ |
520 | */ |