L L4D2node

CBaseDoor::ChainUse

0x00667740 · 329 bytes · __thiscall

_ZN9CBaseDoor8ChainUseEv

Decompiled

undefined (1 param)

/* CBaseDoor::ChainUse() */

void __thiscall CBaseDoor::ChainUse(CBaseDoor *this)

{
  uint uVar1;
  char *pcVar2;
  int *piVar3;
  undefined *puVar4;
  CBaseEntity *pCVar5;
  undefined4 local_20;
  
  if (this[0x5f9] == (CBaseDoor)0x0) {
    pCVar5 = (CBaseEntity *)0x0;
    while( true ) {
      pcVar2 = *(char **)(this + 0x518);
      if (pcVar2 == (char *)0x0) {
        pcVar2 = "";
      }
      pCVar5 = (CBaseEntity *)
               CGlobalEntityList::FindEntityByName
                         ((CGlobalEntityList *)gEntList,pCVar5,pcVar2,(CBaseEntity *)0x0,
                          (CBaseEntity *)0x0,(CBaseEntity *)0x0,(IEntityFindFilter *)0x0);
      if (pCVar5 == (CBaseEntity *)0x0) break;
      if (this != (CBaseDoor *)pCVar5) {
        piVar3 = (int *)__dynamic_cast(pCVar5,&CBaseEntity::typeinfo,&typeinfo,0);
        if (piVar3 != (int *)0x0) {
          if ((piVar3[0x110] == *(int *)(this + 0x440)) &&
             (*(CBaseDoor *)(piVar3 + 0x13f) == this[0x4fc])) {
            *(undefined1 *)((int)piVar3 + 0x5f9) = 1;
            local_20 = 0;
            uVar1 = *(uint *)(this + 0x494);
            if ((uVar1 != 0xffffffff) &&
               ((puVar4 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar4 != (undefined *)0xfffffffc
                && (*(uint *)(puVar4 + 8) == uVar1 >> 0xc)))) {
              local_20 = *(undefined4 *)(puVar4 + 4);
            }
            (**(code **)(*piVar3 + 0x1ac))(piVar3,local_20,0,3,0);
            *(undefined1 *)((int)piVar3 + 0x5f9) = 0;
          }
        }
      }
    }
  }
  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)