digging in ice
If the spot in front of a closed drawbridge was ICE, digging there had issues....
This commit is contained in:
13
src/mkmaze.c
13
src/mkmaze.c
@@ -78,19 +78,22 @@ set_levltyp(coordxy x, coordxy y, schar newtyp)
|
||||
if (isok(x, y) && newtyp >= STONE && newtyp < MAX_TYPE) {
|
||||
if (CAN_OVERWRITE_TERRAIN(levl[x][y].typ)) {
|
||||
schar oldtyp = levl[x][y].typ;
|
||||
boolean was_ice = (levl[x][y].typ == ICE);
|
||||
/* typ==ICE || (typ==DRAWBRIDGE_UP && drawbridgemask==DB_ICE) */
|
||||
boolean was_ice = is_ice(x, y);
|
||||
|
||||
levl[x][y].typ = newtyp;
|
||||
/* TODO?
|
||||
* if oldtyp used flags or horizontal differently from
|
||||
* from the way newtyp will use them, clear them.
|
||||
* the way newtyp will use them, clear them.
|
||||
*/
|
||||
|
||||
if (IS_LAVA(newtyp))
|
||||
if (IS_LAVA(newtyp)) /* [what about IS_LAVA(oldtyp)=>.lit = 0?] */
|
||||
levl[x][y].lit = 1;
|
||||
|
||||
if (was_ice && newtyp != ICE)
|
||||
if (was_ice && newtyp != ICE) {
|
||||
/* frozen corpses resume rotting, no more ice to melt away */
|
||||
obj_ice_effects(x, y, TRUE);
|
||||
spot_stop_timers(x, y, MELT_ICE_AWAY);
|
||||
}
|
||||
if ((IS_FOUNTAIN(oldtyp) != IS_FOUNTAIN(newtyp))
|
||||
|| (IS_SINK(oldtyp) != IS_SINK(newtyp)))
|
||||
count_level_features(); /* level.flags.nfountains,nsinks */
|
||||
|
||||
Reference in New Issue
Block a user