L L4D2node

DataMapInit<CClientPath>

0x008cf240 · 351 bytes · __cdecl

_Z11DataMapInitI11CClientPathEP9datamap_tPT_

Decompiled

datamap_t * (1 param)

/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* datamap_t* DataMapInit<CClientPath>(CClientPath*) */

datamap_t * DataMapInit<CClientPath>(CClientPath *param_1)

{
  char *pcVar1;
  int iVar2;
  size_t sVar3;
  char *local_10 [2];
  
  if (DataMapInit<CClientPath>(CClientPath*)::nameHolder == '\0') {
    iVar2 = __cxa_guard_acquire(&DataMapInit<CClientPath>(CClientPath*)::nameHolder);
    if (iVar2 != 0) {
      DataMapInit<CClientPath>(CClientPath*)::nameHolder = "CClientPath";
      _DAT_01003b58 = 0;
      _DAT_01003b5c = 0;
      _DAT_01003b60 = 0;
      DAT_01003b64 = 0;
      _DAT_01003b68 = 0;
      _DAT_01003b54 = 0xb;
      __cxa_guard_release(&DataMapInit<CClientPath>(CClientPath*)::nameHolder);
      __cxa_atexit(CDatadescGeneratedNameHolder::~CDatadescGeneratedNameHolder,
                   &DataMapInit<CClientPath>(CClientPath*)::nameHolder,&__dso_handle);
    }
  }
  CClientPath::m_DataMap._12_4_ = CBaseEntity::m_DataMap;
  if (DataMapInit<CClientPath>(CClientPath*)::dataDesc == '\0') {
    iVar2 = __cxa_guard_acquire(&DataMapInit<CClientPath>(CClientPath*)::dataDesc);
    if (iVar2 != 0) {
                    /* try { // try from 008cf2ab to 008cf308 has its CatchHandler @ 008cf3af */
      local_10[0] = operator_new__(_DAT_01003b54 + 0x10);
      strcpy(local_10[0],DataMapInit<CClientPath>(CClientPath*)::nameHolder);
      pcVar1 = local_10[0];
      sVar3 = strlen(local_10[0]);
      builtin_strncpy(pcVar1 + sVar3,"VisibilityThink",0x10);
      CUtlVector<char*,CUtlMemory<char*,int>>::InsertBefore
                ((CUtlVector<char*,CUtlMemory<char*,int>> *)&DAT_01003b58,DAT_01003b64,local_10);
      DataMapInit<CClientPath>(CClientPath*)::dataDesc._68_4_ = local_10[0];
      __cxa_guard_release(&DataMapInit<CClientPath>(CClientPath*)::dataDesc);
    }
  }
  CClientPath::m_DataMap._4_4_ = 2;
  CClientPath::m_DataMap._0_4_ = 0xf5e660;
  return (datamap_t *)CClientPath::m_DataMap;
}

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)