L L4D2node

CInfoGameEventProxy::GameEventProxyCallback

0x00b60830 · 259 bytes · __cdecl

_ZN19CInfoGameEventProxy22GameEventProxyCallbackEP11CBaseEntityP11CBasePlayer

Decompiled

undefined (2 params)

/* CInfoGameEventProxy::GameEventProxyCallback(CBaseEntity*, CBasePlayer*) */

undefined4 CInfoGameEventProxy::GameEventProxyCallback(CBaseEntity *param_1,CBasePlayer *param_2)

{
  code *pcVar1;
  int iVar2;
  int *piVar3;
  undefined4 uVar4;
  undefined1 *puVar5;
  
  if (param_1 != (CBaseEntity *)0x0) {
    iVar2 = __dynamic_cast(param_1,&CBaseEntity::typeinfo,&typeinfo,0);
    if (iVar2 != 0) {
      puVar5 = &DAT_00d539c2;
      if (*(undefined1 **)(iVar2 + 0x440) != (undefined1 *)0x0) {
        puVar5 = *(undefined1 **)(iVar2 + 0x440);
      }
      piVar3 = (int *)(**(code **)(*gameeventmanager + 0x1c))(gameeventmanager,puVar5,0,0);
      if (piVar3 != (int *)0x0) {
        pcVar1 = *(code **)(*piVar3 + 0x30);
        uVar4 = (**(code **)(*engine + 0x40))(engine,*(undefined4 *)(param_2 + 0x30));
        (*pcVar1)(piVar3,"userid",uVar4);
        if (*(int *)(iVar2 + 0x30) == 0) {
          iVar2 = 0;
        }
        else {
          iVar2 = *(int *)(iVar2 + 0x30) - *(int *)(gpGlobals + 0x58) >> 4;
        }
        (**(code **)(*piVar3 + 0x30))(piVar3,"subject",iVar2);
        (**(code **)(*gameeventmanager + 0x20))(gameeventmanager,piVar3,0);
      }
      return 0;
    }
  }
  return 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)