Skip to content

Incendiary / molotov grenades #214

Answered by saul
pedrofornaza asked this question in Questions
Discussion options

You must be logged in to vote

Sorry for the delay. I have found another method which involves listening (heh) for the explosion sound to be emitted:

//const SEED = 1146049601;
const molotovExplode = 3580951569; // murmurHash2("inferno.start", SEED);
const incExplode = 1110819271; // murmurHash2("inferno.start_incgrenade", SEED);

demoFile.on("svc_Sounds", e => {
  for (const sound of e.sounds) {
    if (
      sound.soundNumHandle !== molotovExplode &&
      sound.soundNumHandle !== incExplode
    ) {
      continue;
    }

    const inferno = (demoFile.entities.entities.get(
      sound.entityIndex
    ) as unknown) as BaseEntity<CInferno>;
    const pos = inferno.position;

    const thrower = inferno.owner as Player;

Replies: 9 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by saul
Comment options

You must be logged in to vote
1 reply
@saul
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
5 participants
Converted from issue

This discussion was converted from issue #32 on February 28, 2021 13:59.