L L4D2node

JockeyLeap::OnInjured

0x00ab5050 · 425 bytes · __cdecl

_ZN10JockeyLeap9OnInjuredEP6JockeyRK15CTakeDamageInfo

Decompiled

undefined (2 params)

/* JockeyLeap::OnInjured(Jockey*, CTakeDamageInfo const&) */

Jockey * JockeyLeap::OnInjured(Jockey *param_1,CTakeDamageInfo *param_2)

{
  uint uVar1;
  code *pcVar2;
  char cVar3;
  byte bVar4;
  int *piVar5;
  undefined4 uVar6;
  int *piVar7;
  undefined *puVar8;
  int *in_stack_0000000c;
  int in_stack_00000010;
  
  if ((*(byte *)(in_stack_00000010 + 0x4b) & 0x40) != 0) {
    uVar1 = *(uint *)(in_stack_00000010 + 0x34);
    if ((((uVar1 != 0xffffffff) &&
         (puVar8 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar8 != (undefined *)0xfffffffc)) &&
        (*(uint *)(puVar8 + 8) == uVar1 >> 0xc)) &&
       (piVar7 = *(int **)(puVar8 + 4), piVar7 != (int *)0x0)) {
      cVar3 = (**(code **)(*piVar7 + 0x16c))(piVar7);
      if (cVar3 != '\0') {
        piVar5 = (int *)(**(code **)(*gameeventmanager + 0x1c))
                                  (gameeventmanager,"jockey_headshot",0,0);
        if (piVar5 != (int *)0x0) {
          pcVar2 = *(code **)(*piVar5 + 0x30);
          uVar6 = (**(code **)(*engine + 0x40))(engine,piVar7[0xc]);
          (*pcVar2)(piVar5,"userid",uVar6);
          pcVar2 = *(code **)(*piVar5 + 0x30);
          uVar6 = (**(code **)(*engine + 0x40))(engine,in_stack_0000000c[0xc]);
          (*pcVar2)(piVar5,"jockeyuserid",uVar6);
          pcVar2 = *(code **)(*piVar5 + 0x2c);
          piVar7 = (int *)(**(code **)(*in_stack_0000000c + 0x9b0))(in_stack_0000000c);
          cVar3 = (**(code **)(*piVar7 + 0xf8))(piVar7);
          bVar4 = 0;
          if (cVar3 == '\0') {
            bVar4 = 1;
            uVar1 = *(uint *)(param_2 + 0x34);
            if (uVar1 != 0xffffffff) {
              puVar8 = g_pEntityList + (uVar1 & 0xfff) * 0x10;
              if (((puVar8 == (undefined *)0xfffffffc) || (*(uint *)(puVar8 + 8) != uVar1 >> 0xc))
                 || (piVar7 = *(int **)(puVar8 + 4), piVar7 == (int *)0x0)) {
                bVar4 = 1;
              }
              else {
                bVar4 = (**(code **)(*piVar7 + 0x804))(piVar7);
                bVar4 = bVar4 ^ 1;
              }
            }
          }
          (*pcVar2)(piVar5,"islunging",bVar4);
          (**(code **)(*gameeventmanager + 0x20))(gameeventmanager,piVar5,0);
        }
      }
    }
  }
  *(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)