allow teleport onto the vibrating square

Cherry-pick 3.7.0's 4a3d5f95d9
(github pull request #252).  Slightly tricky because the fix entry
nowgoes into a different file.  fixes37.0 will need fixing up.
This commit is contained in:
PatR
2019-12-13 15:58:56 -08:00
parent 62c271f21b
commit f8fbe4e989
2 changed files with 10 additions and 4 deletions

View File

@@ -1,4 +1,4 @@
$NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.0 $ $NHDT-Date: 1575665952 2019/12/06 20:59:12 $
$NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.2 $ $NHDT-Date: 1576281514 2019/12/13 23:58:34 $
This fixes36.4 file is here to capture information about updates in the 3.6.x
lineage following the release of 3.6.3 in December 2019. Hypothetical version
@@ -10,6 +10,7 @@ GDBPATH and GREPPATH from sysconf or -D... on compilation command line were
being processed even if PANICTRACE was disabled but only being freed
at end of game when that was enabled
fix the article used in the message when your steed encounters a polymorph trap
alloc teleporting onto the vibrating square
dozen-ish assorted spelling/typo fixes in messages and source comments

View File

@@ -1,4 +1,4 @@
/* NetHack 3.6 teleport.c $NHDT-Date: 1575245091 2019/12/02 00:04:51 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.94 $ */
/* NetHack 3.6 teleport.c $NHDT-Date: 1576281515 2019/12/13 23:58:35 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.95 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/*-Copyright (c) Robert Patrick Rankin, 2011. */
/* NetHack may be freely redistributed. See license for details. */
@@ -263,8 +263,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, &youmonst, 0))
return FALSE;
if (!tele_jump_ok(u.ux, u.uy, x, y))