This solves the LAN servers of Zandronum. It’s not ideal since if one day OpenBSD gets Zandronum’s support, LAN servers may not work. We’ll have to solve that if the day comes, but this is the simplest solution for the moment, and I’d rather try to prevent a situation where I have to guess how Zandronum would behave in said new platform.
Well, working on OpenBSD without the srb2 thing is a pain because 1/5 of the tries end up with a crash caused by srb2 (heck, pretty much all runtime crashes come from that, except for the exit crash). I decided to check for sizes across multiple platforms, and all of them have a header size of 84, and the final header has a size of 0. For some reason, in OpenBSD it has random gigantic sizes (1919905893, 1802265971, 1297293506, 1802265971 for example (in decimal)). All the instances encountered were over 0x0FFFFFFF with plenty of room, and while the header size may vary in the future, it won’t even get close to that.
The rest of the values (id, type, room) also get mangled: 0x35303239, 0x00000000 and 0x875b5553 vs the expected 0x32330000, 0x10000000, 0x000000ce, but I can’t tell how useful this info is.
If SRB2 plugin doesn’t work correctly on BSD can’t you just disable it from the query menu? It won’t contact the master server anymore and the crashy code won’t trigger.
I’d also figure that SRB2 plugin will be next to useless in OpenBSD so maybe we could add an if check to CMake that will disable it altogether in OpenBSD? Fixing it would be more preferable, but is there a point in doing so?
Actually, probably yes, I’ve been able to compile and run SRB2 without problems, and I can play online games. So, while probably OpenBSD is not supported, it can be used to play SRB2. That said, if you consider that we should disble the plugin anyway, I’ll do so.
If the game works on the platform then I think we should make effort in fixing the problem instead of disabling the plugin.
Could you please copy this info about SRB2 and the one in the PR description and post them as a comment to #3499? It may be relevant and I don’t want it to get lost.
Yeah, I clould disable it, but then you can’t use it. The point is to fix it so people can use it. For most of the development, I actually disabled the plugin, but for the sake of testing things in a clean environment I removed the config from time to time :)