ValveSoftware / Source-1-Games

Source 1 based games such as TF2 and Counter-Strike: Source
634 stars 74 forks source link

[CS:S] Demo playback becomes unusable due to "Goto" bug #3112

Open etkaar opened 4 years ago

etkaar commented 4 years ago

Good evening Gentlemen!

Unfortunately there is a bug in CS:S (maybe also in DoD:S, I didn't check that) which makes the demo playback (playdemo) de facto unusable since the defective command is extremely important.

'demo_gototick' does not work any more

The defective command I refer to is 'demo_gototick' which is also used by the demo playback UIs such as 'demoui' or 'demoui2'. If you record any demo for a few minutes, and say, you have 30,000 or 50,000 ticks you're not able to go to a specific tick using 'demo_gototick' or by clicking at 'Goto:'.

In the most cases the demo playback suddenly stops and you get this error message in the console:

Host_Error: CL_PreserveExistingEntity: missing client entity X.

Additional Information

I think this additional information can help you to find out which changes lead to this bug:

This bug was also discussed here: https://hellclan.co.uk/threads/33788/

On 19th September 2015 someone on reddit said:

This update destroyed the demo playback. If you want to goto another tick in the demo, the demo stops playing and drop you to the main screen. If you watch the demo from tick 1, this is not happening. Console output: Host_Error: CL_PreserveExistingEntity: missing client entity 233.

https://www.reddit.com/r/counterstrike/comments/3l8b44/css_counterstrike_source_and_other_source_engine/

He refers to a mandatory update for Counter-Strike: Source, Day of Defeat: Source, and Half-Life 2: Deathmatch from 16th September 2015:

Updates to Counter-Strike: Source, Day of Defeat: Source, and Half-Life 2: Deathmatch Updates Released have been released. The major changes are below.

  • John

  • Synced the latest fixes and updates from the Orangebox engine and shared game code
    • Fixed several security issues

https://www.mail-archive.com/hlds_announce@list.valvesoftware.com/msg00918.html

I guess the official news at steampowered.com is this one here: https://store.steampowered.com/news/18428/

It would be great if you could fix this bug since this command is very important when watching demos.

etkaar commented 3 years ago

When will this be fixed @kisak-valve ?

glappk commented 3 years ago

Any fix for this?

etkaar commented 3 years ago

Unfortunately not, Valve seems to be not active at all on github, because they never respond to bug reports.

YoUr-EnD commented 1 year ago

Please fix this. I really need to work with demos. I even get the error "CL_PreserveExistingEntity: missing client entity x" without using goto command.

0x00000ED commented 1 year ago

I made a temporary fix.

The script forbids calling the function Host_Error( "CL_PreserveExistingEntity: missing client entity %d.\n", nOldEntity ); Video: https://youtu.be/ZirNUpreW9A

How to use:

  1. Install CheatEngine
  2. Download the script link
  3. Run the game.
  4. Launch CheatEngine and open the game process
  5. Run the script and check the box next to HostError Fix

Note: Normally, If you are just watching demos and not joining real VAC secured servers, it can't get you VAC banned To be extra safe you still can use -insecure launch parameter to disable VAC completely. image

etkaar commented 1 year ago

Interesting! But isn't there risk of getting VAC banned?

YoUr-EnD commented 1 year ago

This get you save a VAC Ban and I bet it also hacks your Steam Acc. This looks fake af!

0x00000ED commented 1 year ago

Oh my god, you can download the script and look at it yourself in notepad. Inside the script, a couple of lines in assembler. which disable execution of the HostError function. no executables. And in general, I wanted to help.

0x00000ED commented 1 year ago

I have updated the script. Now it allows you to output the missing entity to the console without stopping the demo. image

musosoft commented 4 months ago

If anyone needs to play a specific tick and is encountering issues, follow these steps:

  1. Copy the first command (modify the bold text - the demo name and tick number):

    playdemo auto-20240510-1601-cs_italy;host_timescale 6;demo_timescale 600;demo_pauseatservertick 110000

  2. Once you see the message "demo paused at [tick number]", enter the second command:

    host_timescale 1;demo_timescale;demo_togglepause