Merge branch 'NetHack-3.6.0' of https://rodney.nethack.org:20040/git/NHsource into NetHack-3.6.0

This commit is contained in:
nhmall
2016-01-05 17:32:59 -05:00
9 changed files with 220 additions and 41 deletions

View File

@@ -1363,7 +1363,7 @@ register int aflag; /* intrinsic autosearch vs explicit searching */
unblock_point(x, y); /* vision */
exercise(A_WIS, TRUE);
nomul(0);
feel_location(x, y); /* make sure it shows up */
feel_newsym(x, y); /* make sure it shows up */
You("find a hidden passage.");
} else {
/* Be careful not to find anything in an SCORR or SDOOR */
@@ -1553,6 +1553,8 @@ int which_subset; /* when not full, whether to suppress objs and/or traps */
}
}
}
if (glyph == cmap_to_glyph(S_darkroom))
glyph = cmap_to_glyph(S_room); /* FIXME: dirty hack */
show_glyph(x, y, glyph);
}

View File

@@ -325,8 +325,7 @@ boolean with_you;
xyflags = mtmp->mtrack[0].y;
xlocale = mtmp->mtrack[1].x;
ylocale = mtmp->mtrack[1].y;
mtmp->mtrack[0].x = mtmp->mtrack[0].y = 0;
mtmp->mtrack[1].x = mtmp->mtrack[1].y = 0;
memset(mtmp->mtrack, MTSZ, sizeof(coord));
if (mtmp == u.usteed)
return; /* don't place steed on the map */

View File

@@ -123,13 +123,9 @@ int wall_there, dx, dy;
return spine;
}
/*
* Wall cleanup. This function has two purposes: (1) remove walls that
* are totally surrounded by stone - they are redundant. (2) correct
* the types so that they extend and connect to each other.
*/
/* Remove walls totally surrounded by stone */
void
wallification(x1, y1, x2, y2)
wall_cleanup(x1, y1, x2, y2)
int x1, y1, x2, y2;
{
uchar type;
@@ -138,9 +134,9 @@ int x1, y1, x2, y2;
/* sanity check on incoming variables */
if (x1 < 0 || x2 >= COLNO || x1 > x2 || y1 < 0 || y2 >= ROWNO || y1 > y2)
panic("wallification: bad bounds (%d,%d) to (%d,%d)", x1, y1, x2, y2);
panic("wall_cleanup: bad bounds (%d,%d) to (%d,%d)", x1, y1, x2, y2);
/* Step 1: change walls surrounded by rock to rock. */
/* change walls surrounded by rock to rock. */
for (x = x1; x <= x2; x++)
for (y = y1; y <= y2; y++) {
lev = &levl[x][y];
@@ -153,10 +149,9 @@ int x1, y1, x2, y2;
lev->typ = STONE;
}
}
fix_wall_spines(x1,y1,x2,y2);
}
/* Correct wall types so they extend and connect to each other */
void
fix_wall_spines(x1, y1, x2, y2)
int x1, y1, x2, y2;
@@ -181,11 +176,7 @@ int x1, y1, x2, y2;
if (x1<0 || x2>=COLNO || x1>x2 || y1<0 || y2>=ROWNO || y1>y2)
panic("wall_extends: bad bounds (%d,%d) to (%d,%d)",x1,y1,x2,y2);
/*
* Step 2: set the correct wall type. We can't combine steps
* 1 and 2 into a single sweep because we depend on knowing if
* the surrounding positions are stone.
*/
/* set the correct wall type. */
for (x = x1; x <= x2; x++)
for (y = y1; y <= y2; y++) {
lev = &levl[x][y];
@@ -217,6 +208,14 @@ int x1, y1, x2, y2;
}
}
void
wallification(x1, y1, x2, y2)
int x1, y1, x2, y2;
{
wall_cleanup(x1,y1,x2,y2);
fix_wall_spines(x1,y1,x2,y2);
}
STATIC_OVL boolean
okay(x, y, dir)
int x, y;

View File

@@ -271,6 +271,8 @@ boolean fleemsg;
}
mtmp->mflee = 1;
}
/* ignore recently-stepped spaces when made to flee */
memset(mtmp->mtrack, MTSZ, sizeof(coord));
}
STATIC_OVL void

View File

@@ -980,6 +980,7 @@ register int x, y;
}
}
memset(mtmp->mtrack, MTSZ, sizeof(coord));
place_monster(mtmp, x, y); /* put monster down */
update_monster_region(mtmp);