-
Notifications
You must be signed in to change notification settings - Fork 127
Open
Description
Hello,
I'm opening a new issue related to CS2 replays. I take as reference the issue #321 where i've put the replay file.
Taking as a reference the project https://github.com/LaihoE/demoparser
I'm trying to get the header of this file in the same way is possible in the python project.
As a reference, in python is just:
header = parser.parse_header()
print("** Map is: " + header["map_name"])
print("** GUID is:" + header["demo_version_guid"])
print("****** Last Tick Parsed ******")
I tryed to do in clarity the following:
@OnMessage
public void onMessage(Context ctx, GeneratedMessage message) {
if (isHeader(message)) {
logger.debug(message.toString());
final Demo.CDemoFileHeader headers = (Demo.CDemoFileHeader) message;
logger.info("********");
logger.info("map name: {}", headers.getMapName());
logger.info("Guid: {}", headers.getDemoVersionGuid());
logger.info("Server start tick: {}", headers.getServerStartTick());
}
// log.info("{}", event.toString());
}
And it works, but this way is an event "listener", is it possible to retrieve it programmatically on need?
Given
Demo.CDemoFileInfo info = Clarity.infoForFile(demofile);
the infoForFile does not retrieve it and i can't find any other way...
Metadata
Metadata
Assignees
Labels
No labels