Files
nethack/include
Michael Meyer fa1f1134c8 Disambiguate b_trapped null bodypart value
b_trapped was treating 0 as a null value for its bodypart parameter, but
0 is actually the value of ARM, so b_trapped(..., ARM) would be treated
as intending no A_CON abuse.  Add NO_PART = -1 to the bodypart_types
enum, and use that instead of 0 as the "no body part" value in
b_trapped, so that ARM can be passed to it without any ambiguity.

aosdict identified this issue in xNetHack and handled it differently; he
added NO_PART with a value of 0, incremented the existing bodypart_types
values, and padded the body part arrays so the actual body parts would
start at index 1.  I think using NO_PART = -1 is simpler, but that's an
alternative approach that can be used instead -- it is advantageous in
that it automatically fixes any other places where 0 is assumed to be a
non-body-part value that I may have overlooked.
2023-09-27 10:40:27 +03:00
..
2022-02-04 11:01:20 -05:00
2022-03-13 13:58:56 -07:00
2022-11-29 21:53:21 -05:00
2022-07-19 21:23:26 +03:00
2022-07-19 21:23:26 +03:00
2022-11-29 21:53:21 -05:00
2023-09-16 20:16:51 -04:00
2023-04-22 16:10:37 -07:00
2023-05-22 20:50:35 -04:00
2023-03-04 11:02:06 +02:00
2022-06-30 23:48:18 -04: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
2023-05-22 14:43:01 -07: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
2022-11-29 21:53:21 -05:00
2022-11-29 21:53:21 -05:00
2023-02-25 07:02:19 -08:00
2023-08-12 15:04:10 -07:00
2023-06-14 15:54:04 -07:00
2023-06-14 15:54:04 -07:00
2023-04-29 02:18:29 -07:00
2023-04-22 11:13:53 -04: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
2022-10-26 14:21:23 -04:00
2023-08-28 16:17:41 -04:00
2022-07-23 23:11:13 -07:00
2023-08-28 16:17:41 -04:00
2023-02-25 18:05:09 +02:00
2022-11-29 21:53:21 -05:00
2022-12-10 12:27:18 -05:00
2020-08-12 16:15:28 -07:00
2022-10-26 14:21:23 -04:00
2022-11-29 21:53:21 -05:00
2023-08-25 14:02:57 -04:00
2022-06-30 23:48:18 -04:00
2022-10-26 14:21:23 -04:00
2022-10-26 14:21:23 -04:00
2023-07-30 14:08:30 -07:00
2023-05-08 15:21:03 -07:00