L L4D2node

CDirectorItemManager::FireGameEvent

0x008a8030 · 215 bytes · __thiscall

_ZN20CDirectorItemManager13FireGameEventEP10IGameEvent

Decompiled

undefined (2 params)

/* CDirectorItemManager::FireGameEvent(IGameEvent*) */

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

{
  char cVar1;
  char *pcVar2;
  int iVar3;
  CPropHealthCabinet *this_00;
  CBaseEntity *pCVar4;
  
  pcVar2 = (char *)(**(code **)(*(int *)param_1 + 8))(param_1);
  if ((pcVar2 != "round_start_post_nav") &&
     (iVar3 = _V_stricmp(pcVar2,"round_start_post_nav"), iVar3 != 0)) {
    return;
  }
  SpawnWeapons(this);
  CollectAllItemLocations(this);
  PopulateWorldWithItems(this);
  cVar1 = CTerrorGameRules::IsVersusMode();
  if (cVar1 != '\0') {
    pcVar2 = "";
    if (*(char **)(gpGlobals + 0x3c) != (char *)0x0) {
      pcVar2 = *(char **)(gpGlobals + 0x3c);
    }
    pCVar4 = (CBaseEntity *)0x0;
    iVar3 = GetMapRevisitPopulationInfo(this,pcVar2);
    if (iVar3 == 0) {
      while (pCVar4 = (CBaseEntity *)
                      CGlobalEntityList::FindEntityByClassname
                                ((CGlobalEntityList *)gEntList,pCVar4,"prop_health_cabinet"),
            pCVar4 != (CBaseEntity *)0x0) {
        this_00 = (CPropHealthCabinet *)
                  __dynamic_cast(pCVar4,&CBaseEntity::typeinfo,&CPropHealthCabinet::typeinfo,0);
        if (this_00 != (CPropHealthCabinet *)0x0) {
          CPropHealthCabinet::SpawnItems(this_00);
        }
      }
      SaveRevisitableItemState(this);
      return;
    }
  }
  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)