SHWotever / SimHub

Multi sim dashboard, bass shaker driver, ....
http://www.simhubdash.com/
801 stars 98 forks source link

[GTR2] GamePaused correct in menus but not when paused on track #1075

Open shovas opened 2 years ago

shovas commented 2 years ago

Describe the bug In GTR2, the DataCorePlugin.GamePaused property does not update correctly out on track. I believe this results in SimHub overlay logic not knowing when to stop timers, etc., and things like times, deltas, gaps, etc. become incorrect. Another manifestation is the map widget the dots go off in all directions when paused as I think it's just following the last updated direction value of each car.

In main menus GamePaused=0 (Correct) or garage menus GamePaused=1 (Correct).

Simhub version 7.4.23

To Reproduce Steps to reproduce the behavior:

  1. Start a race in GTR2, get out on track, and watch the DataCorePlugin.GamePaused property value in SimHub: GamePaused=0 (Correct)
  2. Press ESC for pause menu or P to pause race: GamePaused=0 (Incorrect)

Expected behavior GamePaused=1 when pausing even when out on track

Screenshots N/A

Log files N/A

Additional context N/A

shovas commented 2 years ago

It occurs to me that GamePaused=1 in the garage, which I said was correct, has implications for my assumptions about internal SimHub timers and how they are used to update the properties I use in Dash Studio:

In the garage, for example, cars are still running in real-time around the track. The game is not "paused".

However, if you press ESC or the pause key out on track, you really are "pausing" the game: Cars don't go around the track while you're in that state, times don't update in-game, etc. <-- I'm talking in-game here

In SimHub, certain timers should actually be kept running in the garage (which is GamePause=1 right now) but not when ESC/Paused in-game out on the track.

So, my understanding of SimHub timers and how properties are updated is limited.

I can only describe the results:

Deltas, gaps, etc., keep running and the dots on the live track map go off in all directions even when ESC/Paused in-game out on track.

Someone with better knowledge of SimHub internals would have to untangle how it should all operate and what keeps running internally and what should be stopped - and all with a view that in GTR2 just being in the garage doesn't mean the game has stopped simulating the session.

shovas commented 2 years ago

I've created a video to demonstrate what's going on:

https://www.youtube.com/watch?v=8uULbEB4mZI

And here are the timestamps (also in the youtube description for easy click&go-to-timestamp):