Mapthings are not synced on the network, yet are editable by Lua
This creates an evil pitfall for mods to run into, and is quite frustrating. This could have two solutions:
-
Add network sync code to mapthings. This is probably easier in the short term.
-
Make mapthings read-only from Lua. Instead, copy all of the mapthing variables over to mobj when it is spawned. This is more difficult, and some mods that are editing mapthings without any regard for netsync will now error. However, this would bring
mapthing_t
closer to their original purpose in Doom, as an reference point when spawning an object which only needs to be referred to at runtime when handling respawning things, and reduce some of the mapthing vs mobj confusion over the long term.
Ring Racers takes the second approach already, I can port this code over if desired.