L L4D2node

CBoomerComboAwardTemplate::FireGameEvent

0x0084c3b0 · 1188 bytes · __thiscall

_ZN25CBoomerComboAwardTemplate13FireGameEventEP10IGameEvent

Decompiled

undefined (2 params)

/* CBoomerComboAwardTemplate::FireGameEvent(IGameEvent*) */

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

{
  float fVar1;
  undefined4 uVar2;
  char *pcVar3;
  CBaseEntity *this_00;
  int iVar4;
  CBaseEntity *pCVar5;
  int iVar6;
  CBaseEntity *pCVar7;
  CBaseEntity *local_20;
  
  pcVar3 = (char *)(**(code **)(*(int *)param_1 + 8))(param_1);
  if (pcVar3 == (char *)0x0) {
    return;
  }
  this_00 = (CBaseEntity *)CAwardTemplate::GetOwner((CAwardTemplate *)this);
  if (this_00 == (CBaseEntity *)0x0) {
    return;
  }
  iVar4 = CBaseEntity::GetTeamNumber(this_00);
  if (iVar4 != 2) {
    return;
  }
  if ((pcVar3 == "player_death") || (iVar4 = _V_stricmp(pcVar3,"player_death"), iVar4 == 0)) {
    iVar4 = (**(code **)(*(int *)param_1 + 0x1c))(param_1,"userid",0);
    if (iVar4 == 0) {
      iVar4 = (**(code **)(*(int *)param_1 + 0x1c))(param_1,"entityid",0);
      if (iVar4 == 0) {
        return;
      }
      iVar4 = (**(code **)(*(int *)param_1 + 0x1c))(param_1,"entityid",0);
      pCVar5 = (CBaseEntity *)UTIL_EntityByIndex(iVar4);
    }
    else {
      iVar4 = (**(code **)(*(int *)param_1 + 0x1c))(param_1,"userid",0);
      pCVar5 = (CBaseEntity *)UTIL_PlayerByUserId(iVar4);
    }
    iVar4 = (**(code **)(*(int *)param_1 + 0x1c))(param_1,"attacker",0);
    pCVar7 = (CBaseEntity *)UTIL_PlayerByUserId(iVar4);
    if (pCVar5 == (CBaseEntity *)0x0) {
      return;
    }
    if (pCVar7 == (CBaseEntity *)0x0) {
      return;
    }
    if (this_00 != pCVar7) {
      return;
    }
    iVar4 = CBaseEntity::GetTeamNumber(this_00);
    iVar6 = CBaseEntity::GetTeamNumber(pCVar5);
    if (iVar4 == iVar6) {
      return;
    }
    pcVar3 = (char *)(**(code **)(*(int *)param_1 + 0x28))(param_1,"weapon",&DAT_00d539c2);
    if ((pcVar3 != "boomer") && (iVar4 = _V_stricmp(pcVar3,"boomer"), iVar4 != 0)) {
      return;
    }
    iVar4 = gpGlobals;
    fVar1 = *(float *)(gpGlobals + 0xc);
    if (fVar1 == *(float *)(this + 0x18)) {
      return;
    }
    iVar6 = __dynamic_cast(pCVar5,&CBaseEntity::typeinfo,&Witch::typeinfo,0);
    if (iVar6 == 0) {
      if (fVar1 != *(float *)(this + 0x10)) {
        *(undefined4 *)(this + 0x14) = 1;
        *(undefined4 *)(this + 0x10) = *(undefined4 *)(iVar4 + 0xc);
        return;
      }
      iVar4 = *(int *)(this + 0x14);
      *(int *)(this + 0x14) = iVar4 + 1;
      if (iVar4 + 1 < 5) {
        return;
      }
      (**(code **)(*(int *)this + 0x14))(this,0x10,0);
      *(undefined4 *)(this + 0x14) = 0;
      uVar2 = *(undefined4 *)(gpGlobals + 0xc);
      *(undefined4 *)(this + 0x10) = uVar2;
      *(undefined4 *)(this + 0x18) = uVar2;
      return;
    }
  }
  else {
    if ((pcVar3 != "player_incapacitated") &&
       (iVar4 = _V_stricmp(pcVar3,"player_incapacitated"), iVar4 != 0)) {
      if ((pcVar3 != "map_transition") && (iVar4 = _V_stricmp(pcVar3,"map_transition"), iVar4 != 0))
      {
        if ((pcVar3 != "player_first_spawn") &&
           (iVar4 = _V_stricmp(pcVar3,"player_first_spawn"), iVar4 != 0)) {
          return;
        }
        iVar4 = (**(code **)(*(int *)param_1 + 0x1c))(param_1,"userid",0);
        if (iVar4 == 0) {
          return;
        }
        iVar4 = (**(code **)(*(int *)param_1 + 0x1c))(param_1,"userid",0);
        pCVar5 = (CBaseEntity *)UTIL_PlayerByUserId(iVar4);
        if (this_00 != pCVar5) {
          return;
        }
      }
      *(undefined4 *)(this + 0x14) = 0;
      *(undefined4 *)(this + 0x10) = 0;
      *(undefined4 *)(this + 0x18) = 0;
      return;
    }
    iVar4 = (**(code **)(*(int *)param_1 + 0x1c))(param_1,"userid",0);
    if (iVar4 == 0) {
      iVar4 = (**(code **)(*(int *)param_1 + 0x1c))(param_1,"entityid",0);
      if (iVar4 == 0) {
        return;
      }
      iVar4 = (**(code **)(*(int *)param_1 + 0x1c))(param_1,"entityid",0);
      pCVar5 = (CBaseEntity *)UTIL_EntityByIndex(iVar4);
      local_20 = (CBaseEntity *)0x0;
    }
    else {
      iVar4 = (**(code **)(*(int *)param_1 + 0x1c))(param_1,"userid",0);
      pCVar5 = (CBaseEntity *)UTIL_PlayerByUserId(iVar4);
      local_20 = pCVar5;
    }
    iVar4 = (**(code **)(*(int *)param_1 + 0x1c))(param_1,"attacker",0);
    pCVar7 = (CBaseEntity *)UTIL_PlayerByUserId(iVar4);
    if (pCVar5 == (CBaseEntity *)0x0) {
      return;
    }
    if (pCVar7 == (CBaseEntity *)0x0) {
      return;
    }
    if (this_00 != pCVar7) {
      return;
    }
    pcVar3 = (char *)(**(code **)(*(int *)param_1 + 0x28))(param_1,"weapon",&DAT_00d539c2);
    if ((pcVar3 != "boomer") && (iVar4 = _V_stricmp(pcVar3,"boomer"), iVar4 != 0)) {
      return;
    }
    if (*(float *)(this + 0x18) == *(float *)(gpGlobals + 0xc)) {
      return;
    }
    if (local_20 == (CBaseEntity *)0x0) {
      return;
    }
    iVar4 = CBaseEntity::GetTeamNumber(local_20);
    if (iVar4 != 3) {
      return;
    }
    iVar4 = (**(code **)(*(int *)local_20 + 0x544))(local_20);
    if (iVar4 != 8) {
      return;
    }
  }
  (**(code **)(*(int *)this + 0x14))(this,0x10,0);
  *(undefined4 *)(this + 0x14) = 0;
  *(undefined4 *)(this + 0x10) = 0;
  *(undefined4 *)(this + 0x18) = *(undefined4 *)(gpGlobals + 0xc);
  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)