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/
84 stars 18 forks source link

invisible players #1997

Closed nanashi88 closed 1 year ago

nanashi88 commented 3 years ago

Hello, there was an invisible player who could see me and shoot me, but I can't see him. I have encountered this issue about a month ago on sandbox servers, but I thought it might be their plug-ins .. before few days a player reported same issue at our servers. and today a friend encoutered the same issue on different servers.

here is some videos: https://www.youtube.com/watch?v=6gpFYxdiys4&ab_channel=Zenmaster

I would like to qoute what he said: ... as you see in the video he neither does sound at shooting but he does at reloading ... it was bug 100% cause my friend relogged and could see him while i couldnt then he relogged (the suspect) and i could see him

nanashi88 commented 3 years ago

here is another video https://www.youtube.com/watch?v=nb2PO5pRINQ on this video, admins validated shooter location (from server logs) he was near the crushed vehicles

TH3AL3X commented 3 years ago

It's something related of Max Players, some plugins can override that and bypass the queque position, like 32/24, etc... , thats make those bugs

Edit: my phone auto text

nanashi88 commented 3 years ago

btw, about what happened to me, it was on 3/7/2020, but I noticed some difference that the killer name doesn't show , it shows like ?[?] so maybe that is different bug.

nanashi88 commented 3 years ago

It's something related of Max Players, someone plugins can override that and bypass the queque position, like 32/24, etc... , thats make those bugs

I could confirm that at least two of the servers has this feature @TH3AL3X thank you

rube200 commented 3 years ago

What happen when do u teleport to that invisible player?

TH3AL3X commented 3 years ago

What happen when do u teleport to that invisible player?

I think you can't, because doesn't appear in the user list

ghost commented 3 years ago

What happen when do u teleport to that invisible player?

It would probably work because the server is still sending/receiving from them, since they are still connected, thus they're probably in the server's Provider.clients list, and commands execute on the server.

I wonder if Nelson changed some way the networking works to cause issues if there are more players then max players allows. I've seen this way in the past, but thought it was just a fluke, and heard nothing more about it. Would be nice if he just let servers go up to 48 slots at least without being delisted, although "you should do it because all of the servers bypass this anyway" isn't the best argument for it.

nanashi88 commented 3 years ago

there was something at 11/9 game update :

"-HostPlayerLimit" command-line parameter for hosting providers.

what is this for? is it related to add extra players slots?

rube200 commented 3 years ago

in case the problem is the maximum fake slots, this can be steamworks itself because I didn't find anything that could cause this on unturned code

TH3AL3X commented 3 years ago

there was something at 11/9 game update :

"-HostPlayerLimit" command-line parameter for hosting providers.

what is this for? is it related to add extra players slots?

Not really, the problem comes when the server is using a plugin that makes a jump from the queque position.

Edit: google translator...

SDGNelson commented 3 years ago

Judging especially by the "? [?]" text, it appears the client has not received the packet informing them the other player has connected. The other player does exist on the server, but not specific clients. If you do have plugins affecting the login queue or tampering with packets those are likely causes. With the future netcode improvements I would like to make this harder to break.

what is this for? is it related to add extra players slots?

It was requested by hosting providers to limit servers to particular max players. For example if a customer is renting an 8 slot server they can set max players to 8, but any higher value will be clamped to 8.

nanashi88 commented 3 years ago

we have disabled the module that adds extra slots few days ago, and unfortunately we just received the following report:

cheater on russia 1
invisible nickname
i cant find him in menu

Update: sorry, the reported talking about not being able to get the player name. but he actaully saw his character in-game

then so far, no more reports on invisible players after disabling "players extra slots"

TH3AL3X commented 3 years ago

nanashi88 , where i can contact with you? , add me via discord if you can, i want to talk with you TERROR#1337

nanashi88 commented 3 years ago

@TH3AL3X sorry, just noticed. I have added you

baranmod commented 3 years ago

I think thats a very big issue currently. Usually, there are 2-3 invisible players per day, sometimes it starts in waves and one player becomes invisible after another. Not sure if its actually slot extending plugin's fault or not (it happened once with 15~ players online). If it is, then, honestly, those slot limitations should be lifted. Most of somewhat popular servers are way above 24 players and large map + 24 players gives a death taste to the game..

