… | |
… | |
1828 | return 1; |
1828 | return 1; |
1829 | |
1829 | |
1830 | if (op->map) |
1830 | if (op->map) |
1831 | unordered_mapwalk (mapwalk_buf, op, -MAX_LIGHT_RADIUS, -MAX_LIGHT_RADIUS, MAX_LIGHT_RADIUS, MAX_LIGHT_RADIUS) |
1831 | unordered_mapwalk (mapwalk_buf, op, -MAX_LIGHT_RADIUS, -MAX_LIGHT_RADIUS, MAX_LIGHT_RADIUS, MAX_LIGHT_RADIUS) |
1832 | { |
1832 | { |
|
|
1833 | mapspace &ms = m->at (nx, ny); |
|
|
1834 | |
|
|
1835 | ms.update (); |
|
|
1836 | |
1833 | /* Check the spaces with the max light radius to see if any of them |
1837 | /* Check the spaces with the max light radius to see if any of them |
1834 | * have lights, and if any of them light the player enough, then return 1. |
1838 | * have lights, and if any of them light the player enough, then return 1. |
1835 | */ |
1839 | */ |
1836 | int light = m->at (nx, ny).light; |
1840 | int light = ms.light; |
1837 | |
1841 | |
1838 | if (expect_false (light > 0) && idistance (dx, dy) <= light) |
1842 | if (expect_false (light > 0) && idistance (dx, dy) <= light) |
1839 | return 1; |
1843 | return 1; |
1840 | } |
1844 | } |
1841 | } |
1845 | } |