Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Dec 03 18:13
    markus-wa commented #127
  • Dec 03 18:12
    markus-wa commented #127
  • Nov 30 20:56

    markus-wa on master

    readme: fix discord link (compare)

  • Nov 30 14:04

    markus-wa on master

    examples/nade-trajectories/read… (compare)

  • Nov 12 22:04

    markus-wa on update-protobufs

    (compare)

  • Nov 12 22:04
    markus-wa closed #309
  • Nov 12 22:04

    markus-wa on master

    protobuf: updated to 5b88d0b5a2… (compare)

  • Nov 12 00:29
    github-actions[bot] synchronize #309
  • Nov 12 00:29
    github-actions[bot] edited #309
  • Nov 12 00:29

    github-actions[bot] on update-protobufs

    protobuf: updated to 5b88d0b5a2… (compare)

  • Nov 11 09:54

    markus-wa on master

    readme: update badge styles ex… (compare)

  • Nov 11 09:35

    markus-wa on master

    readme: update Discord link to … (compare)

  • Nov 11 00:28
    github-actions[bot] synchronize #309
  • Nov 11 00:28
    github-actions[bot] edited #309
  • Nov 11 00:28

    github-actions[bot] on update-protobufs

    protobuf: updated to 72031aa7ff… (compare)

  • Nov 06 00:27
    github-actions[bot] edited #309
  • Nov 04 00:27
    github-actions[bot] synchronize #309
  • Nov 04 00:27

    github-actions[bot] on update-protobufs

    protobuf: updated to 13c01da9a1… (compare)

  • Nov 03 11:08
    markus-wa closed #316
  • Nov 03 10:53
    markus-wa labeled #316
John Palevich
@JohnPalevich
I went and checked the VOD on the HLTV website and ensured that the bomb was not only planted at A each time.
Markus
@markus-wa
which map is this? de_grind? markus-wa/demoinfocs-golang#284
for de_grind the workaround is
if planted.Site != events.BombsiteA && planted.Site != events.BombsiteB && p.Header().MapName == "de_grind" {
    planted.Site = events.BombsiteB
}
any other map might need additional investigation
@JohnPalevich
John Palevich
@JohnPalevich
The map in question was de_mirage. The demo was downloaded from https://www.hltv.org/matches/2351829/dbl-poney-vs-nip-iem-fall-2021-europe
@markus-wa
John Palevich
@JohnPalevich
I also tried it on this de_dust2 MM demo https://drive.google.com/file/d/1qPnwTI250rfFA0y4AUc7oAo5qBZUYoEu/view and only Bombsite A was printed
Even though the bomb was planted at B a couple times
Markus
@markus-wa
another way to possibly circumvent this is Player.LastPlaceName()
will try to look at the demos soon
note I haven't tested that Player.LastPlaceName() always returns the bombsite name
Markus
@markus-wa

@JohnPalevich can you try with this branch? markus-wa/demoinfocs-golang#313

It seems like CS:GO changed a datatype from short to long and that broke things :(

John Palevich
@JohnPalevich
Just tested the new branch out and I believe it is returning the right values! I went and checked the demos as well to confirm that the Bombsites my code was outputting were in fact the sites where the bomb was being planted
Thanks! :)
Markus
@markus-wa

@/all important update for recent demos: https://github.com/markus-wa/demoinfocs-golang/releases/tag/v2.11.1

This fixes all of the BombEvent.Site values (e.g. BombPlantBegin.Site, BombPlantEnd.Site) always being BombsiteA for demos recorded after a recent CS:GO code change by Valve

run go get -u github.com/markus-wa/demoinfocs-golang/v2/pkg/demoinfocs@v2.11.1 to update

thanks @JohnPalevich for reporting this

David Durst
@David-Durst
Thank you for creating this project! In demoinfocs-golang, how do I get a player's entity handle that matches the one returned by GetRefEHandle() in HLAE? I've tried accessing the network messages and entity properties in demoinfocs-golang. However, I haven't had much luck. The handles from properties like m_hOwnerEntity don't seem to be the right format (They're missing ~5 bits). I'm trying to use this demo parser with HLAE to combine the demo's text data with image segmentation data from rerendering the demo with custom textures, as shown here. Thank you again for your help!
Markus
@markus-wa
Hi @David-Durst - without being familiar with HLAE, have you tried Player.EntityID?
very interesting read btw about what you're doing - love it
David Durst
@David-Durst

Glad you like it! Your package has been very helpful. And, this work has been a lot of fun.

Player.EntityId is useful, but it's not exactly what I'm looking for. Here's an example output of the command mirv_listentities isPlayer=1 from HLAE. The Player.EntityId 2 is the first number on line 6, but I need the number 45744130. This is the entity handle returned by GetRefEHandle().

Interestingly, demoinfocs-golang seems to accept this handle from HLAE as calling gs.Participants().FindByHandle(45744130) returns the player object for i_eat_short_people_for_breakfast, but I can't seem to reverse the map used here. It seems like demoinfocs-golang has the handle at some point, but only stores a subset of it.

This subset issue may be related to this comment which may indicate that the handle in the server/client's memory (where HLAE interacts with CSGO) is different from the one serialized over network and in the demo file (where demoinfocs-golang interacts with CSGO). However, there should be a way to connect the two handles, since CSGO must do so to connect network messages to in-memory game state. Here's my failed attempt at extracting the handle out of the network messages and other entity properties.

Markus
@markus-wa

ahh, I see. so we don't directly have the handle at any point (not knowingly, we may have it somewhere but i don't know) - what you can do however is:

