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
AI : MCV deployment gets picked up as an exploit. AI MCV's dont deploy. #2540
Comments
Can you elaborate? Which version did you use? Who hosted the game? |
Hi Mailander, well, i used 1104 but i think the same happens in 1019. The game is played basically what happens (or doesnt happen, rather) is that as soon as the What i have not attempted is to host the game with 'cheats enabled' to see Greetings, Rocito On Thu, Jan 3, 2013 at 1:03 PM, Matthias Mailänder <notifications@github.com
|
This is buggy on dedicated because the On Tue, Jan 8, 2013 at 9:29 AM, zybiski notifications@github.com wrote:
|
working on fixing it |
Ugh, I tried to fix this, but I don't find it that easy to solve as @pchote promised without changing the network protocol which consists mostly of non-descriptive one-letter-abbrevation variables. |
Well at least here is how to reproduce:
|
Client_id=0 as a control for bots is hardcoded. Once first client leaves dedicated, client_id=0 is gone and there is nothing to control bots |
// Hack: Assumes bots always run on clientId 0.
var isBotOrder = subjectClient.Bot != null && clientId == 0; Can we simply remove the who owns the bots check without breaking stuff? var isBotOrder = subjectClient.Bot != null; This does not seem to be easily exploitable on the user side. Remote control the bots to attack someone else with a hacked cheater client to troll the other players? I don't think it is that much of a serious issue. The legitimate bot controlling client could also be the hacker troll. |
it breaks everything, dunno why. |
Okay, then this does not only validate the order, but also direct it accordingly. |
when I tried to fix it I had to change code in 3 different places but this did not help at all |
I tried to change |
Maybe i've forgotten a subtle detail that makes this harder than it seems? Bots are added by sending a slot_bot command to the server. This command is parsed by the LobbyCommands server trait to create a bot client. You want to add an int field to Client, let's call it BotControllerClient, and initialize it in the slot_bot handler to client.Index (client is the person who sent the order, and so presumably the person who wants to be running it locally). The list of Clients is serialized as yaml, so this new field will be synchronized between clients automatically. You may also want to modify the client drop logic to cleanup any bots owned by the dropping client. In ValidateOrder, clientId == 0 then becomes clientId == subjectClient.BotControllerClient. |
And of course, if you wanted the bots to always run on the admin's client, or evenly distribute them over all clients to reduce the CPU load on any one machine, you could initialize BotControllerClient with whatever client you'd like. |
just a notice for those who try to fix it: in Started game, once admin leaves, there is no admin left |
Not tested if it works with cheats enabled yet..
The text was updated successfully, but these errors were encountered: