* Move all object timers from src to dest, leaving src untimed. */
| 2336 | * Move all object timers from src to dest, leaving src untimed. |
| 2337 | */ |
| 2338 | void |
| 2339 | obj_move_timers(struct obj *src, struct obj *dest) |
| 2340 | { |
| 2341 | int count; |
| 2342 | timer_element *curr; |
| 2343 | |
| 2344 | for (count = 0, curr = gt.timer_base; curr; curr = curr->next) |
| 2345 | if (curr->kind == TIMER_OBJECT && curr->arg.a_obj == src) { |
| 2346 | curr->arg.a_obj = dest; |
| 2347 | dest->timed++; |
| 2348 | count++; |
| 2349 | } |
| 2350 | if (count != src->timed) |
| 2351 | panic("obj_move_timers"); |
| 2352 | src->timed = 0; |
| 2353 | } |
| 2354 | |
| 2355 | /* |
| 2356 | * Find all object timers and duplicate them for the new object "dest". |