L L4D2node

CSurvivorRescue::FireGameEvent

0x0096ad00 · 546 bytes · __thiscall

_ZN15CSurvivorRescue13FireGameEventEP10IGameEvent

Decompiled

undefined (2 params)

/* CSurvivorRescue::FireGameEvent(IGameEvent*) */

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

{
  uint uVar1;
  uint uVar2;
  char *pcVar3;
  int iVar4;
  int *piVar5;
  uint *puVar6;
  undefined *puVar7;
  int iVar8;
  undefined4 local_3c [2];
  undefined4 local_34;
  undefined4 local_28;
  undefined4 local_24;
  
  pcVar3 = (char *)(**(code **)(*(int *)param_1 + 8))(param_1);
  if ((pcVar3 == "rescue_door_open") || (iVar4 = _V_stricmp(pcVar3,"rescue_door_open"), iVar4 == 0))
  {
    iVar4 = (**(code **)(*(int *)param_1 + 0x1c))(param_1,"entindex",0);
    piVar5 = (int *)UTIL_EntityByIndex(iVar4);
    if (piVar5 != (int *)0x0) {
      puVar6 = (uint *)(**(code **)(*piVar5 + 0xc))(piVar5);
      uVar1 = *puVar6;
      if (0 < *(int *)(this + 0x1950)) {
        piVar5 = (int *)(g_pEntityList + (uVar1 & 0xfff) * 0x10 + 4);
        iVar4 = 0;
        do {
          iVar8 = 0;
          if (uVar1 != 0xffffffff) {
            if (piVar5 == (int *)0x0) {
              iVar8 = 0;
            }
            else if (piVar5[1] == uVar1 >> 0xc) {
              iVar8 = *piVar5;
            }
          }
          uVar2 = *(uint *)(*(int *)(this + 0x1944) + iVar4 * 4);
          if (((uVar2 == 0xffffffff) ||
              (puVar7 = g_pEntityList + (uVar2 & 0xfff) * 0x10, puVar7 == (undefined *)0xfffffffc))
             || (*(uint *)(puVar7 + 8) != uVar2 >> 0xc)) {
            if (iVar8 == 0) goto LAB_0096aed0;
          }
          else if (iVar8 == *(int *)(puVar7 + 4)) {
LAB_0096aed0:
            ValidateSurvivor(this);
            uVar1 = *(uint *)(this + 0x1920);
            if (((uVar1 != 0xffffffff) &&
                (puVar7 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar7 != (undefined *)0xfffffffc)
                ) && ((*(uint *)(puVar7 + 8) == uVar1 >> 0xc && (*(int *)(puVar7 + 4) != 0)))) {
              iVar4 = (**(code **)(*(int *)param_1 + 0x1c))(param_1,"userid",0);
              local_3c[0] = UTIL_PlayerByUserId(iVar4);
              local_34 = 0;
              local_28 = 0xffffffff;
              local_24 = 0;
              local_34 = (**(code **)(*(int *)param_1 + 0x1c))(param_1,"entindex",0);
              local_24 = 5;
              InputRescue(this,(inputdata_t *)local_3c);
              return;
            }
            if (*(int *)(this + 0x1934) != 0) {
              return;
            }
            *(undefined4 *)(this + 0x1934) = 1;
            return;
          }
          iVar4 = iVar4 + 1;
        } while (iVar4 != *(int *)(this + 0x1950));
      }
    }
  }
  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)