L L4D2node

CBaseProp::ParsePropData

0x007e9cd0 · 389 bytes · __thiscall

_ZN9CBaseProp13ParsePropDataEv

Decompiled

undefined (1 param)

/* CBaseProp::ParsePropData() */

undefined4 __thiscall CBaseProp::ParsePropData(CBaseProp *this)

{
  code *pcVar1;
  char cVar2;
  KeyValues *this_00;
  undefined4 uVar3;
  char *pcVar4;
  char *pcVar5;
  int iVar6;
  KeyValues *pKVar7;
  IBreakableWithPropData *pIVar8;
  int *piVar9;
  uint in_stack_ffffffc8;
  
  this_00 = KeyValues::operator_new((KeyValues *)0x2c,in_stack_ffffffc8);
                    /* try { // try from 007e9d05 to 007e9d09 has its CatchHandler @ 007e9e7d */
  KeyValues::KeyValues(this_00,"",(IKeyValuesSystem *)0x0,false);
  pcVar1 = *(code **)(*modelinfo + 0x54);
  uVar3 = CBaseEntity::GetModel((CBaseEntity *)this);
  pcVar4 = (char *)(*pcVar1)(modelinfo,uVar3);
  pcVar1 = *(code **)(*modelinfo + 0x10);
  uVar3 = CBaseEntity::GetModel((CBaseEntity *)this);
  pcVar5 = (char *)(*pcVar1)(modelinfo,uVar3);
  cVar2 = KeyValues::LoadFromBuffer(this_00,pcVar5,pcVar4,(IBaseFileSystem *)0x0,(char *)0x0);
  if (cVar2 != '\0') {
    if (ParsePropData()::keyPropData == '\0') {
      iVar6 = __cxa_guard_acquire(&ParsePropData()::keyPropData);
      if (iVar6 != 0) {
                    /* try { // try from 007e9e28 to 007e9e44 has its CatchHandler @ 007e9e67 */
        piVar9 = (int *)KeyValuesSystem();
        ParsePropData()::keyPropData = (**(code **)(*piVar9 + 0x14))(piVar9,"prop_data",1);
        __cxa_guard_release(&ParsePropData()::keyPropData);
      }
    }
    pKVar7 = (KeyValues *)KeyValues::FindKey(this_00,ParsePropData()::keyPropData);
    if (pKVar7 != (KeyValues *)0x0) {
      if (this == (CBaseProp *)0x0) {
        pIVar8 = (IBreakableWithPropData *)0x0;
      }
      else {
        pIVar8 = (IBreakableWithPropData *)
                 __dynamic_cast(this,&typeinfo,&IBreakableWithPropData::typeinfo,0xfffffffe);
      }
      uVar3 = CPropData::ParsePropFromKV
                        ((CPropData *)g_PropDataSystem,(CBaseEntity *)this,pIVar8,pKVar7,this_00);
      KeyValues::deleteThis();
      return uVar3;
    }
  }
  KeyValues::deleteThis();
  return 2;
}

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)