Skip to content
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

setEventSimulatedValue does not work in multiplayer while server bot is present #3147

Open
Xploder98 opened this issue Apr 2, 2024 · 1 comment

Comments

@Xploder98
Copy link
Contributor

So, this is a rather specific issue. I was testing a multiplayer command to simulate a monster truck-type remote ignition interrupter (RII) using the InputEngineClass's setEventSimulatedValue() method to toggle EV_TRUCK_TOGGLE_CONTACT for a remote player. It generally works fine when I point the command at myself while I am on a server alone, but when I connect a server bot, the command suddenly stops working. The command then suddenly resumes working as soon as the bot disconnects from the server. Here is a copy of the full custom server command:

customCommand riiCommand(@chatSystem, "rii", customCommand_rii, null, false, AUTH_MOD | AUTH_ADMIN);
void customCommand_rii(chatMessage@ cmsg)
{
                int uid = parseInt(cmsg.emsg[1]);
                server.cmd(uid, "inputs.setEventSimulatedValue(EV_TRUCK_TOGGLE_CONTACT, 1.f);");
                server.say("RII activated for " + server.getUserName(uid), TO_ALL, FROM_SERVER);
                server.cmd(uid, "inputs.setEventSimulatedValue(EV_TRUCK_TOGGLE_CONTACT, 0.f);");
}

The usage of the command would be !rii [uid].

@ohlidalp
Copy link
Member

ohlidalp commented Mar 7, 2025

This continues to baffle me, I assume it doesn't happen when other players join, just the bot. Also is it any specific version of the bot or latest sources?

The only possible explanation is that some command from the bot ( rornet supports remote code execution) somehow disrupts the input, although it beats me how.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants