]> granicus.if.org Git - nethack/commitdiff
comment out some now dead code
authornhmall <nhmall@nethack.org>
Thu, 10 Feb 2022 14:16:29 +0000 (09:16 -0500)
committernhmall <nhmall@nethack.org>
Thu, 10 Feb 2022 14:16:29 +0000 (09:16 -0500)
Closes #670

src/teleport.c

index 9b78d6244273172d8a5bbd529e6128d289ed52ae..df0a19ad509fda0e05407f73c0d2c481931a8c9c 100644 (file)
@@ -729,6 +729,9 @@ dotele(
            but they both yield the same result.] */
 #define spellev(spell_otyp) ((int) objects[spell_otyp].oc_level)
         energy = 5 * spellev(SPE_TELEPORT_AWAY);
+#if 0
+        /* the addition of !break_the_rules to the outer if-block in
+           1ada454f rendered this dead code */
         if (break_the_rules) {
             if (!castit)
                 energy = 0;
@@ -739,7 +742,9 @@ dotele(
                having enough to cast (which also uses the move) */
             else if (u.uen < energy)
                 energy = u.uen;
-        } else if (u.uhunger <= 10) {
+        } else
+#endif
+        if (u.uhunger <= 10) {
             cantdoit = "are too weak from hunger";
         } else if (ACURR(A_STR) < 4) {
             cantdoit = "lack the strength";