]> granicus.if.org Git - nethack/commitdiff
Wrong weight of corpses on special levels
authorcohrs <cohrs>
Sat, 22 May 2004 18:23:59 +0000 (18:23 +0000)
committercohrs <cohrs>
Sat, 22 May 2004 18:23:59 +0000 (18:23 +0000)
Incorporate a fix from <Someone> related to slashem-Bugs-916544.  The
weight was not recalcuated after changing the corpsenm.

doc/fixes34.4
src/sp_lev.c

index 77f419f4d84cee09e6bf8542d254bc1b30c5be3b..cc240d41a9aa86914a45a7bfb71b97a7c4f6d0bb 100644 (file)
@@ -25,6 +25,7 @@ be consistent with use of "removing" rather than "lifting" for encumber
        messages associated with taking things out of a bag of holding
 cursed scroll of destroy armor damaging cursed armor didn't adjust attributes
 add passive() flag that indicates uwep was destroyed during the turn
+calculate weight of corpses on special levels correctly
 
 
 Platform- and/or Interface-Specific Fixes
index b42903aa54a12b5e9ad53f699ccabde30a140e4f..f0fe4c94c8290c77d11196d45105088246499da6 100644 (file)
@@ -963,8 +963,11 @@ struct mkroom      *croom;
        }
 
        /*      corpsenm is "empty" if -1, random if -2, otherwise specific */
-       if (o->corpsenm == NON_PM - 1) otmp->corpsenm = rndmonnum();
-       else if (o->corpsenm != NON_PM) otmp->corpsenm = o->corpsenm;
+       if (o->corpsenm != NON_PM) {
+           if (o->corpsenm == NON_PM - 1) otmp->corpsenm = rndmonnum();
+           else otmp->corpsenm = o->corpsenm;
+           otmp->owt = weight(otmp);
+       }
 
        /* assume we wouldn't be given an egg corpsenm unless it was
           hatchable */