ValveSoftware / portal2

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

[Portal 2] sv_portal_placement_never_fail 1 and buddha are not protected by sv_cheats 1 #425

Open RocketLauncher21 opened 7 months ago

RocketLauncher21 commented 7 months ago

I can enable sv_portal_placement_never_fail 1 without having sv_cheats 1. I have tested this on Windows 11 with the latest version of Portal 2. My friend also encountered this bug (also having the latest version and Windows 11 virtualized on a VM through macOS) image image I did not try many cheat-protected cvars and commands but I have noticed that some like "noclip", "god", and others do not work, while "buddha" also ran without cheats. My friend also tried this in coop mode, but that didn't work and behaved like normal. My system information is this: GPU: NVIDIA GeForce GTX 1660 CPU: Intel Core i5-9400F RAM: 16GB Here is my full console log: p2_log.txt I did not see any issues on here regarding this, so I decided to report it. I am not sure if someone else already noticed this before me, though.

RocketLauncher21 commented 7 months ago

I also put my log in a gist here: https://gist.github.com/RocketLauncher21/c506997dcb18bd592769206a635e13ef

vrad-exe commented 6 months ago

This is kind of intended behavior. Source only enforces the "cheat" flag for commands in multiplayer games, plus challenge mode in Portal 2. There are some commands like noclip that are still cheat protected in singleplayer, but that's because those commands explicitly check the value of sv_cheats in their code instead of relying on the normal system.

Changing this is possible, but would break a lot of custom maps and even some spots in the campaign for little benefit. If you want to stop people from cheating at achievements or whatever, this won't really help, there are a number of ways people can get around commands being cheat protected anyway.