]> granicus.if.org Git - nethack/commitdiff
clear_bypasses() comment
authorPatR <rankin@nethack.org>
Mon, 19 Oct 2015 00:29:19 +0000 (17:29 -0700)
committerPatR <rankin@nethack.org>
Mon, 19 Oct 2015 00:29:19 +0000 (17:29 -0700)
While looking at clear_bypasses() I noticed some excluded code [#if 0]
which could be risky to include, so update the comment there.  Also,
excluded code tends to need formatting fix-up.

src/worn.c

index 00fa202ab7c7dae369c0096daecd5810933d7a44..8ccdb1a7fd9bd4dbb4bc64a987ae143092a042bf 100644 (file)
@@ -1,4 +1,4 @@
-/* NetHack 3.6 worn.c  $NHDT-Date: 1432512772 2015/05/25 00:12:52 $  $NHDT-Branch: master $:$NHDT-Revision: 1.44 $ */
+/* NetHack 3.6 worn.c  $NHDT-Date: 1445214551 2015/10/19 00:29:11 $  $NHDT-Branch: master $:$NHDT-Revision: 1.45 $ */
 /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
 /* NetHack may be freely redistributed.  See license for details. */
 
@@ -691,17 +691,19 @@ clear_bypasses()
         if (otmp->bypass) {
             otmp->bypass = 0;
 /* bypass will have inhibited any stacking, but since it's
-   used for polymorph handling, the objects here probably
-   have been transformed and won't be stacked in the usual
-   manner afterwards; so don't bother with this */
+ * used for polymorph handling, the objects here probably
+ * have been transformed and won't be stacked in the usual
+ * manner afterwards; so don't bother with this.
+ * [Changing the fobj chain mid-traversal would also be risky.]
+ */
 #if 0
-               if (objects[otmp->otyp].oc_merge) {
-                   xchar ox, oy;
+            if (objects[otmp->otyp].oc_merge) {
+                xchar ox, oy;
 
-                   (void) get_obj_location(otmp, &ox, &oy, 0);
-                   stack_object(otmp);
-                   newsym(ox, oy);
-               }
+                (void) get_obj_location(otmp, &ox, &oy, 0);
+                stack_object(otmp);
+                newsym(ox, oy);
+            }
 #endif /*0*/
         }
     }