attempt to fix github issue #965 - place_object

Issue reported for a hardfought player by k2:  dying in a shop wall
produced "place_object: <item> [0] off map <0,0>" when hero's invent
was dropped.  It happened in Mine Town where multiple shopkeepers are
present and it is possible to have two shops share a wall.

I could not reprouce the problem, even after setting up--and dying
various times at a gap in--a wall shared by two shops.

paybill() -> inherits() -> set_repo_loc() sets up the destination
prior to disclosure and finish_paybill() -> drop_upon_death() later
places invent at the spot iff bones are going to he saved.  inherits()
is convoluted and evidently took at least one path that failed to
call set_repo_loc().  Change it to always call set_repo_loc() when
returning 'True' so that the destination should always be set if
really_done() calls finish_paybill().

Some followups by entrez are probably still useful.

Closes #965
This commit is contained in:
PatR
2023-02-06 11:47:37 -08:00
parent 7401b44fa1
commit 1d06fa62a9
3 changed files with 66 additions and 28 deletions

View File

@@ -1105,6 +1105,8 @@ very rarely random items are generated eroded, erodeproof, or greased
Nazgul can see invisible
fix a case where punished iron ball yanked hero on top of a monster
slightly randomize amount of items and monsters in the mines
dying in a wall spot (temporary gap or via Passes_walls) shared by two shops
could result in "place_object: \"<item>\" [0] off map <0,0>" warnings
Fixes to 3.7.0-x Problems that Were Exposed Via git Repository