L L4D2node

SurvivorBot::Say

0x0093ab20 · 424 bytes · __thiscall

_ZN11SurvivorBot3SayEPKcNS_15SayPriorityTypeEfP20CBaseCombatCharacter

Decompiled

undefined (5 params)

/* SurvivorBot::Say(char const*, SurvivorBot::SayPriorityType, float, CBaseCombatCharacter*) */

void __thiscall
SurvivorBot::Say(SurvivorBot *this,char *param_1,int param_3,float param_4,int *param_5)

{
  int iVar1;
  undefined4 *puVar2;
  int iVar3;
  SurvivorBot *pSVar4;
  longdouble lVar5;
  
  if (0 < *(int *)(this + 0x1ab00)) {
    iVar3 = 0;
    pSVar4 = this;
    do {
      if (((*(char **)(pSVar4 + 0x1aabc) == param_1) ||
          (iVar1 = _V_stricmp(param_1,*(char **)(pSVar4 + 0x1aabc)), iVar1 == 0)) &&
         (*(float *)(gpGlobals + 0xc) - *(float *)(pSVar4 + 0x1aac0) < 5.0)) {
        return;
      }
      iVar3 = iVar3 + 1;
      pSVar4 = pSVar4 + 8;
    } while (iVar3 < *(int *)(this + 0x1ab00));
  }
  if ((*(int *)(this + 0x1aaa4) == 0) || (*(int *)(this + 0x1aaa8) <= param_3)) {
    *(char **)(this + 0x1aaa4) = param_1;
    *(int *)(this + 0x1aaa8) = param_3;
    lVar5 = (longdouble)CountdownTimer::Now();
    if ((float)lVar5 + param_4 != *(float *)(this + 0x1aab4)) {
      (**(code **)(*(int *)(this + 0x1aaac) + 4))(this + 0x1aaac,this + 0x1aab4);
      *(float *)(this + 0x1aab4) = (float)lVar5 + param_4;
    }
    if (param_4 != *(float *)(this + 0x1aab0)) {
      (**(code **)(*(int *)(this + 0x1aaac) + 4))(this + 0x1aaac,this + 0x1aab0);
      *(float *)(this + 0x1aab0) = param_4;
    }
    if (param_5 == (int *)0x0) {
      *(undefined4 *)(this + 0x1aab8) = 0xffffffff;
    }
    else {
      puVar2 = (undefined4 *)(**(code **)(*param_5 + 0xc))(param_5);
      *(undefined4 *)(this + 0x1aab8) = *puVar2;
    }
    iVar1 = gpGlobals;
    iVar3 = *(int *)(this + 0x1aafc);
    *(char **)(this + iVar3 * 8 + 0x1aabc) = param_1;
    *(undefined4 *)(this + iVar3 * 8 + 0x1aac0) = *(undefined4 *)(iVar1 + 0xc);
    iVar1 = 0;
    if (iVar3 + 1 < 8) {
      iVar1 = iVar3 + 1;
    }
    *(int *)(this + 0x1aafc) = iVar1;
    if (*(int *)(this + 0x1ab00) < 8) {
      *(int *)(this + 0x1ab00) = *(int *)(this + 0x1ab00) + 1;
    }
  }
  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)