]> granicus.if.org Git - nethack/commitdiff
another melting ice follow up (trunk only)
authornethack.allison <nethack.allison>
Sun, 12 Oct 2003 15:45:20 +0000 (15:45 +0000)
committernethack.allison <nethack.allison>
Sun, 12 Oct 2003 15:45:20 +0000 (15:45 +0000)
Zapping existing ice with cold wand/spell guaranties safe ice for
a minimum of MIN_ICE_TIME time.

Note that it could actually cause the ice to melt sooner than
it previously would have due to the randomization, but that's
an internal that the non-wizard-mode player would  never
know anyway. The important thing from the hero's perspective
is that the ice should be safe for a while at least.

Also noticed and corrected a bug where the ice object effects
seem to have been getting initiated when solidifying lava in
zap.c

src/zap.c

index 4b807eff1068fbe27df614a2f8bdb94198f33bc8..2d3037021d7e5a811347b184b95b94d2941b402e 100644 (file)
--- a/src/zap.c
+++ b/src/zap.c
@@ -3666,9 +3666,16 @@ boolean *shopdamage;
                            newsym(x,y);
                        }
                    }
+                   if (!lava) {
+                       start_melt_ice_timeout(x,y);
+                       obj_ice_effects(x,y,TRUE);
+                   }
                }
-               start_melt_ice_timeout(x,y);
-               obj_ice_effects(x,y,TRUE);
+       }
+       else if(abstype == ZT_COLD && is_ice(x,y)) {
+               /* Already ice here, so just firm it up. */
+               spot_stop_timers(x, y, MELT_ICE_AWAY); /* stop existing timer */
+               start_melt_ice_timeout(x,y);           /* start new timer */
        }
        if(closed_door(x, y)) {
                int new_doormask = -1;