L L4D2node

CSentence::Append

0x000de700 · 592 bytes · __thiscall

_ZN9CSentence6AppendEfRKS_

Decompiled

undefined (3 params)

/* CSentence::Append(float, CSentence const&) */

void __thiscall CSentence::Append(CSentence *this,float param_1,CSentence *param_2)

{
  CWordTag *pCVar1;
  CWordTag *this_00;
  char *pcVar2;
  float *pfVar3;
  char *pcVar4;
  int iVar5;
  int iVar6;
  int iVar7;
  int in_GS_OFFSET;
  CWordTag *local_1030;
  float local_102c;
  float local_1028;
  float local_1024;
  char local_1020 [4096];
  int local_20;
  
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  if (0 < *(int *)(param_2 + 0x10)) {
    iVar6 = 0;
    do {
      pCVar1 = *(CWordTag **)(*(int *)(param_2 + 4) + iVar6 * 4);
      this_00 = operator_new(0x2c);
                    /* try { // try from 000de767 to 000de76b has its CatchHandler @ 000de94b */
      CWordTag::CWordTag(this_00,pCVar1);
      iVar5 = 0;
      iVar7 = *(int *)(this_00 + 0x14);
      *(float *)this_00 = *(float *)this_00 + param_1;
      *(float *)(this_00 + 4) = *(float *)(this_00 + 4) + param_1;
      if (0 < iVar7) {
        do {
          pfVar3 = *(float **)(*(int *)(this_00 + 8) + iVar5 * 4);
          iVar5 = iVar5 + 1;
          *pfVar3 = *pfVar3 + param_1;
          pfVar3[1] = pfVar3[1] + param_1;
        } while (iVar5 != iVar7);
      }
      iVar6 = iVar6 + 1;
      local_1030 = this_00;
      CUtlVector<CWordTag*,CUtlMemory<CWordTag*,int>>::InsertBefore
                ((CUtlVector<CWordTag*,CUtlMemory<CWordTag*,int>> *)(this + 4),*(int *)(this + 0x10)
                 ,&local_1030);
    } while (iVar6 < *(int *)(param_2 + 0x10));
  }
  pcVar2 = *(char **)param_2;
  pcVar4 = "";
  if (pcVar2 != (char *)0x0) {
    pcVar4 = pcVar2;
  }
  if (*pcVar4 != '\0') {
    pcVar4 = "";
    if (*(char **)this != (char *)0x0) {
      pcVar4 = *(char **)this;
    }
    if (pcVar2 == (char *)0x0) {
      pcVar2 = "";
    }
    if (*pcVar4 == '\0') {
      V_strncpy(local_1020,pcVar2,0x1000);
    }
    else {
      V_snprintf(local_1020,0x1000,"%s %s",pcVar4,pcVar2);
    }
    SetText(this,local_1020);
  }
  iVar6 = *(int *)(param_2 + 0x3c);
  if (0 < iVar6) {
    iVar7 = 0;
    do {
      iVar5 = iVar7 + 1;
      pfVar3 = (float *)(iVar7 * 0xc + *(int *)(param_2 + 0x30));
      local_1028 = pfVar3[1];
      local_102c = *pfVar3 + param_1;
      local_1024 = pfVar3[2];
      CUtlVector<CEmphasisSample,CUtlMemory<CEmphasisSample,int>>::InsertBefore
                ((CUtlVector<CEmphasisSample,CUtlMemory<CEmphasisSample,int>> *)(this + 0x30),
                 *(int *)(this + 0x3c),(CEmphasisSample *)&local_102c);
      iVar7 = iVar5;
    } while (iVar5 != iVar6);
  }
  this[0x4a] = (CSentence)(param_2[0x4a] != (CSentence)0x0 || this[0x4a] != (CSentence)0x0);
  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {
                    /* WARNING: Subroutine does not return */
    __stack_chk_fail();
  }
  return;
}

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)