SDGNelson commented 3 years ago

Is this slot extending plugin on GitHub? I can take a look and see what it might be doing that would cause issues.

ghost commented 3 years ago

Is this slot extending plugin on GitHub? I can take a look and see what it might be doing that would cause issues.

I believe it is: https://github.com/Tortellio/MaxplayerModifier/blob/master/Main.cs

The bug itself is strange though. We use our own custom max players plugin, but have had zero reports of any invisible players, even with servers up to 30+ players. image (Graph is just of player count per server, with each server being colorized, might not be best way to show that data)

It might be because that plugin is constantly changing the max-players up and down that causes this issues with clients?

baranmod commented 3 years ago

Personally, using custom one. Also, questioned one "invisible player" a bit today. He mentioned that his teammates (in-game group) seen him normally while others couldn't. Can't tell if he became invisible for others at the moment he connected to server or later. Checked his client log, didn't see any errors on connection

TH3AL3X commented 3 years ago

It's very weird, because I remember, if you reconnected you could see the player for strange reasons....

SDGNelson commented 3 years ago

Thanks Miku. Looking at the related code nothing jumps out at me as a huge issue, e.g. nothing uses a cached MaxPlayers pre/post those OnPlayerX events, but it does feel precarious especially if other plugins are also using those events and might run into unexpected behavior. By default the game assumes MaxPlayers is not changed after startup (MaxPlayers command is pre-launch only), but I do not see anything that would break in the base game if it changes.

rube200 commented 3 years ago

Is this slot extending plugin on GitHub? I can take a look and see what it might be doing that would cause issues.

I believe it is: https://github.com/Tortellio/MaxplayerModifier/blob/master/Main.cs

The bug itself is strange though. We use our own custom max players plugin, but have had zero reports of any invisible players, even with servers up to 30+ players. image (Graph is just of player count per server, with each server being colorized, might not be best way to show that data)

It might be because that plugin is constantly changing the max-players up and down that causes this issues with clients?

I have a plugin that just change max player at load and still bypass max players. I have some reports from the server about the invisible problem. So I am about sure that problem can be in steamworks.

Nelson: if u want to see how to bypass max without changing max players value I can send it to u

TH3AL3X commented 3 years ago

And another thing @SDGNelson , Do you remember the post I made about the hwid getting the number 0 always?, Well, it was a plugin of this type that gave this type of bug ...

Pd: Another thing, would it be possible for servers with more than 24 slots to be seen in the server list?

SDGNelson commented 3 years ago

Even the built-in MaxPlayers command can be set to 100. The difference is setting the advertised max players to 24. In the next update the client will only show servers with >24 max players OR >24 current players when the Show_Servers_With_Greater_Than_Recommended_Players preference is enabled to prevent that unintended workaround.

If you can link the problem-causing plugin's code I can take a look.

baranmod commented 3 years ago

If I understood correctly, this option (to show servers above 24 players) will be disabled by default? If so, why is it so? It reminds me the workshop filter when it was set to false by default and only minority of players were able to find modded servers. I believe, players should be able to decide themselves which server is having a suitable performance for them. While owner of a server should be testing various options to find a sweet spot for their community.

On top of that, you can get better performance on large (more detailed) map with 48 players online than on Russia map on empty server.

TH3AL3X commented 3 years ago

Even the built-in MaxPlayers command can be set to 100. The difference is setting the advertised max players to 24. In the next update the client will only show servers with >24 max players OR >24 current players when the Show_Servers_With_Greater_Than_Recommended_Players preference is enabled to prevent that unintended workaround.

If you can link the problem-causing plugin's code I can take a look.

It's from imperialplugin so i cannot give you the source.

SDGNelson commented 3 years ago

If I understood correctly, this option (to show servers above 24 players) will be disabled by default? If so, why is it so? It reminds me the workshop filter when it was set to false by default and only minority of players were able to find modded servers. I believe, players should be able to decide themselves which server is having a suitable performance for them. While owner of a server should be testing various options to find a sweet spot for their community.

That option has existed in the game for a long time, and has always defaulted to false. The difference now is that servers advertising a fake max player count will properly be hidden when the option is disabled. It only affects the internet server list, so e.g. the favorite and history lists are unaffected.

