Merge branch 'copperwater-vs_teleport' into NetHack-3.7

Closes #252
This commit is contained in:
Patric Mueller
2019-12-08 20:00:31 +01:00
2 changed files with 8 additions and 2 deletions

View File

@@ -15,6 +15,7 @@ message "your knapsack can't accomodate any more items" when picking stuff up
pending; vary the message rather than add more convoluted pickup code
function calls made from mapglyph based on dungeon level are now called once
per level
allow teleporting onto the vibrating square
Fixes to Pre-3.7.0 Problems that Were Exposed Via git Repository

View File

@@ -260,8 +260,13 @@ teleok(x, y, trapok)
register int x, y;
boolean trapok;
{
if (!trapok && t_at(x, y))
return FALSE;
if (!trapok) {
/* allow teleportation onto vibrating square, it's not a real trap */
struct trap *trap = t_at(x, y);
if (trap && trap->ttyp != VIBRATING_SQUARE) {
return FALSE;
}
}
if (!goodpos(x, y, &g.youmonst, 0))
return FALSE;
if (!tele_jump_ok(u.ux, u.uy, x, y))