… | |
… | |
337 | |
337 | |
338 | case RING: |
338 | case RING: |
339 | flag = monster->flag [FLAG_USE_RING]; |
339 | flag = monster->flag [FLAG_USE_RING]; |
340 | break; |
340 | break; |
341 | |
341 | |
|
|
342 | case RANGED: |
342 | case WAND: |
343 | case WAND: |
343 | case HORN: |
344 | case HORN: |
344 | case ROD: |
345 | case ROD: |
345 | flag = monster->flag [FLAG_USE_RANGE]; |
346 | flag = monster->flag [FLAG_USE_RANGE]; |
346 | break; |
347 | break; |
… | |
… | |
1828 | return 1; |
1829 | return 1; |
1829 | |
1830 | |
1830 | if (op->map) |
1831 | if (op->map) |
1831 | unordered_mapwalk (mapwalk_buf, op, -MAX_LIGHT_RADIUS, -MAX_LIGHT_RADIUS, MAX_LIGHT_RADIUS, MAX_LIGHT_RADIUS) |
1832 | unordered_mapwalk (mapwalk_buf, op, -MAX_LIGHT_RADIUS, -MAX_LIGHT_RADIUS, MAX_LIGHT_RADIUS, MAX_LIGHT_RADIUS) |
1832 | { |
1833 | { |
|
|
1834 | mapspace &ms = m->at (nx, ny); |
|
|
1835 | |
|
|
1836 | ms.update (); |
|
|
1837 | |
1833 | /* Check the spaces with the max light radius to see if any of them |
1838 | /* 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. |
1839 | * have lights, and if any of them light the player enough, then return 1. |
1835 | */ |
1840 | */ |
1836 | int light = m->at (nx, ny).light; |
1841 | int light = ms.light; |
1837 | |
1842 | |
1838 | if (expect_false (light > 0) && idistance (dx, dy) <= light) |
1843 | if (expect_false (light > 0) && idistance (dx, dy) <= light) |
1839 | return 1; |
1844 | return 1; |
1840 | } |
1845 | } |
1841 | } |
1846 | } |