* Find all object timers and duplicate them for the new object "dest". */
| 2356 | * Find all object timers and duplicate them for the new object "dest". |
| 2357 | */ |
| 2358 | void |
| 2359 | obj_split_timers(struct obj *src, struct obj *dest) |
| 2360 | { |
| 2361 | timer_element *curr, *next_timer = 0; |
| 2362 | |
| 2363 | for (curr = gt.timer_base; curr; curr = next_timer) { |
| 2364 | next_timer = curr->next; /* things may be inserted */ |
| 2365 | if (curr->kind == TIMER_OBJECT && curr->arg.a_obj == src) { |
| 2366 | (void) start_timer(curr->timeout - svm.moves, TIMER_OBJECT, |
| 2367 | curr->func_index, obj_to_any(dest)); |
| 2368 | } |
| 2369 | } |
| 2370 | } |
| 2371 | |
| 2372 | /* |
| 2373 | * Stop all timers attached to this object. We can get away with this because |
no test coverage detected