-
Notifications
You must be signed in to change notification settings - Fork 215
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Retreat is broken when spam clicking commands in multiplayer games #5429
Comments
The simple solution is for the unit to become immune to player commands for 500ms or so after being told to retreat. There might be edge cases though. |
Yeah, that could work decently. |
Two extra solutions that could be more correct but sound annoying/dangerous to implement:
|
How about this for an engine feature: All commands include the frame they were issued on, where the frame is whatever was local to the issuer. So if a player issues a command on frame 100 and it hits synced on frame 110, the command has an issue time of 100. Commands issued by luarules can set issue frame, in case luarules merely transforms a command from unsynced, and wants to retain the data for other purposes. But most of the time it would default to the current frame. |
Steps to reproduce:
Host multiplayer lobby so that you have a latency to the server.
Start game.
Setup retreat zone.
Set unit to retreat at 99%.
Continually spam click orders for the unit as you enter the enemy range and takes damage.
The unit becomes deselected but continues to the target destination, probably because the command reaches the server after it was deselected and ordered to retreat.
The text was updated successfully, but these errors were encountered: