StrataSource / Portal-2-Community-Edition

Task tracker for Portal 2: Community Edition
https://www.portal2communityedition.com
146 stars 3 forks source link

Bug: engine blocks necessary singleplayer commands (point_clientcommand and ent_fire) #1657

Open Wolfcl0ck opened 4 months ago

Wolfcl0ck commented 4 months ago

Describe the bug

Build Information

Chaos.exe Build Date: 06-11-2023 22:13:42 UTC Server Build Date: 06-11-2023 22:24:40 UTC Client Build Date: 06-11-2023 22:24:41 UTC Branch: Default, using Panorama UI

Hardware Information

CPU: AMD Ryzen 9 3900X 12-Core Processor 3.80 GHz GPU: 4095MB NVIDIA GeForce RTX 2070 (EVGA) RAM: 32 GB DDR4 RAM, 2x 16 GB Corsair

Bug Information

The engine protection level on FCVAR_CLIENTCMD_CAN_EXECUTE and the cheat protection on "ent_fire" in singleplayer prevents point_clientcommand from executing necessary commands.

Additional Potential Factors

"cl_portal_crosshair_mode" was set to 1 Game is running in Borderless Windowed mode Game is running with -multirun enabled Game is running with -insecure enabled

Footage

20240224144042_1 20240224154543_1

Issue Map

Presumably all levels, but noticed on sp_a4_finale4

To Reproduce

Due to the nature of the bug, reproduction steps are on a per-command basis, but for my cases:

  1. open sp_a4_finale4
  2. finish the game
  3. sit through the credits and post-credit scene
  4. the game will fail to disconnect the player due to FCVAR_CLIENTCMD_CAN_EXECUTE preventing the point_clientcommand from executing "disconnect"

Operating System

Windows 10 Home 64-bit, build 19045.3570

ozxybox commented 4 months ago

Is this only an issue for the ending credits?

Wolfcl0ck commented 4 months ago

Have not tested for other situations. During my playthrough, I enabled sv_cheats in on sp_a3_crazy_box and left it on for the rest of the game, so any moments past that where a point_clientcommand trying to run ent_fire would fail under normal circumstances didn't fail for me. I only noticed the ent_fire issue after restarting the game a few times in order to gather footage of other bugs.

vrad-exe commented 3 months ago

To be honest, if you want full backwards compatibility with Portal 2 content, you'll probably need to just revert to the Portal 2 behavior where FCVAR_CHEAT on its own is only enforced in multiplayer and challenge mode, and FCVAR_CLIENTCMD_CAN_EXECUTE is not enforced at all (I made a separate issue for that because I still fail to see the purpose of it in the first place).

The one exception to this is FCVAR_SERVER_CAN_EXECUTE, that should be left enabled since P2CE has dedicated servers which you don't want to be able to run arbitrary commands on clients.