L L4D2node

CVomitStopAwardTemplate::FireGameEvent

0x00861110 · 349 bytes · __thiscall

_ZN23CVomitStopAwardTemplate13FireGameEventEP10IGameEvent

Decompiled

undefined (2 params)

/* CVomitStopAwardTemplate::FireGameEvent(IGameEvent*) */

void __thiscall
CVomitStopAwardTemplate::FireGameEvent(CVomitStopAwardTemplate *this,IGameEvent *param_1)

{
  uint uVar1;
  int *piVar2;
  char cVar3;
  char *pcVar4;
  CBaseEntity *this_00;
  int iVar5;
  CBaseEntity *this_01;
  CBaseEntity *pCVar6;
  undefined *puVar7;
  FindAnyItSurvivor local_1d [13];
  
  pcVar4 = (char *)(**(code **)(*(int *)param_1 + 8))(param_1);
  if (((pcVar4 != (char *)0x0) &&
      (this_00 = (CBaseEntity *)CAwardTemplate::GetOwner((CAwardTemplate *)this),
      this_00 != (CBaseEntity *)0x0)) && (iVar5 = CBaseEntity::GetTeamNumber(this_00), iVar5 == 2))
  {
    if ((pcVar4 != "player_shoved") && (iVar5 = _V_stricmp(pcVar4,"player_shoved"), iVar5 != 0)) {
      return;
    }
    iVar5 = (**(code **)(*(int *)param_1 + 0x1c))(param_1,"userid",0);
    this_01 = (CBaseEntity *)UTIL_PlayerByUserId(iVar5);
    iVar5 = (**(code **)(*(int *)param_1 + 0x1c))(param_1,"attacker",0);
    pCVar6 = (CBaseEntity *)UTIL_PlayerByUserId(iVar5);
    if (((((this_01 != (CBaseEntity *)0x0) && (pCVar6 != (CBaseEntity *)0x0)) &&
         ((this_00 == pCVar6 &&
          ((((iVar5 = CBaseEntity::GetTeamNumber(this_01), iVar5 == 3 &&
             (iVar5 = (**(code **)(*(int *)this_01 + 0x544))(this_01), iVar5 == 2)) &&
            (uVar1 = *(uint *)(this_01 + 0x30bc), uVar1 != 0xffffffff)) &&
           ((puVar7 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar7 != (undefined *)0xfffffffc &&
            (*(uint *)(puVar7 + 8) == uVar1 >> 0xc)))))))) &&
        (piVar2 = *(int **)(puVar7 + 4), piVar2 != (int *)0x0)) &&
       (cVar3 = (**(code **)(*piVar2 + 0x354))(piVar2), cVar3 != '\0')) {
      local_1d[0] = (FindAnyItSurvivor)0x0;
      ForEachSurvivor<FindAnyItSurvivor>(local_1d);
      if (local_1d[0] == (FindAnyItSurvivor)0x0) {
        (**(code **)(*(int *)this + 0x14))(this,0x1a,0);
      }
    }
  }
  return;
}

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)