vault guard bug: dropping minvent at <0,0> (trunk only)
From the newsgroup: after killing a vault guard on a level where
every object had been removed or was held by the hero, object detection
gave feedback about finding something but was unable to show anything.
It was finding the dead guard's inventory at <0,0>, a part of the map
which never gets shown. A dying guard is sent to that location instead
of being killed and deleted, because the data for his temporary corridor
to/from the vault is kept in the egd structure attached to him. That's
somewhat obscure but works; dying guards just need to drop inventory
before being transfered there rather than after.
Depending upon how they're killed, it's possible that the umpteen
places in the code that loop over fmon might have been processing them
as if still in play. This sets their mhp to 0 so such loops will ignore
them, and teaches dmonsfree() not to release them. Once the temporary
corridor has been removed, their isgd flag is cleared and they become
ordinary dead monsters and get deleted from the fmon list the next time
it's purged.
This also lets you throw gold to/at the guard when he tells you to
drop it. He already would catch it, but now he won't treat the throw as
an attack. Any gold he carries will eventually disappear when he does,
so dropping it remains a better option for the player.
This commit is contained in:
@@ -382,6 +382,8 @@ all statues in a cockatrice nest were for giant ant if 'record' was empty
|
||||
when dying outside all shops on a level with multiple shopkeepers and one takes
|
||||
hero's stuff, choose one who is owed money over first one on fmon list
|
||||
hero poly'd into a critter without hands could still open tins
|
||||
if a vault guard was killed, his inventory would be dropped at <0,0>
|
||||
throwing gold to/at a vault guard will no longer be treated as an attack
|
||||
|
||||
|
||||
Platform- and/or Interface-Specific Fixes
|
||||
|
||||
Reference in New Issue
Block a user