etlegacy icon indicating copy to clipboard operation
etlegacy copied to clipboard

Allow all ref commands in server console & lua

Open x0rnn opened this issue 2 years ago • 6 comments

This commit https://github.com/etlegacy/etlegacy/commit/737c75b45cd042674fcb70d750fbf5ac4565a484 enabled the following server commands to be called from the server console or lua scripts: https://github.com/etlegacy/etlegacy/blob/master/src/game/g_svcmds.c#L2591-L2640

However, some referee commands are still not available. Typing /ref ingame and ref in the server console will output different available ref commands. For example, https://github.com/etlegacy/etlegacy/blob/51b6523c93c862581d6e39ad2b1755426ba50841/etmain/ui/ingame_vote_misc_refrcon.menu

ref mutespecs or ref surrender for example aren't available from the console or lua.

x0rnn avatar Aug 06 '22 08:08 x0rnn

Just to note - all available commands should work just fine. Those you mention simply don't exist.

https://github.com/etlegacy/etlegacy/blob/master/src/game/g_referee.c#L46-L162

ryzyk-krzysiek avatar Aug 06 '22 08:08 ryzyk-krzysiek

But they do here as ref votes: https://github.com/etlegacy/etlegacy/blob/51b6523c93c862581d6e39ad2b1755426ba50841/etmain/ui/ingame_vote_misc_refrcon.menu#L52-L58

And /ref swapteams (not swap_teams as in g_svcmds) ingame works for example, so /ref surrender too I suppose (edit: nope).

x0rnn avatar Aug 06 '22 09:08 x0rnn

Ref commands ingame: https://i.imgur.com/Iyq3qja.jpg

Ref commands in console: https://media.discordapp.net/attachments/346956915814957067/1005081230041157642/Screenshot_20220805-135215_Mobile_SSH.jpg

x0rnn avatar Aug 09 '22 12:08 x0rnn

Any command which is actually shared with callvote is unavailable on the server console. Has always been that way even in vanilla.

I will update with code blocks when I get a chance but you can clearly see the difference in the ref command help function that it only lists the ones you show in the second picture.

ensiform avatar Aug 09 '22 12:08 ensiform

On etpro I'm pretty sure you can call all the ref commands via lua or server console, doesn't matter if they are shared with callvotes. I guess it's structured differently there. In any case, what I'm asking for is the same to be made in legacy; doesn't matter if it's shared with callvotes or not - all ref commands should be available in console or lua imo...

x0rnn avatar Aug 09 '22 13:08 x0rnn

I am working on the necessary changes in ete's etmain currently and will share my fixes here to be reproduced in ETL.

The problem is, the callvote system is designed to only work where the ref commands do not have "ref" as a preceding command. Will take extra redesigning unfortuantely.

ensiform avatar Aug 09 '22 14:08 ensiform