otclient icon indicating copy to clipboard operation
otclient copied to clipboard

Kicking bug

Open Riverlance opened this issue 9 years ago • 6 comments

I compiled the latest OTClient source with VS2013, latest TFS, with 10.99 protocol.

How to reproduce:

  1. Login into your character.
  2. Just hold Ctrl+Arrow for 3~5 seconds.
  3. You will be kicked and get this error message: image

E.g., Ctrl+ArrowUp Ctrl+ArrowDown Ctrl+ArrowLeft Ctrl+ArrowRight

Riverlance avatar Jan 15 '17 18:01 Riverlance

Looks similar to this: https://github.com/otland/forgottenserver/issues/1964#issuecomment-262395646

Client 11 sends potentially 10 times more packets to the server (than older clients). You should check out how many packets OTClient sends to the server and adjust maxPacketsPerSecond to match the clients output.

Znote avatar Jan 15 '17 19:01 Znote

Found this.

image

Riverlance avatar Jan 16 '17 10:01 Riverlance

On TFS, I changed now from: maxPacketsPerSecond = 25 to maxPacketsPerSecond = 250 as @Znote recommended and it worked 100%.

No error on server or client consoles, and also no kicks. So, I think we should set this to 250 instead 25 on TFS, based on @Znote tests at: https://github.com/otland/forgottenserver/issues/1964#issuecomment-262395646

Thanks for paying attention! 😄 👍

Riverlance avatar Jan 16 '17 10:01 Riverlance

You should try to put it as low as possible without it disconnecting you, 250 is optimal for client 11, not neccesarily otclient. Just do the CTRL + move stress test and see how low you can go without being kicked.

I am curious as to how many packets the otclient sends. If it takes you 3-5 seconds I think setting it to 50 may be sufficient.

Znote avatar Jan 16 '17 15:01 Znote

How you did these prints for test?: https://github.com/otland/forgottenserver/issues/1964#issuecomment-262395646

I will check it right now.

Riverlance avatar Jan 16 '17 17:01 Riverlance

Well, tried this. I think the packet limit as 25 (default of latest TFS) is not the problem. I mean. If you hold Ctrl+Left, it will send A LOT of packets.

On my tests using the record packet data in connection.cpp void Connection::parseHeader as recommended by @Znote : Test 1: If you hold Ctrl+Left, it was like almost 55 packets each second. Test 2: Now, if you hold Ctrl+Left+Right, it will send almost 110 packets each second. Test 3: If you hold Ctrl+Up+Left+Right, it will send almost 165 packets each second. Test 4: If you hold Ctrl+Up+Down+Left+Right, it will send almost 220 packets each second. Test 5: Now, if you click to walk far away on the Mini Map and also hold Ctrl+Up+Down+Left+Right, it will send almost 230 packets each second.

So I think we need to do 3 changes in here.

  1. Add a minimal exhaust between each packet send of character rotate, at least like 100 or even just 50 milliseconds.
  2. Should not be able to rotate your character if you are holding more than 1 direction. I mean, these are okay: Ctrl+Up, Ctrl+Down, Ctrl+Left AND Ctrl+Right. But like these are not: Ctrl+Up+Down, Ctrl+Left+Right, Ctrl+Up+Right, AND SO ON.
  3. Block the character rotation if you are walking (just because I think makes no sense be able to rotate your character while you are walking). You will see what I am talking about how weird it seems if you do the Test 5 mentioned above.

Note: I am just talking about what I think is better for the TFS. :)

Riverlance avatar Jan 17 '17 16:01 Riverlance