I have made a command in g_cmds.c that needs the game to make like BUTTON_ATTACK has been pressed without the player really doing so.
in bg_pmove.c, within PM_Weapon, I have the following:
if (g_entities[pm->ps->clientNum].client->vsnSaberCombat.swingingSaber == qtrue)
pm->cmd.buttons |= BUTTON_ATTACK;
As you can see it's only in QAGAME so it works fine if my client is the same as my server like when I run it as a non-dedicated listening server, but doesn't work for any clients when I run the code on a dedicated server.
How can I make the cgame also virtually press BUTTON_ATTACK at the same time?
I tried out ways that avoided using #ifdef QAGAME but it didn't seem to help. "cmd.buttons |= BUTTON_ATTACK" still didn't work from cgame files though I tried it in various places. As it is now the QAGAME version is back since it's more convenient in other ways.