Closed f0oster closed 5 years ago
it seems that swapping between players in spec (using left/right click on the mouse) doesn't actually trigger a client_command event
Right. Probably this is being executed in qlds, but it is not captured by current versions by minqlx: https://github.com/id-Software/Quake-III-Arena/blob/dbe4ddb10315479fc00086f08e25d968b4b43c49/code/game/g_active.c#L356-L359
Does anyone know if there's a way to achieve this?
Let coach join his team and before round starts - kill him. He will spectate his team.
Workaround:
You can check who is following who by comparing positions between players, if someone is spectating someone else, their coordinates will be identical.
You could have a polling loop to detect this.
Please excuse brevity as this message was sent from my iPhone
On 9 Oct 2018, at 12:50 pm, Eugene Molotov notifications@github.com wrote:
it seems that swapping between players in spec (using left/right click on the mouse) doesn't actually trigger a client_command event
Right. Probably this is being executed in qlds, but it is not captured by current versions by minqlx: https://github.com/id-Software/Quake-III-Arena/blob/dbe4ddb10315479fc00086f08e25d968b4b43c49/code/game/g_active.c#L356-L359
Does anyone know if there's a way to achieve this?
Let coach join his team and before round starts - kill him. He will spectate his team.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.
@em92 Thanks for the info. I am not overly familiar with QLDS or the minqlx core - do you have any advice on where to start if I wanted to capture these actions?
Your suggestion is a really good idea but means the player will receive a pretty heavy penalty for being coach (elo/qlstats ratings) unless I disable the stat reporting for clan games.
@tjone270 I had considered this as well but I think it would be too expensive to poll regularly enough to be effective.
do you have any advice on where to start if I wanted to capture these actions?
tldr: you have to make some additions to minqlx core.
More detailed steps probably looks like this:
I am looking to make a coaching plugin for CA clan matches to allow clans to have members in spec without needing to worry about clans ghosting or cheating.
The intention is to allow specs to assign themselves as a coach to a specific team and then they would only be able to spec that team for the game.
I created a hook for client_command so I could catch whenever players sent the "follow" command so I could implement some logic to restrict who they can spectate, but it seems that swapping between players in spec (using left/right click on the mouse) doesn't actually trigger a client_command event...on the contrary, if you type the command (follow userid) in the console the event is obviously triggered but this is not really useful as players don't tend to do this...
Does anyone know if there's a way to achieve this?
Thanks