Player.ActiveWeapon().Entity.Property("m_hOwnerEntity") or Player.ActiveWeapon().Entity.Property("m_hOwner")

not 100 % sure it will work, but let me know how it goes!
I'm not sure why some are just an index while others are a handle, but the parser generally only knows about indexes, handles that we get in some places need to be turned into an index to really be useful, such as in the code you linked
(when I say that I mean handle & EntityHandleIndexMask == index)
David Durst
@David-Durst
Weird, Player.ActiveWeapon().Entity.Property("m_hOwnerEntity") and the entity handle are different, but look very similar in binary. The m_hOwnerEntity is 1433602 or 101011110000000000010 in binary . The desired entity handle is 45744130 or 0010101111000000000000000010 in binary.
Markus
@markus-wa
interesting find! - maybe you can bitshift it into place?
David Durst
@David-Durst
Wups, I made a mistake. Turns out, that was from the wrong demo. 45875202 is the right one, and it doesn't look similar in binary form. Here's a comparison:
alfred
    m_hOwner -                1658893
    m_hOwner binary -  1 0110 0101 1000 1000 1001 0011
    handle -                          53084173
    handle binary -           101 0011 0000 1000 0100 0001 0111 0011
i_eat_short_people_for_breakfast
    m_hOwner -                1433602
    m_hOwner binary -  1 0100 0011 0011 0110 0000 0010
    handle -                         45875202
    handle binary -           100 0101 1000 0111 0101 0010 0000 0010
meeseeks
    m_hOwner -                1859588
    m_hOwner binary -  1 1000 0101 1001 0101 1000 1000
    handle -                          59506692
    handle binary -           101 1001 0101 0000 0110 0110 1001 0010
Kcirrem
    m_hOwner -                 1912837
    m_hOwner binary -  1 1001 0001 0010 1000 0011 0111
    handle -                         61210629
    handle binary -          110 0001 0010 0001 0000 0110 0010 1001
One other thought, it seems like there is a base player CBasePlayer per player. How do I get the handle of the base entity from a player entity?
Markus
@markus-wa
my understanding is that all data from CBasePlayer is included in CCSPlayer
we flatten the hierarchy in the parser
David Durst
@David-Durst
makes sense. I don't think there's an easy fix here. I'll keep thinking about it.
Thanks for your help! (and for the issue fix!)
Markus
@markus-wa
maybe the handle differs on each run? since the game-engine will have to create lots of entities on the fly that are not necessarily created in the same order as the game was recorded?
David Durst
@David-Durst
No, the handles are consistent across runs
it's been consistent across game patches too
Markus
@markus-wa
I see
David Durst
@David-Durst
(or at least game patches in the last 2 weeks)
Markus
@markus-wa
is there no way you can invert this and just transform the handles from HLAE to indices?
David Durst
@David-Durst
yep, that process is currently manual
since hlae runs inside a copy of csgo and I have to copy out
I'm trying to automate this step
Markus
@markus-wa
I think if you can just do handle & 2047 that would do it - but as I'm totally unfamiliar with the setup I'm probably missing a key point here :D
David Durst
@David-Durst
so my current setup is demoinfocs to get text data, then run hlae to get vision data. I need to create a bunch of configs for HLAE to get it to render correctly for the vision part. I need the HLAE handle to create these configs. I'm currently doing a manual step in HLAE now to get the handles for these configs, but I was hoping to automate that step with demoinfocs.
Markus
@markus-wa
^ I see - yeah I think I've ran out of ideas for now, I'll let you know when I can think of anything else
Markus
@markus-wa
@/all how would people feel about migrating from Gitter to Discord?
Julien2313
@Julien2313_gitlab
I don't have a real opinion about that @markus-wa ha ha, but I think it could be cool
JohnRubado
@JohnRubado
Discord would be cool
Markus
@markus-wa
Hi @/all - We're trying out discord here: https://discord.gg/48gwE9rG
Chances are this will become the new communication hub for the demoinfocs-golang community within the next week, exciting times!
I'm new to Discord admin and had some help setting it up, but suggestions are very much welcome!
Markus
@markus-wa
New Discord link - old ones have expired
This one should never expire: https://discord.gg/eTVBgKeHnh