kill off any eggs of genocided monsters */
| 5606 | |
| 5607 | /* kill off any eggs of genocided monsters */ |
| 5608 | staticfn void |
| 5609 | kill_eggs(struct obj *obj_list) |
| 5610 | { |
| 5611 | struct obj *otmp; |
| 5612 | |
| 5613 | for (otmp = obj_list; otmp; otmp = otmp->nobj) |
| 5614 | if (otmp->otyp == EGG) { |
| 5615 | if (dead_species(otmp->corpsenm, TRUE)) { |
| 5616 | /* |
| 5617 | * It seems we could also just catch this when |
| 5618 | * it attempted to hatch, so we wouldn't have to |
| 5619 | * search all of the objlists.. or stop all |
| 5620 | * hatch timers based on a corpsenm. |
| 5621 | */ |
| 5622 | kill_egg(otmp); |
| 5623 | } |
| 5624 | #if 0 /* not used */ |
| 5625 | } else if (otmp->otyp == TIN) { |
| 5626 | if (dead_species(otmp->corpsenm, FALSE)) |
| 5627 | otmp->corpsenm = NON_PM; /* empty tin */ |
| 5628 | } else if (otmp->otyp == CORPSE) { |
| 5629 | if (dead_species(otmp->corpsenm, FALSE)) |
| 5630 | ; /* not yet implemented... */ |
| 5631 | #endif |
| 5632 | } else if (Has_contents(otmp)) { |
| 5633 | kill_eggs(otmp->cobj); |
| 5634 | } |
| 5635 | } |
| 5636 | |
| 5637 | /* kill all members of genocided species */ |
| 5638 | void |
no test coverage detected