L L4D2node

CDirectorChallengeMode::AllowFallenSurvivorItem

0x0089ee00 · 338 bytes · __thiscall

_ZNK22CDirectorChallengeMode23AllowFallenSurvivorItemE10CSWeaponID

Decompiled

undefined (2 params)

/* CDirectorChallengeMode::AllowFallenSurvivorItem(CSWeaponID) const */

uint __thiscall CDirectorChallengeMode::AllowFallenSurvivorItem(undefined4 this,undefined4 param_2)

{
  int iVar1;
  uint uVar2;
  int iVar3;
  void *local_34 [2];
  undefined2 local_2c;
  ushort local_2a;
  void *local_28;
  undefined4 local_24;
  undefined2 local_20;
  ushort local_1e;
  
  iVar1 = (**(code **)(*g_pScriptVM + 0x48))
                    (g_pScriptVM,"AllowFallenSurvivorItem",*(undefined4 *)(TheDirector + 0x4b8),0);
  (**(code **)(*g_pScriptVM + 0x4c))(g_pScriptVM,iVar1);
  uVar2 = 1;
  if (iVar1 != 0) {
    local_2c = 0;
    local_2a = 0;
    local_34[0] = (void *)0x0;
                    /* try { // try from 0089ee79 to 0089ee7d has its CatchHandler @ 0089ef75 */
    local_28 = (void *)WeaponIDToClassname(param_2);
    iVar1 = TheDirector;
    local_1e = 0;
    local_20 = 0x1f;
    local_24 = 0;
                    /* try { // try from 0089eeca to 0089ef1f has its CatchHandler @ 0089ef58 */
    iVar3 = (**(code **)(*g_pScriptVM + 0x48))
                      (g_pScriptVM,"AllowFallenSurvivorItem",*(undefined4 *)(TheDirector + 0x4b8),0)
    ;
    if (iVar3 != 0) {
      (**(code **)(*g_pScriptVM + 0x50))
                (g_pScriptVM,iVar3,&local_28,1,local_34,*(undefined4 *)(iVar1 + 0x4b8),1,&local_28);
      (**(code **)(*g_pScriptVM + 0x4c))(g_pScriptVM,iVar3);
    }
    if ((local_1e & 1) != 0) {
      free(local_28);
    }
    uVar2 = (uint)local_34[0] & 0xff;
    if ((local_2a & 1) != 0) {
      free(local_34[0]);
      return uVar2;
    }
  }
  return uVar2;
}

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)