L L4D2node

CTerrorWeapon::ShouldPrecache

0x0056c5b0 · 76 bytes · __thiscall

_ZN13CTerrorWeapon14ShouldPrecacheEv

Decompiled

undefined (1 param)

/* CTerrorWeapon::ShouldPrecache() */

undefined4 __thiscall CTerrorWeapon::ShouldPrecache(CTerrorWeapon *this)

{
  CDirectorItemManager *pCVar1;
  undefined4 uVar2;
  
  if (TheDirector != 0) {
    pCVar1 = *(CDirectorItemManager **)(TheDirector + 0x62c);
    uVar2 = 0;
    if (pCVar1 != (CDirectorItemManager *)0x0) {
      uVar2 = (**(code **)(*(int *)this + 0x638))(this);
      uVar2 = CDirectorItemManager::IsWeaponAllowedToExist(pCVar1,uVar2,1);
    }
    return uVar2;
  }
  return 0;
}

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)