L L4D2node

CSentence::CountPhonemes

0x000dd550 · 51 bytes · __thiscall

_ZN9CSentence13CountPhonemesEv

Decompiled

undefined (1 param)

/* CSentence::CountPhonemes() */

int __thiscall CSentence::CountPhonemes(CSentence *this)

{
  int *piVar1;
  int iVar2;
  int iVar3;
  int *piVar4;
  
  if (*(int *)(this + 0x10) < 1) {
    iVar3 = 0;
  }
  else {
    piVar4 = *(int **)(this + 4);
    piVar1 = piVar4 + *(int *)(this + 0x10);
    iVar3 = 0;
    do {
      iVar2 = *piVar4;
      piVar4 = piVar4 + 1;
      iVar3 = iVar3 + *(int *)(iVar2 + 0x14);
    } while (piVar4 != piVar1);
  }
  return iVar3;
}

SourceMod gamedata

paste into addons/sourcemod/gamedata/<your_plugin>.txt
used as the SourceMod key — change to fit your plugin's convention
SourceMod library name (server / engine / matchmaking)

Just a Signatures{} block, ready to drop into a gamedata file. Wire it up in your plugin however you like - SDKCall, DHooks, raw memory ops, or anything else.



        

        

          

Type inference is best-effort from the C signature - sanity-check the DHooks types before shipping.

Return-type handling cheatsheet (DHookReturn)