… | |
… | |
1147 | |
1147 | |
1148 | void |
1148 | void |
1149 | monster_check_pickup (object *monster) |
1149 | monster_check_pickup (object *monster) |
1150 | { |
1150 | { |
1151 | object *tmp, *next; |
1151 | object *tmp, *next; |
1152 | int next_tag; |
|
|
1153 | |
1152 | |
1154 | for (tmp = monster->below; tmp != NULL; tmp = next) |
1153 | for (tmp = monster->below; tmp != NULL; tmp = next) |
1155 | { |
1154 | { |
1156 | next = tmp->below; |
1155 | next = tmp->below; |
1157 | next_tag = next ? next->count : 0; |
|
|
1158 | if (monster_can_pick (monster, tmp)) |
1156 | if (monster_can_pick (monster, tmp)) |
1159 | { |
1157 | { |
1160 | remove_ob (tmp); |
1158 | remove_ob (tmp); |
1161 | tmp = insert_ob_in_ob (tmp, monster); |
1159 | tmp = insert_ob_in_ob (tmp, monster); |
1162 | (void) monster_check_apply (monster, tmp); |
1160 | (void) monster_check_apply (monster, tmp); |
1163 | } |
1161 | } |
1164 | /* We could try to re-establish the cycling, of the space, but probably |
1162 | /* We could try to re-establish the cycling, of the space, but probably |
1165 | * not a big deal to just bail out. |
1163 | * not a big deal to just bail out. |
1166 | */ |
1164 | */ |
1167 | if (next && was_destroyed (next, next_tag)) |
1165 | if (next && next->destroyed ()) |
1168 | return; |
1166 | return; |
1169 | } |
1167 | } |
1170 | } |
1168 | } |
1171 | |
1169 | |
1172 | /* |
1170 | /* |