L L4D2node

CPropDoorRotatingCheckpoint::Precache

0x007fd2c0 · 312 bytes · __thiscall

_ZN27CPropDoorRotatingCheckpoint8PrecacheEv

Decompiled

undefined (1 param)

/* CPropDoorRotatingCheckpoint::Precache() */

void __thiscall CPropDoorRotatingCheckpoint::Precache(CPropDoorRotatingCheckpoint *this)

{
  code *pcVar1;
  char cVar2;
  KeyValues *pKVar3;
  undefined4 uVar4;
  char *pcVar5;
  char *pcVar6;
  uint in_stack_ffffffc8;
  
  CBreakableProp::Precache((CBreakableProp *)this);
  CBaseEntity::PrecacheScriptSound("Doors.Checkpoint.Unlock");
  pKVar3 = KeyValues::operator_new((KeyValues *)0x2c,in_stack_ffffffc8);
                    /* try { // try from 007fd309 to 007fd30d has its CatchHandler @ 007fd3fb */
  KeyValues::KeyValues(pKVar3,"",(IKeyValuesSystem *)0x0,false);
  pcVar1 = *(code **)(*modelinfo + 0x54);
  uVar4 = CBaseEntity::GetModel((CBaseEntity *)this);
  pcVar5 = (char *)(*pcVar1)(modelinfo,uVar4);
  pcVar1 = *(code **)(*modelinfo + 0x10);
  uVar4 = CBaseEntity::GetModel((CBaseEntity *)this);
  pcVar6 = (char *)(*pcVar1)(modelinfo,uVar4);
  cVar2 = KeyValues::LoadFromBuffer(pKVar3,pcVar6,pcVar5,(IBaseFileSystem *)0x0,(char *)0x0);
  if (cVar2 != '\0') {
    pKVar3 = (KeyValues *)KeyValues::FindKey(pKVar3,"door_options",false);
    if (pKVar3 != (KeyValues *)0x0) {
      pKVar3 = (KeyValues *)KeyValues::FindKey(pKVar3,"defaults",false);
      if (pKVar3 != (KeyValues *)0x0) {
        pcVar5 = (char *)KeyValues::GetString(pKVar3,"crossbar",(char *)0x0);
        if (pcVar5 != (char *)0x0) {
          CBaseEntity::PrecacheModel(pcVar5);
          KeyValues::deleteThis();
          return;
        }
      }
    }
  }
  KeyValues::deleteThis();
  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)