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.45 by root, Sun Dec 21 23:29:27 2008 UTC vs.
Revision 1.46 by root, Tue Dec 23 00:39:48 2008 UTC

490 * change_map_light function 490 * change_map_light function
491 */ 491 */
492void 492void
493update_all_map_los (maptile *map) 493update_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 */
512void 511void
513update_all_los (const maptile *map, int x, int y) 512update_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 */

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines