Closed MarkJeronimus closed 3 weeks ago
I don't think this is a safe change - not because of the order of the teleporter list, but because they aren't in the old list anymore. Couldn't you potentially give the teleport destination monster properties with dehacked? You can also give it more physical properties in udmf that might matter. Rather than changing the core thinker list, I would suggest maintaining a separate teleporter list (probably in p_telept, exposed by stuff like P_RegisterTeleportDestination
).
It doesn't desync on this monstrous demo, so I think we're safe. https://www.doomworld.com/forum/post/2459281
Lol I didn't even see your reply even when I replied. Yeah, that could be a problem in maps that use more exotic stuff if there's a need for teleport destinations in the main list. You're free to rewrite this as you see fit. For Oversaturation, Vytaan is happy using it as we speak, even if it's a one-off build.
Closing this PR but anyone who wants to take the alternate approach can create a new one in the future.
This fixes the extreme lag in Oversaturation when thousands of zombies try to teleport in, and the th_misc class thinker list is around 60000 elements long.
Bofu correctrly voices his concern about desyncs. I think, if the teleport destinations in the list can be guaranteed to be in the same order, there should be no desyncs.