CrazyHackGUT / sm-autodemo

Server plugin for AutoDemo system
GNU General Public License v3.0
25 stars 4 forks source link

Recorded Ticks always -1 #4

Open CrazyHackGUT opened 5 years ago

CrazyHackGUT commented 5 years ago

It looks like a bug in core. recorded_ticks in TF2 always -1 in latest Core version. Required to check in another games.

{
    "start_time": 1565718510,
    "end_time": 1565722914,
    "recorded_ticks": -1
}

At the same time, current tick detects normal in events:

[
        {
            "event_name": "Core:PlayerDeath",
            "time": 1565718720,
            "tick": 14009,
            "data": {
                "client": "x",
                "victim": "y"
            }
        },
        {
            "event_name": "Core:PlayerDeath",
            "time": 1565718723,
            "tick": 14191,
            "data": {
                "client": "x",
                "victim": "z"
            }
        },
        {
            "event_name": "Core:RoundEnd",
            "time": 1565718723,
            "tick": 14191,
            "data": {}
        }
]
CrazyHackGUT commented 5 years ago

Created post in SourceTV official thread. Can't reproduce on Windows.

CrazyHackGUT commented 5 years ago

Problem investigated. SourceTV manager isn't related. When demo record starts from map start, it can create this "bug", and broke demo file. Fix is required for AutoDemo_EventManager.

CrazyHackGUT commented 5 years ago

For fixing this issue, we should determine, what event called when HLTV master is ready. In engine at this moment, called function CHLTVServer::StartMaster(CGameClient*). We need trigger at this moment without any detour hooks.