taking a corpse out of an ice box needs a couple of adjustments */
| 2778 | |
| 2779 | /* taking a corpse out of an ice box needs a couple of adjustments */ |
| 2780 | void |
| 2781 | removed_from_icebox(struct obj *obj) |
| 2782 | { |
| 2783 | if (!age_is_relative(obj)) { |
| 2784 | obj->age = svm.moves - obj->age; /* actual age */ |
| 2785 | if (obj->otyp == CORPSE) { |
| 2786 | struct monst *m = get_mtraits(obj, FALSE); |
| 2787 | boolean iceT = m ? (m->data == &mons[PM_ICE_TROLL]) |
| 2788 | : (obj->corpsenm == PM_ICE_TROLL); |
| 2789 | |
| 2790 | /* start a revive timer if this corpse is for an ice troll, |
| 2791 | otherwise start a rot-away timer (even for other trolls) */ |
| 2792 | obj->norevive = iceT ? 0 : 1; |
| 2793 | start_corpse_timeout(obj); |
| 2794 | } else if (obj->globby) { |
| 2795 | /* non-frozen globs gradually shrink away to nothing */ |
| 2796 | start_glob_timeout(obj, 0L); |
| 2797 | } |
| 2798 | } |
| 2799 | } |
| 2800 | |
| 2801 | /* an object inside a cursed bag of holding is being destroyed */ |
| 2802 | staticfn long |
no test coverage detected