ValveSoftware / portal2

Issues for the Linux port of Portal 2
140 stars 11 forks source link

Main menu can no longer execute most commands #433

Open vrad-exe opened 1 month ago

vrad-exe commented 1 month ago

Portal 2's main menu includes a hidden feature where mods can prefix a menu command with the # character to have it executed as a console command instead. This was used by some mods in order to have menu buttons which load straight into maps or similar. Unfortunately, this appears to have been done in code using ClientCmd() instead of ClientCmd_Unrestricted(), meaning as of a recent update this feature is now almost useless as Portal 2 now enforces the FCVAR_CLIENTCMD_CAN_EXECUTE convar flag.

Given that these commands have to come directly from UI layouts stored in the user's local install, there's no reason they should be restricted, so this should be changed to use ClientCmd_Unrestricted() in order to restore its original functionality.