]> granicus.if.org Git - nethack/commitdiff
Fix bz210, H4114: Castle chest can be trapped
authorPasi Kallinen <paxed@alt.org>
Thu, 24 Dec 2015 12:07:35 +0000 (14:07 +0200)
committerPasi Kallinen <paxed@alt.org>
Thu, 24 Dec 2015 12:07:35 +0000 (14:07 +0200)
doc/fixes36.1
src/sp_lev.c

index 92e097380215220cb24d68cd45458707502e317b..a2e3933f873d80bef853614dab55269f0a140ca2 100644 (file)
@@ -56,6 +56,7 @@ travel will displace pets rather than stop
 do not autopickup unpaid items in shops
 death due an unseen gas spore's explosion resulted in "killed by a died"
 allow optional parameter "true", "yes", "false", or "no" for boolean options
+actually make the castle chest not trapped
 
 
 Platform- and/or Interface-Specific Fixes
index dc454128a0b718b0b638fce3163319babe4a2bda..f65e3c270062dea26a89439c624a19cf255770f4 100644 (file)
@@ -1823,8 +1823,8 @@ struct mkroom *croom;
         otmp->obroken = 1;
         otmp->olocked = 0; /* obj generation may set */
     }
-    if (o->trapped)
-        otmp->otrapped = 1;
+    if (o->trapped == 0 || o->trapped == 1)
+        otmp->otrapped = o->trapped;
     if (o->greased)
         otmp->greased = 1;
 #ifdef INVISIBLE_OBJECTS
@@ -3023,7 +3023,7 @@ struct sp_coder *coder;
     tmpobj.lit = 0;
     tmpobj.eroded = 0;
     tmpobj.locked = 0;
-    tmpobj.trapped = 0;
+    tmpobj.trapped = -1;
     tmpobj.recharged = 0;
     tmpobj.invis = 0;
     tmpobj.greased = 0;