L L4D2node

CSurvivorRescue::YellThink

0x00969d50 · 526 bytes · __thiscall

_ZN15CSurvivorRescue9YellThinkEv

Decompiled

undefined (1 param)

/* CSurvivorRescue::YellThink() */

void __thiscall CSurvivorRescue::YellThink(CSurvivorRescue *this)

{
  uint uVar1;
  code *pcVar2;
  int *piVar3;
  undefined4 uVar4;
  int iVar5;
  undefined *puVar6;
  undefined1 local_34 [16];
  CAI_Concept local_24 [20];
  
  ValidateSurvivor(this);
  uVar1 = *(uint *)(this + 0x1920);
  if ((((uVar1 != 0xffffffff) &&
       (puVar6 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar6 != (undefined *)0xfffffffc)) &&
      (*(uint *)(puVar6 + 8) == uVar1 >> 0xc)) && (*(int *)(puVar6 + 4) != 0)) {
    CBaseEntity::ThinkSet((_func_void *)local_34,(float)this,(char *)YellThink);
    pcVar2 = *(code **)(*(int *)this + 0x3cc);
    CAI_Concept::CAI_Concept(local_24,"CallForRescue");
    (*pcVar2)(this,local_24,0,0,0,0);
    piVar3 = (int *)(**(code **)(*gameeventmanager + 0x1c))
                              (gameeventmanager,"survivor_call_for_help",0,0);
    if (piVar3 != (int *)0x0) {
      iVar5 = 0;
      pcVar2 = *(code **)(*piVar3 + 0x30);
      uVar1 = *(uint *)(this + 0x1920);
      if (((uVar1 != 0xffffffff) &&
          (puVar6 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar6 != (undefined *)0xfffffffc)) &&
         (*(uint *)(puVar6 + 8) == uVar1 >> 0xc)) {
        iVar5 = *(int *)(puVar6 + 4);
      }
      uVar4 = (**(code **)(*engine + 0x40))(engine,*(undefined4 *)(iVar5 + 0x30));
      (*pcVar2)(piVar3,"userid",uVar4);
      if (*(int *)(this + 0x30) == 0) {
        iVar5 = 0;
      }
      else {
        iVar5 = *(int *)(this + 0x30) - *(int *)(gpGlobals + 0x58) >> 4;
      }
      (**(code **)(*piVar3 + 0x30))(piVar3,"subject",iVar5);
      (**(code **)(*gameeventmanager + 0x20))(gameeventmanager,piVar3,0);
    }
    uVar1 = *(uint *)(this + 0x1920);
    piVar3 = (int *)0x0;
    if (((uVar1 != 0xffffffff) &&
        (puVar6 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar6 != (undefined *)0xfffffffc)) &&
       (*(uint *)(puVar6 + 8) == uVar1 >> 0xc)) {
      piVar3 = *(int **)(puVar6 + 4);
    }
    (**(code **)(*piVar3 + 0x850))(piVar3,0x3f800000);
    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)