… | |
… | |
403 | next = tmp->below; |
403 | next = tmp->below; |
404 | if (monster_can_pick (monster, tmp)) |
404 | if (monster_can_pick (monster, tmp)) |
405 | { |
405 | { |
406 | tmp->remove (); |
406 | tmp->remove (); |
407 | tmp = insert_ob_in_ob (tmp, monster); |
407 | tmp = insert_ob_in_ob (tmp, monster); |
408 | (void) monster_check_apply (monster, tmp); |
408 | monster_check_apply (monster, tmp); |
409 | } |
409 | } |
|
|
410 | |
410 | /* We could try to re-establish the cycling, of the space, but probably |
411 | /* We could try to re-establish the cycling, of the space, but probably |
411 | * not a big deal to just bail out. |
412 | * not a big deal to just bail out. |
412 | */ |
413 | */ |
413 | if (next && next->destroyed ()) |
414 | if (next && next->destroyed ()) |
414 | return; |
415 | return; |
… | |
… | |
1180 | } |
1181 | } |
1181 | |
1182 | |
1182 | void |
1183 | void |
1183 | npc_call_help (object *op) |
1184 | npc_call_help (object *op) |
1184 | { |
1185 | { |
1185 | unordered_mapwalk (op, -7, -7, 7, 7) |
1186 | unordered_mapwalk (mapwalk_buf, op, -7, -7, 7, 7) |
1186 | { |
1187 | { |
1187 | mapspace &ms = m->at (nx, ny); |
1188 | mapspace &ms = m->at (nx, ny); |
1188 | |
1189 | |
1189 | /* If nothing alive on this space, no need to search the space. */ |
1190 | /* If nothing alive on this space, no need to search the space. */ |
1190 | if (!(ms.flags () & P_IS_ALIVE)) |
1191 | if (!(ms.flags () & P_IS_ALIVE)) |
… | |
… | |
1522 | dir = sdir; |
1523 | dir = sdir; |
1523 | else if (smell) |
1524 | else if (smell) |
1524 | { |
1525 | { |
1525 | // no better smell found, so assume the player jumped, and erase this smell |
1526 | // no better smell found, so assume the player jumped, and erase this smell |
1526 | //printf ("erasing smell %d\n", op->ms ().smell);//D |
1527 | //printf ("erasing smell %d\n", op->ms ().smell);//D |
1527 | unordered_mapwalk (op, -1, -1, 1, 1) |
1528 | unordered_mapwalk (mapwalk_buf, op, -1, -1, 1, 1) |
1528 | m->at (nx, ny).smell = 0; |
1529 | m->at (nx, ny).smell = 0; |
1529 | } |
1530 | } |
1530 | } |
1531 | } |
1531 | |
1532 | |
1532 | //+GPL |
1533 | //+GPL |
… | |
… | |
1839 | |
1840 | |
1840 | if (op->glow_radius > 0) |
1841 | if (op->glow_radius > 0) |
1841 | return 1; |
1842 | return 1; |
1842 | |
1843 | |
1843 | if (op->map) |
1844 | if (op->map) |
1844 | unordered_mapwalk (op, -MAX_LIGHT_RADIUS, -MAX_LIGHT_RADIUS, MAX_LIGHT_RADIUS, MAX_LIGHT_RADIUS) |
1845 | unordered_mapwalk (mapwalk_buf, op, -MAX_LIGHT_RADIUS, -MAX_LIGHT_RADIUS, MAX_LIGHT_RADIUS, MAX_LIGHT_RADIUS) |
1845 | { |
1846 | { |
1846 | /* Check the spaces with the max light radius to see if any of them |
1847 | /* Check the spaces with the max light radius to see if any of them |
1847 | * have lights, and if any of them light the player enough, then return 1. |
1848 | * have lights, and if any of them light the player enough, then return 1. |
1848 | */ |
1849 | */ |
1849 | int light = m->at (nx, ny).light; |
1850 | int light = m->at (nx, ny).light; |