L L4D2node

SurvivorDebugApproach::OnCommandApproach

0x00929250 · 194 bytes · __cdecl

_ZN21SurvivorDebugApproach17OnCommandApproachEP11SurvivorBotP11CBaseEntity

Decompiled

undefined (2 params)

/* SurvivorDebugApproach::OnCommandApproach(SurvivorBot*, CBaseEntity*) */

SurvivorBot * SurvivorDebugApproach::OnCommandApproach(SurvivorBot *param_1,CBaseEntity *param_2)

{
  int *piVar1;
  SurvivorLegsApproach *this;
  int iVar2;
  undefined4 *puVar3;
  int *in_stack_0000000c;
  CBaseEntity *in_stack_00000010;
  
  this = ::operator_new(0x9050);
                    /* try { // try from 0092927a to 0092927e has its CatchHandler @ 00929312 */
  SurvivorLegsApproach::SurvivorLegsApproach(this,in_stack_00000010);
  iVar2 = (**(code **)(*in_stack_0000000c + 0x9a8))();
  piVar1 = *(int **)(iVar2 + 0x20 + *(int *)(iVar2 + 0x60) * 4);
  puVar3 = ::operator_new(0x38);
  *puVar3 = &PTR__Behavior_00d00308;
  puVar3[1] = &PTR__Behavior_00d003d0;
                    /* try { // try from 009292c7 to 009292cb has its CatchHandler @ 00929327 */
  CFmtStrN<32>::CFmtStrN((CFmtStrN<32> *)(puVar3 + 3),"%s",&DAT_00d539c2);
  puVar3[2] = this;
  *(undefined4 **)(iVar2 + 0x20 + *(int *)(iVar2 + 0x60) * 4) = puVar3;
  if (piVar1 != (int *)0x0) {
    (**(code **)(*piVar1 + 4))(piVar1);
  }
  *(undefined4 *)param_1 = 4;
  *(undefined4 *)(param_1 + 4) = 0;
  *(undefined4 *)(param_1 + 8) = 0;
  *(undefined4 *)(param_1 + 0xc) = 3;
  return param_1;
}

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)