From: nethack.allison Date: Sun, 12 Oct 2003 15:45:20 +0000 (+0000) Subject: another melting ice follow up (trunk only) X-Git-Tag: MOVE2GIT~1713 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=23c884cbffe417b44bbf1b42964cc5d8e0abf41c;p=nethack another melting ice follow up (trunk only) 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 --- diff --git a/src/zap.c b/src/zap.c index 4b807eff1..2d3037021 100644 --- 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;