]> granicus.if.org Git - nethack/commitdiff
R883 - disappearing thrown money
authorcohrs <cohrs>
Mon, 20 May 2002 05:03:13 +0000 (05:03 +0000)
committercohrs <cohrs>
Mon, 20 May 2002 05:03:13 +0000 (05:03 +0000)
this is a !GOLDOBJ bug, the money was not put back into ugold in this
case when it was not thrown

doc/fixes34.1
src/dothrow.c

index f9249e4a643c2c6cea9a888ddefc320299b9dcca..fe15ecbf7aa0a15d70696401295edddfb6ef956a 100644 (file)
@@ -108,6 +108,7 @@ avoid double billing if #loot causes a shop's bag of holding to explode
 when polymorphed, player killing a paper or straw golem via fire damage
        would kill the golem twice, resulting in an impossible error
 usually stop mimicing if you polymorph while using #monster mimic capability
+under !GOLDOBJ, gold shouldn't disappear if you try to throw it at yourself
 
 
 Platform- and/or Interface-Specific Fixes
index 8cc555036c23d328f9b3af2fcc2439565789a09e..34311ae549c5360c20f53f309e591793cf86178f 100644 (file)
@@ -1633,6 +1633,11 @@ struct obj *obj;
        register struct monst *mon;
 
        if(!u.dx && !u.dy && !u.dz) {
+#ifndef GOLDOBJ
+               u.ugold += obj->quan;
+               flags.botl = 1;
+               dealloc_obj(obj);
+#endif
                You("cannot throw gold at yourself.");
                return(0);
        }