place_object(obj,0,0) debugging

Got a hit (on Plane of Water) pretty quickly.
This commit is contained in:
PatR
2019-06-02 05:02:08 -07:00
parent 852995bbeb
commit 4e119f4f00
2 changed files with 19 additions and 3 deletions

View File

@@ -1,4 +1,4 @@
/* NetHack 3.6 dungeon.c $NHDT-Date: 1558853012 2019/05/26 06:43:32 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.94 $ */
/* NetHack 3.6 dungeon.c $NHDT-Date: 1559476918 2019/06/02 12:01:58 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.95 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/*-Copyright (c) Robert Patrick Rankin, 2012. */
/* NetHack may be freely redistributed. See license for details. */
@@ -1190,6 +1190,13 @@ void
u_on_newpos(x, y)
int x, y;
{
if (!isok(x, y)) { /* validate location */
void VDECL((*func), (const char *, ...)) PRINTF_F(1, 2);
func = (x < 0 || y < 0 || x > COLNO - 1 || y > ROWNO - 1) ? panic
: impossible;
(*func)("u_on_newpos: trying to place hero off map <%d,%d>", x, y);
}
u.ux = x;
u.uy = y;
#ifdef CLIPPING