L L4D2node

InfectedBehavior::OnShoved

0x00a2fb90 · 146 bytes · __cdecl

_ZN16InfectedBehavior8OnShovedEP8InfectedP11CBaseEntity

Decompiled

undefined (2 params)

/* InfectedBehavior::OnShoved(Infected*, CBaseEntity*) */

Infected * InfectedBehavior::OnShoved(Infected *param_1,CBaseEntity *param_2)

{
  char cVar1;
  int iVar2;
  CBaseEntity *in_stack_0000000c;
  CTerrorPlayer *in_stack_00000010;
  
  if (in_stack_0000000c[0x1d90] != (CBaseEntity)0x0) goto LAB_00a2fbc2;
  *(uint *)(in_stack_0000000c + 0x1c74) = *(uint *)(in_stack_0000000c + 0x1c74) & 0xffffffbf;
  iVar2 = *(int *)(param_2 + 0x34);
  *(int *)(param_2 + 0x34) = iVar2 + -1;
  if ((-1 < iVar2 + -1) || (((byte)in_stack_0000000c[0x1c74] & 0x20) != 0)) goto LAB_00a2fbc2;
  iVar2 = CBaseEntity::GetGender(in_stack_0000000c);
  if (iVar2 == 0x11) goto LAB_00a2fbc2;
  if (in_stack_00000010 == (CTerrorPlayer *)0x0) {
LAB_00a2fc19:
    in_stack_00000010 = (CTerrorPlayer *)0x0;
  }
  else {
    cVar1 = (**(code **)(*(int *)in_stack_00000010 + 0x16c))();
    if (cVar1 == '\0') goto LAB_00a2fc19;
  }
  Infected::OnAmbushed((Infected *)in_stack_0000000c,in_stack_00000010);
LAB_00a2fbc2:
  *(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)