1 | /* |
1 | /* |
2 | * This file is part of Deliantra, the Roguelike Realtime MMORPG. |
2 | * This file is part of Deliantra, the Roguelike Realtime MMORPG. |
3 | * |
3 | * |
4 | * Copyright (©) 2005,2006,2007,2008,2009 Marc Alexander Lehmann / Robin Redeker / the Deliantra team |
4 | * Copyright (©) 2005,2006,2007,2008,2009,2010 Marc Alexander Lehmann / Robin Redeker / the Deliantra team |
5 | * |
5 | * |
6 | * Deliantra is free software: you can redistribute it and/or modify it under |
6 | * Deliantra is free software: you can redistribute it and/or modify it under |
7 | * the terms of the Affero GNU General Public License as published by the |
7 | * the terms of the Affero GNU General Public License as published by the |
8 | * Free Software Foundation, either version 3 of the License, or (at your |
8 | * Free Software Foundation, either version 3 of the License, or (at your |
9 | * option) any later version. |
9 | * option) any later version. |
… | |
… | |
534 | if (!pl->ob || !pl->ob->map || !pl->ns) |
534 | if (!pl->ob || !pl->ob->map || !pl->ns) |
535 | continue; |
535 | continue; |
536 | |
536 | |
537 | rv_vector rv; |
537 | rv_vector rv; |
538 | |
538 | |
539 | get_rangevector_from_mapcoord (map, x, y, pl->ob, &rv); |
539 | get_rangevector_from_mapcoord (pl->ob->map, x, y, pl->ob, &rv); |
540 | |
540 | |
541 | if ((abs (rv.distance_x) <= pl->ns->mapx / 2) && (abs (rv.distance_y) <= pl->ns->mapy / 2)) |
541 | if ((abs (rv.distance_x) <= pl->ns->mapx / 2) && (abs (rv.distance_y) <= pl->ns->mapy / 2)) |
542 | pl->do_los = 1; |
542 | pl->do_los = 1; |
543 | } |
543 | } |
544 | } |
544 | } |