L L4D2node

CSentence::ParseOptions

0x000db8f0 · 341 bytes · __thiscall

_ZN9CSentence12ParseOptionsER10CUtlBuffer

Decompiled

undefined (2 params)

/* CSentence::ParseOptions(CUtlBuffer&) */

void __thiscall CSentence::ParseOptions(CSentence *this,CUtlBuffer *param_1)

{
  int iVar1;
  long lVar2;
  int in_GS_OFFSET;
  char local_1220 [256];
  char local_1120 [256];
  char local_1020 [4096];
  int local_20;
  
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  while( true ) {
    CUtlBuffer::GetString(param_1,local_1020,0x1000);
    iVar1 = _V_stricmp(local_1020,"}");
    if (iVar1 == 0) break;
    iVar1 = _V_strlen(local_1020);
    if (iVar1 == 0) break;
    V_strncpy(local_1220,local_1020,0x100);
    CUtlBuffer::GetString(param_1,local_1020,0x1000);
    V_strncpy(local_1120,local_1020,0x100);
    iVar1 = _V_stricmp(local_1220,"voice_duck");
    if (iVar1 == 0) {
      lVar2 = strtol(local_1120,(char **)0x0,10);
      this[0x4a] = (CSentence)(lVar2 != 0);
    }
    else {
      iVar1 = _V_stricmp(local_1220,"checksum");
      if (iVar1 == 0) {
        lVar2 = strtol(local_1120,(char **)0x0,10);
        this[0x49] = (CSentence)0x1;
        *(long *)(this + 0x44) = lVar2;
      }
    }
  }
  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
    return;
  }
                    /* WARNING: Subroutine does not return */
  __stack_chk_fail();
}

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)