Pasi Kallinen
d91915dba3
Migration-safe monster movement iteration
...
The monster knockback could mess with the monster linked list while
the code was going through it for monster movements. (For example,
a monster knocked back another into a level teleport trap)
Add iter_mons_safe, which first grabs all the monster pointers in
the list into an array, and goes over that array instead of relying
on the "next monster" pointer. This is possible because dead monsters
are not removed from the linked list until after all the monsters
have moved.
Testing is very minimal, and I'm not sure the vault guard check
for migration is correct - it should probably check for more states?
Also the iterator could be improved by not continually allocating
and freeing the monster pointer array.
2022-08-10 11:04:04 +03:00
..
2022-02-04 11:01:20 -05:00
2022-03-13 13:58:56 -07:00
2022-05-05 10:26:58 -04:00
2022-07-19 21:23:26 +03:00
2022-07-19 21:23:26 +03:00
2020-08-03 22:07:36 -04:00
2020-08-03 22:07:36 -04:00
2020-08-03 22:07:36 -04:00
2021-07-24 17:52:47 -04:00
2022-07-27 12:21:07 +03:00
2022-06-30 23:48:18 -04:00
2022-06-30 23:48:18 -04:00
2022-08-10 11:04:04 +03:00
2022-07-16 15:36:25 -07:00
2020-08-03 22:07:36 -04:00
2022-07-16 20:38:00 -04:00
2021-01-26 21:06:16 -05:00
2022-06-30 23:48:18 -04:00
2022-06-30 23:48:18 -04:00
2022-08-10 11:04:04 +03:00
2022-07-10 11:14:10 -07:00
2021-10-16 12:12:21 -04:00
2022-02-07 14:22:41 -08:00
2022-07-15 13:48:29 -07:00
2022-08-09 11:54:45 +03: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
2020-08-03 22:07:36 -04:00
2022-06-30 23:48:18 -04:00
2020-08-03 22:07:36 -04:00
2020-08-03 22:07:36 -04:00
2022-06-30 23:48:18 -04:00
2022-08-07 22:33:47 +03:00
2022-05-27 15:28:49 -07:00
2022-02-16 23:04:02 +02:00
2022-06-30 23:48:18 -04:00
2022-08-06 10:55:04 +03:00
2022-06-30 23:48:18 -04:00
2022-01-28 08:30:08 +02:00
2022-07-23 23:11:13 -07:00
2022-08-04 16:53:31 -07:00
2022-07-23 23:14:12 -07:00
2021-10-16 12:12:21 -04:00
2021-08-21 07:59:18 -04:00
2020-08-03 22:07:36 -04:00
2021-05-23 11:11:58 +03:00
2022-06-30 23:48:18 -04:00
2021-12-19 19:31:19 -08:00
2022-07-15 13:48:29 -07:00
2022-07-23 23:11:13 -07:00
2022-06-30 23:48:18 -04:00
2022-06-30 23:48:18 -04:00
2022-05-07 10:25:13 -04:00
2022-03-02 13:09:42 -08:00
2022-02-01 13:03:41 -05:00
2020-08-03 22:07:36 -04:00
2020-08-12 16:15:28 -07:00
2021-10-16 12:12:21 -04:00
2022-03-15 13:46:56 +02:00
2022-06-30 23:48:18 -04:00
2022-07-27 22:51:17 +03:00
2021-10-05 01:11:24 -07:00
2021-10-21 08:48:23 -04:00
2021-10-16 12:12:21 -04:00
2021-10-22 12:27:10 -04:00
2022-06-30 23:48:18 -04:00
2022-07-03 00:35:32 -04:00
2022-03-16 21:27:06 -04:00
2022-07-03 00:35:32 -04:00
2022-07-03 00:35:32 -04:00
2022-07-03 00:35:32 -04:00
2022-07-03 00:35:32 -04:00
2021-01-26 10:27:51 -05:00
2020-08-03 22:07:36 -04:00
2022-07-10 11:14:10 -07:00
2022-01-11 10:25:50 -08:00