L L4D2node

CBasePropDoor::Lock

0x007f3940 · 277 bytes · __thiscall

_ZN13CBasePropDoor4LockEb

Decompiled

undefined (2 params)

/* CBasePropDoor::Lock(bool) */

void __thiscall CBasePropDoor::Lock(CBasePropDoor *this,bool param_1)

{
  CBaseEdict *this_00;
  uint uVar1;
  int iVar2;
  char *pcVar3;
  undefined *puVar4;
  int iVar5;
  
  if (this[0x1624] != (CBasePropDoor)0x1) {
    if (this[0x6c] == (CBasePropDoor)0x0) {
      this_00 = *(CBaseEdict **)(this + 0x30);
      if (this_00 != (CBaseEdict *)0x0) {
        *(uint *)this_00 = *(uint *)this_00 | 0x101;
        iVar2 = CBaseEdict::GetChangeAccessor(this_00);
        *(undefined2 *)(iVar2 + 2) = 0;
      }
    }
    else {
      this[0x70] = (CBasePropDoor)((byte)this[0x70] | 1);
    }
    this[0x1624] = (CBasePropDoor)0x1;
  }
  if (param_1) {
    pcVar3 = "";
    if (*(char **)(this + 0x1654) != (char *)0x0) {
      pcVar3 = *(char **)(this + 0x1654);
    }
    CBaseEntity::EmitSound((CBaseEntity *)this,pcVar3,0.0,(float *)0x0);
    iVar2 = *(int *)(this + 0x15e8);
    if (0 < iVar2) {
      iVar5 = 0;
      do {
        while ((((uVar1 = *(uint *)(*(int *)(this + 0x15dc) + iVar5 * 4), uVar1 == 0xffffffff ||
                 (puVar4 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar4 == (undefined *)0xfffffffc
                 )) || (*(uint *)(puVar4 + 8) != uVar1 >> 0xc)) ||
               (*(CBaseEntity **)(puVar4 + 4) == (CBaseEntity *)0x0))) {
          iVar5 = iVar5 + 1;
          if (iVar5 == iVar2) {
            return;
          }
        }
        pcVar3 = *(char **)(this + 0x1654);
        if (pcVar3 == (char *)0x0) {
          pcVar3 = "";
        }
        iVar5 = iVar5 + 1;
        CBaseEntity::EmitSound(*(CBaseEntity **)(puVar4 + 4),pcVar3,0.0,(float *)0x0);
      } while (iVar5 != iVar2);
    }
  }
  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)