-$NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.0 $ $NHDT-Date: 1557358216 2019/05/08 23:30:16 $
+$NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.0 $ $NHDT-Date: 1557526914 2019/05/10 22:21:54 $
This fixes36.3 file is here to capture information about updates in the 3.6.x
lineage following the release of 3.6.2 in May 2019. Please note, however,
General Fixes and Modified Features
-----------------------------------
+when place_object() puts a non-boulder on the map at a spot which contains
+ other objects, put it under all boulders in the pile rather than just
+ under the top one; previously, map wasn't showing a boulder there if
+ the top one got moved by means other than pushing
Fixes to Post-3.6.2 Problems that Were Exposed Via git Repository
General New Features
--------------------
+classify sources as released, beta, or work-in-progress via NH_DEVEL_STATUS
+ rather than just released vs beta via BETA
NetHack Community Patches (or Variation) Included
-/* NetHack 3.6 mkobj.c $NHDT-Date: 1548978605 2019/01/31 23:50:05 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.142 $ */
+/* NetHack 3.6 mkobj.c $NHDT-Date: 1557526914 2019/05/10 22:21:54 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.144 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/*-Copyright (c) Derek S. Ray, 2015. */
/* NetHack may be freely redistributed. See license for details. */
panic("place_object: obj not free");
obj_no_longer_held(otmp);
- /* (could bypass this vision update if there is already a boulder here) */
- if (otmp->otyp == BOULDER)
- block_point(x, y); /* vision */
-
- /* obj goes under boulders */
- if (otmp2 && (otmp2->otyp == BOULDER)) {
+ if (otmp->otyp == BOULDER) {
+ if (!otmp2 || otmp2->otyp != BOULDER)
+ block_point(x, y); /* vision */
+ }
+
+ /* non-boulder object goes under boulders so that map will show boulder
+ here without display code needing to traverse pile chain to find one */
+ if (otmp2 && otmp2->otyp == BOULDER && otmp->otyp != BOULDER) {
+ /* 3.6.3: put otmp under last consecutive boulder rather than under
+ just the first one; multiple boulders at same spot in new games
+ will be consecutive due to this, ones in old games saved before
+ this change might not be; can affect the map display if the top
+ boulder is moved/removed by some means other than pushing */
+ while (otmp2->nexthere && otmp2->nexthere->otyp == BOULDER)
+ otmp2 = otmp2->nexthere;
otmp->nexthere = otmp2->nexthere;
otmp2->nexthere = otmp;
} else {
+ /* put on top of current pile */
otmp->nexthere = otmp2;
level.objects[x][y] = otmp;
}
/* set the new object's location */
otmp->ox = x;
otmp->oy = y;
-
otmp->where = OBJ_FLOOR;
/* add to floor chain */