Open xGuysOG opened 5 days ago
I just tested the provided demo in my demo viewer, and HasMatchStarted
is always 1.
It could be that the property never changes, so AddChangeCallback()
never invokes your callback. If that's the case, you can subscribe to demo.EntityEvents.CCSGameRulesProxy
and assign initial value, something like this :
demo.EntityEvents.CCSGameRulesProxy.Create += e => hasMatchEverStarted |= e.GameRules.HasMatchStarted;
I just tested the provided demo in my demo viewer, and
HasMatchStarted
is always 1.It could be that the property never changes, so
AddChangeCallback()
never invokes your callback. If that's the case, you can subscribe todemo.EntityEvents.CCSGameRulesProxy
and assign initial value, something like this :demo.EntityEvents.CCSGameRulesProxy.Create += e => hasMatchEverStarted |= e.GameRules.HasMatchStarted;
Interresting, that does work on the new demos, but not on old ones.
There has to be a better way to do this, so i dont have to check for the version of the file and then run the code based on that right?
OLD demo i used to test: https://drive.google.com/file/d/16FwrcxRwHCUOR3v8weZKufAQWY7r7YgQ/view?usp=sharing
I meant that you should use both approaches
Research
Description
This was brought up in https://github.com/saul/demofile-net/issues/84
i was told to use
by @in0finite
This has worked for a while, but now with some new demos hasMatchEverStarted never becomes true
Code to reproduce
Affected demos
https://drive.google.com/drive/folders/1ZN0k7b-5zZk_6ls3JjHmzCwlA7DF65TZ?usp=sharing