fix some of #H7156 - perm_invent issues
> [1. perm_invent is kept in flags so persists across save/restore, but > perm_invent capability can change if player restores with a different > interface--or same one running on a different-sized display--so it > ought to be in iflags instead.] Not addressed here. > 2. perm_invent window does not get updated when charging a wand (or > other chargeable item presumably), with a scroll of charging. Most scrolls rely on useup() -> update_inventory(), but charging uses up the scroll early so that it will be gone from inventory when choosing an item to charge. It needed an explicit update_inventory() after charging. > 3. update_inventory(), is called from setworn(), which is called from > dorestore(), when loading a save. Segfaults have been observed in > variants based on this code (though not yet in vanilla 3.6.1), so it's > possible this may be unsafe. The update_inventory() call in setworn() > could be protected with "if (!restoring) ..." tty doesn't support perm_invent, so this might be a win32 issue. I've made the suggested change, but a better fix would be to turn off perm_invent as soon as options processing (new game) or options restore (old game unless/until #1 gets changed) has finished setting things up, then turn it back on at the end of moveloop()'s prolog when play is about to start. = = Most of the read.c change is reordering prototypes to match the order of the corresponding functions. I did this when adding a new static routine, then ended up discarding that routine.
This commit is contained in:
@@ -14,6 +14,8 @@ Killing Vlad while he was in bat/fog cloud/wolf form gave poorly worded
|
||||
spaces in hilite_status option title text field not working
|
||||
numeric hilite_status values didn't allow negative numbers (needed for AC);
|
||||
change them to accept leading '-', also accept unary '+' as a no-op
|
||||
permanent inventory window was updated too soon when a scroll of charging
|
||||
was used to [re]charge an item, not reflecting the item's change(s)
|
||||
|
||||
|
||||
Fixes to Post-3.6.1 Problems that Were Exposed Via git Repository
|
||||
|
||||
Reference in New Issue
Block a user