L L4D2node

SurvivorApproachMinigun::OnInjured

0x00925390 · 288 bytes · __cdecl

_ZN23SurvivorApproachMinigun9OnInjuredEP11SurvivorBotRK15CTakeDamageInfo

Decompiled

undefined (2 params)

/* SurvivorApproachMinigun::OnInjured(SurvivorBot*, CTakeDamageInfo const&) */

SurvivorBot * SurvivorApproachMinigun::OnInjured(SurvivorBot *param_1,CTakeDamageInfo *param_2)

{
  uint uVar1;
  code *pcVar2;
  int *piVar3;
  int *piVar4;
  undefined4 uVar5;
  undefined *puVar6;
  int *in_stack_0000000c;
  int in_stack_00000010;
  
  uVar1 = *(uint *)(in_stack_00000010 + 0x34);
  if ((((uVar1 != 0xffffffff) &&
       (puVar6 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar6 != (undefined *)0xfffffffc)) &&
      (*(uint *)(puVar6 + 8) == uVar1 >> 0xc)) && (*(int *)(puVar6 + 4) != 0)) {
    piVar3 = (int *)(**(code **)(*in_stack_0000000c + 0x9a4))();
    uVar1 = *(uint *)(in_stack_00000010 + 0x34);
    pcVar2 = *(code **)(*piVar3 + 0xc0);
    if (((uVar1 == 0xffffffff) ||
        (puVar6 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar6 == (undefined *)0xfffffffc)) ||
       (*(uint *)(puVar6 + 8) != uVar1 >> 0xc)) {
      piVar4 = (int *)0x0;
    }
    else {
      piVar4 = *(int **)(puVar6 + 4);
    }
    uVar5 = (**(code **)(*piVar4 + 0x288))(piVar4);
    (*pcVar2)(piVar3,uVar5,2,0x40000000,0,"Looking at attacker",1,0x3e800000);
    *(undefined4 *)param_1 = 3;
    *(undefined4 *)(param_1 + 4) = 0;
    *(undefined4 *)(param_1 + 8) = 0;
    *(undefined4 *)(param_1 + 0xc) = 3;
    return param_1;
  }
  *(undefined4 *)param_1 = 0;
  *(undefined4 *)(param_1 + 4) = 0;
  *(undefined4 *)(param_1 + 8) = 0;
  *(undefined4 *)(param_1 + 0xc) = 1;
  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)