L L4D2node

CRopeKeyframe::Precache

0x00806650 · 108 bytes · __thiscall

_ZN13CRopeKeyframe8PrecacheEv

Decompiled

undefined (1 param)

/* CRopeKeyframe::Precache() */

void __thiscall CRopeKeyframe::Precache(CRopeKeyframe *this)

{
  CBaseEdict *this_00;
  char *pcVar1;
  int iVar2;
  int iVar3;
  
  pcVar1 = "";
  if (*(char **)(this + 0x460) != (char *)0x0) {
    pcVar1 = *(char **)(this + 0x460);
  }
  iVar2 = CBaseEntity::PrecacheModel(pcVar1);
  if (iVar2 != *(int *)(this + 0x464)) {
    if (this[0x6c] == (CRopeKeyframe)0x0) {
      this_00 = *(CBaseEdict **)(this + 0x30);
      if (this_00 != (CBaseEdict *)0x0) {
        *(uint *)this_00 = *(uint *)this_00 | 0x101;
        iVar3 = CBaseEdict::GetChangeAccessor(this_00);
        *(undefined2 *)(iVar3 + 2) = 0;
      }
    }
    else {
      this[0x70] = (CRopeKeyframe)((byte)this[0x70] | 1);
    }
    *(int *)(this + 0x464) = iVar2;
  }
  PrecacheMaterial("cable/rope_shadowdepth");
  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)