L L4D2node

CSurvivorRescue::ModifyOrAppendCriteria

0x00969070 · 706 bytes · __thiscall

_ZN15CSurvivorRescue22ModifyOrAppendCriteriaER14AI_CriteriaSet

Decompiled

undefined (2 params)

/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* CSurvivorRescue::ModifyOrAppendCriteria(AI_CriteriaSet&) */

void __thiscall
CSurvivorRescue::ModifyOrAppendCriteria(CSurvivorRescue *this,AI_CriteriaSet *param_1)

{
  uint uVar1;
  int iVar2;
  char cVar3;
  int iVar4;
  char *pcVar5;
  undefined *puVar6;
  undefined4 local_24;
  undefined4 local_20;
  undefined4 local_18;
  undefined4 local_14;
  int local_10;
  
  local_24 = 0;
  local_20 = 0;
  if (___atan2f_finite == 0) {
    local_10 = 0;
  }
  else {
    (**(code **)(___atan2f_finite + 0x50))
              (___atan2f_finite,&local_24,0,0,0,0,"/data/src/game/server/terror/survivorrescue.cpp",
               0xe7,&ModifyOrAppendCriteria(AI_CriteriaSet&)::tm_fmt,"(%s)%s","Unaccounted",
               "CSurvivorRescue::ModifyOrAppendCriteria");
    local_10 = ___atan2f_finite;
  }
  iVar2 = _DAT_0105db00;
  local_18 = local_24;
  local_14 = local_20;
  if ((_DAT_0105d154 != 0) || (DAT_0105d158 == '\0')) {
                    /* try { // try from 009691c6 to 00969214 has its CatchHandler @ 0096934f */
    iVar4 = ThreadGetCurrentId();
    if (iVar2 == iVar4) {
      if ((char *)*_DAT_0105d15c != "CSurvivorRescue::ModifyOrAppendCriteria") {
        _DAT_0105d15c =
             (int *)CVProfNode::GetSubNode((char *)_DAT_0105d15c,0xd0d7b4,(char *)0x1,0xbfafa1);
      }
      CVProfNode::EnterScope();
      DAT_0105d158 = '\0';
    }
  }
  iVar2 = _DAT_0105db00;
  uVar1 = *(uint *)(this + 0x1920);
  if ((((uVar1 == 0xffffffff) ||
       (puVar6 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar6 == (undefined *)0xfffffffc)) ||
      (*(uint *)(puVar6 + 8) != uVar1 >> 0xc)) || (iVar4 = *(int *)(puVar6 + 4), iVar4 == 0)) {
    if ((DAT_0105d158 == '\0') || (_DAT_0105d154 != 0)) {
      iVar4 = ThreadGetCurrentId();
      if (iVar2 == iVar4) {
        cVar3 = CVProfNode::ExitScope();
        if (cVar3 != '\0') {
          _DAT_0105d15c = (int *)_DAT_0105d15c[0x19];
        }
        DAT_0105d158 = _DAT_0105d15c == (int *)0x105d160;
      }
    }
    if (local_10 != 0) {
      (**(code **)(local_10 + 0x54))(local_10,local_18,local_14,0,0,0);
    }
  }
  else {
                    /* try { // try from 0096925e to 0096928c has its CatchHandler @ 00969364 */
    AI_CriteriaSet::AppendCriteria(param_1,"Team","Survivor",1.0);
    pcVar5 = (char *)SurvivorCharacterName(*(undefined4 *)(iVar4 + 0x2ba0));
    AI_CriteriaSet::AppendCriteria(param_1,"Who",pcVar5,1.0);
    iVar2 = _DAT_0105db00;
    if ((DAT_0105d158 == '\0') || (_DAT_0105d154 != 0)) {
      iVar4 = ThreadGetCurrentId();
      if (iVar2 == iVar4) {
        cVar3 = CVProfNode::ExitScope();
        if (cVar3 != '\0') {
          _DAT_0105d15c = (int *)_DAT_0105d15c[0x19];
        }
        DAT_0105d158 = _DAT_0105d15c == (int *)0x105d160;
      }
    }
    if (local_10 != 0) {
      (**(code **)(local_10 + 0x54))(local_10,local_18,local_14,0,0,0);
      return;
    }
  }
  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)