Files
nethack/include
PatR e2a3c98aac worn/wielded pointer sanity checks
Check the various uarm, uwep, and so forth pointers to make sure that
they point to items in hero's inventory and that those items have the
corresponding W_ARM, W_WEP, &c bit set in their owornmask field.
Also check whether any other items in inventory have the same bit set.
[Some of this is already handled by sanity_check_worn() in mkobj.c.]

Also validate two-weapon combat mode.  I don't recall ever seeing any
problems reported about it though.

Does not validate ball and chain.  Those should have their own sanity
checks that validate a bunch of other stuff besides just worn slots.
They already get some checking by the normal object tests.

This works ok with 'sanity_check' set and items worn and wielded
normally.  The only insane situation tested was by reverting the
confused-looting-with-quivered-gold fix from earlier today.  I haven't
used a debugger to force other such problems so this isn't very
thoroughly tested.
2024-02-09 23:32:16 -08:00
..
2022-02-04 11:01:20 -05:00
2022-03-13 13:58:56 -07:00
2022-07-19 21:23:26 +03:00
2023-12-16 06:16:51 -05:00
2022-11-29 21:53:21 -05:00
2024-01-29 08:40:05 -05:00
2023-05-22 20:50:35 -04:00
2024-01-04 10:37:38 -05:00
2022-06-30 23:48:18 -04:00
2023-12-22 19:24:09 -05:00
2024-01-28 01:13:08 -08:00
2023-12-06 21:41:49 -05:00
2023-03-01 14:00:29 +02:00
2021-01-26 21:06:16 -05:00
2023-05-04 06:02:23 -07:00
2024-02-09 23:32:16 -08:00
2024-02-07 19:50:38 +02:00
2023-05-22 14:43:01 -07:00
2024-01-07 12:03:45 -08:00
2024-02-04 21:56:09 -05:00
2022-07-01 08:36:03 -04:00
2022-03-11 07:33:28 -05:00
2022-06-19 02:30:45 -07:00
2023-12-09 12:43:41 +02:00
2022-11-29 21:53:21 -05:00
2023-02-25 07:02:19 -08:00
2024-01-12 17:06:47 -08:00
2023-06-14 15:54:04 -07:00
2024-02-07 19:50:38 +02:00
2023-11-22 16:01:58 -05:00
2022-10-26 14:21:23 -04:00
2022-10-26 14:21:23 -04:00
2022-10-26 14:21:23 -04:00
2023-10-16 09:11:05 -04:00
2022-07-23 23:11:13 -07:00
2023-02-25 18:05:09 +02:00
2022-11-29 21:53:21 -05:00
2023-11-22 16:01:58 -05:00
2023-11-22 16:01:58 -05:00
2020-08-12 16:15:28 -07:00
2024-01-12 14:17:50 -08:00
2024-01-28 01:13:08 -08:00
2023-11-22 16:01:58 -05:00
2022-11-29 21:53:21 -05:00
2023-11-22 16:01:58 -05:00
2022-06-30 23:48:18 -04:00
2023-11-22 16:01:58 -05:00
2023-11-20 00:47:12 -08:00
2023-11-22 16:01:58 -05:00
2022-10-26 14:21:23 -04:00
2022-10-26 14:21:23 -04:00