L L4D2node

SENTENCEG_PickRndSz

0x0082af40 · 180 bytes · __cdecl

_Z19SENTENCEG_PickRndSzPKc

Decompiled

undefined (1 param)

/* SENTENCEG_PickRndSz(char const*) */

undefined4 SENTENCEG_PickRndSz(char *param_1)

{
  int iVar1;
  undefined4 uVar2;
  int in_GS_OFFSET;
  char local_50;
  undefined1 local_4f [63];
  int local_10;
  
  local_10 = *(int *)(in_GS_OFFSET + 0x14);
  if (fSentencesInit != 0) {
    local_50 = '\0';
    iVar1 = (**(code **)(*engine + 0x88))(engine,param_1);
    if (iVar1 < 0) {
      Warning("No such sentence group %s\n",param_1);
    }
    else {
      iVar1 = (**(code **)(*engine + 0x78))(engine,iVar1,&local_50,0x40);
      if ((-1 < iVar1) && (local_50 != '\0')) {
        uVar2 = (**(code **)(*engine + 0x80))(engine,local_4f);
        goto LAB_0082afc0;
      }
    }
  }
  uVar2 = 0xffffffff;
LAB_0082afc0:
  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {
    return uVar2;
  }
                    /* 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)