]> granicus.if.org Git - nethack/commitdiff
Merge branch 'NetHack-3.6'
authornhmall <nhmall@nethack.org>
Sun, 2 Jun 2019 20:19:53 +0000 (16:19 -0400)
committernhmall <nhmall@nethack.org>
Sun, 2 Jun 2019 20:19:53 +0000 (16:19 -0400)
1  2 
src/dungeon.c
src/mkobj.c
src/mon.c

diff --cc src/dungeon.c
Simple merge
diff --cc src/mkobj.c
index eb949d9a90d63cc7ca9bb29264d62e29224dfd9a,4b64a3f44d0af6696ba1641b04455fbfb0585bfd..7501158f89daa5737a846fecf10962ec44b724f8
@@@ -1721,10 -1721,19 +1721,19 @@@ place_object(otmp, x, y
  register struct obj *otmp;
  int x, y;
  {
 -    register struct obj *otmp2 = level.objects[x][y];
 +    register struct obj *otmp2 = g.level.objects[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)("place_object: \"%s\" [%d] off map <%d,%d>",
+                 safe_typename(otmp->otyp), otmp->where, x, y);
+     }
      if (otmp->where != OBJ_FREE)
-         panic("place_object: obj not free");
+         panic("place_object: obj \"%s\" [%d] not free",
+               safe_typename(otmp->otyp), otmp->where);
  
      obj_no_longer_held(otmp);
      if (otmp->otyp == BOULDER) {
diff --cc src/mon.c
index f76f67eee694f91656426b89c2408d0db5617b70,ac29cf8669a71114b3ae69828d40003167e7d4c0..a385eb7a490084e57b36e8eee8c244c11e531e10
+++ b/src/mon.c
@@@ -2631,10 -2632,10 +2630,10 @@@ struct monst *mon
  
      if (In_endgame(&u.uz)) {
          m1 = m2 = m3 = m4 = m5 = zm = (struct monst *) 0;
 -        if (!msgmv || (moves - msgmv) > 200L) {
 +        if (!msgmv || (g.moves - msgmv) > 200L) {
              if (!msgmv || rn2(2))
-                 You("feel besieged.");
+                 You_feel("besieged.");
 -            msgmv = moves;
 +            msgmv = g.moves;
          }
          /*
           * m1 an elemental from another plane.