SmartlyDressedGames / Unturned-3.x-Community

Community portion of the Unturned-3.x repo. If you have access to the source code you can find it here:
https://github.com/SmartlyDressedGames/Unturned-3.x/
87 stars 18 forks source link

everything broke #2436

Closed Buldozeris closed 3 years ago

Buldozeris commented 3 years ago

So, everything broke after this update. Multiple plugins kicking players and show no reason. At first i thought it was 1-2 plugins, which seemed to solve this kick issue, but other events started kicking. Maybe it is time to use "reverse" card?

Ascivv1 commented 3 years ago

Nelson stated that plugins using onTriggerReceive and onTriggerSend were going to be affected and since this seems to be part of the broader topic of rewriting the games netcode he most likely will not rollback this change. We need to wait until plugin developers rewrite their plugins to not use onTriggerReceive and onTriggerSend.

Bradler26 commented 3 years ago

If its this many major plugins I honestly think a rollback would be good. Ive had it effect join events on uconomy so i'm yet to even get to the other plugins. I'm all for the netcode rewrite but devs are gonna take weeks to remake their plugins and from what im hearing it sounds like a lot of servers are gonna loose core functionality for a while

Buldozeris commented 3 years ago

yes, will wait weeks or months for updates. Check server listing websites, various discord channels to see the scale of this problem.

SDGNelson commented 3 years ago

@Ascivv1 onTriggerReceive and onTriggerSend are not deprecated (yet), but onServerReadingPacket and onServerWritingPacket have been disabled.

All public APIs should behave the same, so the update will not be reverted, and it should be easy for plugin devs to update.

SDGNelson commented 3 years ago

If there are any bugs in the vanilla game or LDM those will of course be patched ASAP.

Bradler26 commented 3 years ago

Was anything reordered with ESteamPacket? The dev fixing my one plugin seems to think that could be the cause of some of the issues

Pustalorc commented 3 years ago

I've just investigated, and ESteamPacket got items re-ordered. Originally UPDATE_RELIABLE_BUFFER was index 15, but now on the new ESteamPacket its index 0, and index 15 is Kicked. Anyone getting a kicked message is because of a plugin that originally called ESteamPacket.UPDATE_RELIABLE_BUFFER which compiled to index 15 of the ESteamPacket enumerable, which now is Kicked, so they send Kicked, the server interprets that as them needing to be kicked and kicks them.

The real solution (other than reverting the order) is to recompile ALL PLUGINS with the latest game libs. Should solve all the issues with "kicked" and no reason.

SDGNelson commented 3 years ago

Ah, thanks for highlighting that. They were re-ordered so that the indices between ESteamPacket, EClientMessage, and EServerMessage line up.

Buldozeris commented 3 years ago

I've just investigated, and ESteamPacket got items re-ordered. Originally UPDATE_RELIABLE_BUFFER was index 15, but now on the new ESteamPacket its index 0, and index 15 is Kicked. Anyone getting a kicked message is because of a plugin that originally called ESteamPacket.UPDATE_RELIABLE_BUFFER which compiled to index 15 of the ESteamPacket enumerable, which now is Kicked, so they send Kicked, the server interprets that as them needing to be kicked and kicks them.

The real solution (other than reverting the order) is to recompile ALL PLUGINS with the latest game libs. Should solve all the issues with "kicked" and no reason. Thanks for the info. Just would be nice to know about such changes before update

TeemoCell commented 3 years ago

Thanks for the info. Just would be nice to know about such changes before update

Yeah, i have to disable the most plugins of my servers. Good job Nelson :)

SSGamingServers commented 3 years ago

Well he only cares for vanilla? Even though 99% of players play on Servers with plugins, its just like you attacking your own game for an update that is not that important. Makes no sense

SDGNelson commented 3 years ago

@SSGamingServers it is an important update for the future, and preserving backwards compatibility with plugins is important to me - for example the February 23rd commits here are all to ensure Rocket plugins were able to use the older events without issue: https://github.com/SmartlyDressedGames/Legally-Distinct-Missile/commits/master

Unfortunate that all of this was caused by changes to an old enum. I had not realized that the enum values were compiled into plugins as constants, rather than re-evaluated at load time. For the patch this afternoon I have made a change to remap specifically index 15 and 16 to index 0 and 1 in sendToClient so that in most cases older plugins will not need to be recompiled.

SDGNelson commented 3 years ago

Sorry for the hassle. Closing since I believe this is resolved, but feel free to comment and I will re-open.

odstfive commented 3 years ago

Hey so I don't know if this is a direct causation of this incident but now a lot of servers from my server hoster (Lyhme) are unable to connect to our web server panel. Not sure if it's from this or another issue but this is what it says (image below) and people in my discord told me it was a cause of this. unknown (2) 2131534 unknown (3)

SDGNelson commented 3 years ago

@odstfive Better to open a separate issue for that, however it does not look related to the game update. Judging from "target machine actively refused" it sounds like a firewall or configuration issue.