L L4D2node

HunterLungeAtVictim::OnShoved

0x00aa00d0 · 553 bytes · __cdecl

_ZN19HunterLungeAtVictim8OnShovedEP6HunterP11CBaseEntity

Decompiled

undefined (2 params)

/* HunterLungeAtVictim::OnShoved(Hunter*, CBaseEntity*) */

Hunter * HunterLungeAtVictim::OnShoved(Hunter *param_1,CBaseEntity *param_2)

{
  uint uVar1;
  code *pcVar2;
  char cVar3;
  int *piVar4;
  undefined4 uVar5;
  undefined4 *puVar6;
  undefined *puVar7;
  int *in_stack_0000000c;
  int *in_stack_00000010;
  
  if ((in_stack_00000010 == (int *)0x0) ||
     (cVar3 = (**(code **)(*in_stack_00000010 + 0x16c))(), cVar3 == '\0')) {
    in_stack_00000010 = (int *)0x0;
  }
  piVar4 = (int *)(**(code **)(*in_stack_0000000c + 0x9b0))();
  cVar3 = (**(code **)(*piVar4 + 0xf8))(piVar4);
  if (((cVar3 == '\0') &&
      ((((uVar1 = *(uint *)(param_2 + 0x34), uVar1 == 0xffffffff ||
         (puVar7 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar7 == (undefined *)0xfffffffc)) ||
        (*(uint *)(puVar7 + 8) != uVar1 >> 0xc)) ||
       ((piVar4 = *(int **)(puVar7 + 4), piVar4 == (int *)0x0 ||
        (cVar3 = (**(code **)(*piVar4 + 0x804))(piVar4), cVar3 == '\0')))))) &&
     ((in_stack_00000010 != (int *)0x0 &&
      (piVar4 = (int *)(**(code **)(*gameeventmanager + 0x1c))
                                 (gameeventmanager,"hunter_punched",0,0), piVar4 != (int *)0x0)))) {
    pcVar2 = *(code **)(*piVar4 + 0x30);
    uVar5 = (**(code **)(*engine + 0x40))(engine,in_stack_00000010[0xc]);
    (*pcVar2)(piVar4,"userid",uVar5);
    pcVar2 = *(code **)(*piVar4 + 0x30);
    uVar5 = (**(code **)(*engine + 0x40))(engine,in_stack_0000000c[0xc]);
    (*pcVar2)(piVar4,"hunteruserid",uVar5);
    (**(code **)(*piVar4 + 0x2c))(piVar4,"islunging",1);
    (**(code **)(*gameeventmanager + 0x20))(gameeventmanager,piVar4,0);
  }
  puVar6 = ::operator_new(0x48);
  *(undefined4 *)param_1 = 1;
  puVar6[8] = 0;
  puVar6[9] = 0;
  puVar6[10] = 0;
  puVar6[3] = 0;
  puVar6[4] = 0;
  puVar6[5] = 0;
  puVar6[6] = 0;
  puVar6[7] = 0;
  puVar6[2] = 0;
  *(undefined1 *)(puVar6 + 0xc) = 0;
  *(undefined1 *)((int)puVar6 + 0x31) = 0;
  puVar6[0xb] = 0;
  *puVar6 = &PTR__HunterLeapToCover_00d317c8;
  puVar6[1] = &PTR__HunterLeapToCover_00d3192c;
  puVar6[0xe] = &PTR_NetworkStateChanged_00c0b6e0;
  puVar6[0xf] = 0;
  puVar6[0x10] = 0xbf800000;
  *(undefined4 **)(param_1 + 4) = puVar6;
  *(char **)(param_1 + 8) = "Shoved during Pounce - trying to escape now";
  *(undefined4 *)(param_1 + 0xc) = 2;
  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)