L L4D2node

InfectedAlert::OnShoved

0x00a18ff0 · 414 bytes · __cdecl

_ZN13InfectedAlert8OnShovedEP8InfectedP11CBaseEntity

Decompiled

undefined (2 params)

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

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

{
  char cVar1;
  int iVar2;
  undefined4 *puVar3;
  undefined4 *puVar4;
  Infected *in_stack_0000000c;
  CBaseEntity *in_stack_00000010;
  
  if (((in_stack_00000010 != (CBaseEntity *)0x0) &&
      (cVar1 = (**(code **)(*(int *)in_stack_00000010 + 0x16c))(), cVar1 != '\0')) &&
     (in_stack_0000000c[0x1d90] == (Infected)0x0)) {
    iVar2 = CBaseEntity::GetTeamNumber(in_stack_00000010);
    cVar1 = IsASurvivorTeam(iVar2);
    if ((cVar1 != '\0') &&
       (cVar1 = (**(code **)(*(int *)in_stack_0000000c + 0x41c))(), cVar1 == '\0')) {
      Infected::OnAmbushed(in_stack_0000000c,(CTerrorPlayer *)in_stack_00000010);
      *(undefined4 *)param_1 = 0;
      *(undefined4 *)(param_1 + 4) = 0;
      *(undefined4 *)(param_1 + 8) = 0;
      *(undefined4 *)(param_1 + 0xc) = 1;
      return param_1;
    }
  }
  puVar3 = ::operator_new(0x48);
  puVar3[8] = 0;
  puVar3[9] = 0;
  puVar3[10] = 0;
  puVar3[3] = 0;
  puVar3[4] = 0;
  puVar3[5] = 0;
  puVar3[6] = 0;
  puVar3[7] = 0;
  puVar3[2] = 0;
  *(undefined1 *)(puVar3 + 0xc) = 0;
  *(undefined1 *)((int)puVar3 + 0x31) = 0;
  puVar3[0xb] = 0;
  *puVar3 = &PTR__InfectedShoved_00d21b88;
  puVar3[1] = &PTR__InfectedShoved_00d21cec;
  puVar3[0xd] = 0xffffffff;
  if (in_stack_00000010 == (CBaseEntity *)0x0) {
    puVar3[0xe] = vec3_origin;
    puVar3[0xf] = DAT_01053d4c;
    puVar3[0x10] = DAT_01053d50;
  }
  else {
                    /* try { // try from 00a190b9 to 00a190cb has its CatchHandler @ 00a1919a */
    puVar4 = (undefined4 *)(**(code **)(*(int *)in_stack_00000010 + 0xc))();
    puVar3[0xd] = *puVar4;
    puVar4 = (undefined4 *)(**(code **)(*(int *)in_stack_00000010 + 0x288))();
    puVar3[0xe] = *puVar4;
    puVar3[0xf] = puVar4[1];
    puVar3[0x10] = puVar4[2];
  }
  puVar3[0x11] = 0;
  *(undefined4 *)param_1 = 2;
  *(undefined4 **)(param_1 + 4) = puVar3;
  *(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)