L L4D2node

SurvivorDislodgeVictim::OnContact

0x0092a2c0 · 209 bytes · __thiscall

_ZN22SurvivorDislodgeVictim9OnContactEP11SurvivorBotP11CBaseEntityP10CGameTrace

Decompiled

undefined (4 params)

/* SurvivorDislodgeVictim::OnContact(SurvivorBot*, CBaseEntity*, CGameTrace*) */

SurvivorDislodgeVictim * __thiscall
SurvivorDislodgeVictim::OnContact
          (SurvivorDislodgeVictim *this,SurvivorBot *param_1,CBaseEntity *param_2,
          CGameTrace *param_3)

{
  int iVar1;
  int *piVar2;
  undefined4 *puVar3;
  char *pcVar4;
  
  if (param_3 != (CGameTrace *)0x0) {
    iVar1 = CBaseEntity::GetTeamNumber((CBaseEntity *)param_3);
    if (iVar1 == 3) {
      if (param_1[0x68] == (SurvivorBot)0x0) {
        piVar2 = (int *)(**(code **)(*(int *)param_2 + 0x9a4))(param_2);
        iVar1 = *piVar2;
        pcVar4 = "Trying to kill friend\'s attacker";
        puVar3 = &g_SurvivorBotAttackOnReply;
      }
      else {
        piVar2 = (int *)(**(code **)(*(int *)param_2 + 0x9a4))(param_2);
        iVar1 = *piVar2;
        pcVar4 = "Shoving enemy out of my way";
        puVar3 = &g_SurvivorBotMeleeOnReply;
      }
      (**(code **)(iVar1 + 0xc4))(piVar2,param_3,2,0x3f800000,puVar3,pcVar4,1,0x3e800000);
    }
  }
  *(undefined4 *)this = 0;
  *(undefined4 *)(this + 4) = 0;
  *(undefined4 *)(this + 8) = 0;
  *(undefined4 *)(this + 0xc) = 1;
  return this;
}

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)