Long-term the netcode performance will be improved to better support higher player counts.

It's from imperialplugin so i cannot give you the source.

Which plugin and creator? I will ask Trojaner about it.

baranmod commented 3 years ago

Could you clarify if a count in server lobby will be affected by this change? For example, on server browser list it shows 24/24 while on lobby it shows 48/24?

Wouldn't it make more sense to simply remove all limits, remove all additional preferences which are pretty hard to find (yes, I had to google it to find an old issue on github (while for most players its even hard to explain where to find logs)) and simply add something like this which would be shown on servers which are above 24 slots? This would solve two problems at the same time: every server would be shown on list / invisible players problem (having in mind that slot extenders actually causing the issue). image

In addition to that, unturned is kept alive by servers which hold more than 24 players anyway. To prove this statement, you could check battlemetrics during the peak hours. So, honestly, if you are trying to help the community by doing these changes - you are currently planning an opposite thing, no offense.

rube200 commented 3 years ago

@SDGNelson I have one of that plugins not release yet, do u want me to send to your email that part?

TH3AL3X commented 3 years ago

If I understood correctly, this option (to show servers above 24 players) will be disabled by default? If so, why is it so? It reminds me the workshop filter when it was set to false by default and only minority of players were able to find modded servers. I believe, players should be able to decide themselves which server is having a suitable performance for them. While owner of a server should be testing various options to find a sweet spot for their community.

That option has existed in the game for a long time, and has always defaulted to false. The difference now is that servers advertising a fake max player count will properly be hidden when the option is disabled. It only affects the internet server list, so e.g. the favorite and history lists are unaffected.

Long-term the netcode performance will be improved to better support higher player counts.

It's from imperialplugin so i cannot give you the source.

Which plugin and creator? I will ask Trojaner about it.

https://imperialplugins.com/Unturned/Products/QueueBypasser Adam

SDGNelson commented 3 years ago

To clarify: I doubt that calling SteamGameServer.SetMaxPlayers is the cause of the problem.

For example, on server browser list it shows 24/24 while on lobby it shows 48/24?

It looks like you are right that the master server returns the min of player count, max players so the situation will continue as it is for now.

do u want me to send to your email that part?

Sure, if you would like I can take a look.

QueueBypasser

I will ask Trojaner about it.

nanashi88 commented 3 years ago

To clarify: I doubt that calling SteamGameServer.SetMaxPlayers is the cause of the problem.

for reference: our servers were using the following code (after Level.isLoaded is true):

  Provider.maxPlayers = (byte)this.config.MaxPlayers;
  SteamGameServer.SetMaxPlayerCount(24);

but we have disabled this feature. and there was no more reports on invisible players since we disabled this feature.

baranmod commented 3 years ago

Noticed one more detail. When I stay in server for a pretty long time (half an hour~) without doing anything, I noticed that alot of players became invisible for me. When I turn on player nicknames - I see nicknames moving around, but not the actual players. So I thought it might be related to this issue. Might be wrong though. Those heavy desync issues if staying afk have been happening for a while, just didn't notice that I can see nicknames moving around until now.

baranmod commented 3 years ago

another thing (not sure if someone mentioned it already). Somehow, 1 player was invisible for me, yet later I noticed that another player killed him and then he became visible for me too. So, some players are able to see those invisible players and some not, and killing them makes them visible again

ghost commented 3 years ago

another thing (not sure if someone mentioned it already). Somehow, 1 player was invisible for me, yet later I noticed that another player killed him and then he became visible for me too. So, some players are able to see those invisible players and some not, and killing them makes them visible again

Do you still get the issue? It's still reported once every blue moon (like once every 2 weeks) for us.

baranmod commented 3 years ago

yeah, its still happening. The problem is that not every player notice that they can't see some other players so reports are not really common. Yet if you stay online for a while and turn on spectate mode in crowded areas - you can usually see at least one player who is invisible for you. Still not sure what this is related to. Had some thoughts about avi plugins (as I had some strange issues in the past with some of them, like duplicated player spawn on the dead player with avikillingspree plugin once killstreak reached), but having no errors which might help to find it out