ice followup

Ensure that we don't start a timer on ice that
the player or a monster didn't create when
zapping existing ice.
This commit is contained in:
nethack.allison
2003-10-14 11:06:58 +00:00
parent d7ae45997c
commit dbc6ff00df
+3
View File
@@ -3674,9 +3674,12 @@ boolean *shopdamage;
} }
else if(abstype == ZT_COLD && is_ice(x,y)) { else if(abstype == ZT_COLD && is_ice(x,y)) {
/* Already ice here, so just firm it up. */ /* Already ice here, so just firm it up. */
/* Now ensure that only ice that is already timed is affected */
if (spot_time_left(x,y,MELT_ICE_AWAY)) {
spot_stop_timers(x, y, MELT_ICE_AWAY); /* stop existing timer */ spot_stop_timers(x, y, MELT_ICE_AWAY); /* stop existing timer */
start_melt_ice_timeout(x,y); /* start new timer */ start_melt_ice_timeout(x,y); /* start new timer */
} }
}
if(closed_door(x, y)) { if(closed_door(x, y)) {
int new_doormask = -1; int new_doormask = -1;
const char *see_txt = 0, *sense_txt = 0, *hear_txt = 0; const char *see_txt = 0, *sense_txt = 0, *hear_txt = 0;