L L4D2node

CBasePropDoor::DoorCloseMoveDone

0x007f35a0 · 402 bytes · __thiscall

_ZN13CBasePropDoor17DoorCloseMoveDoneEv

Decompiled

undefined (1 param)

/* CBasePropDoor::DoorCloseMoveDone() */

void __thiscall CBasePropDoor::DoorCloseMoveDone(CBasePropDoor *this)

{
  uint uVar1;
  CBaseEdict *this_00;
  char *pcVar2;
  int iVar3;
  CBaseEntity *pCVar4;
  undefined *puVar5;
  float fVar6;
  CBasePropDoor *pCVar7;
  code *pcVar8;
  undefined4 uVar9;
  undefined1 local_14 [8];
  
  SetDoorBlocker(this,(CBaseEntity *)0x0);
  if (((byte)this[0x149] & 0x10) == 0) {
    pcVar2 = *(char **)(this + 0x1648);
    if (pcVar2 == (char *)0x0) {
      pcVar2 = "";
    }
    CBaseEntity::StopSound((CBaseEntity *)this,pcVar2);
    pcVar2 = "";
    if (*(char **)(this + 0x1650) != (char *)0x0) {
      pcVar2 = *(char **)(this + 0x1650);
    }
    CBaseEntity::EmitSound((CBaseEntity *)this,pcVar2,0.0,(float *)0x0);
  }
  if (*(int *)(this + 0x15f4) != 0) {
    if (this[0x6c] == (CBasePropDoor)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] = (CBasePropDoor)((byte)this[0x70] | 1);
    }
    *(undefined4 *)(this + 0x15f4) = 0;
  }
  uVar1 = *(uint *)(this + 0x1620);
  pCVar4 = (CBaseEntity *)0x0;
  if (((uVar1 != 0xffffffff) &&
      (puVar5 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar5 != (undefined *)0xfffffffc)) &&
     (*(uint *)(puVar5 + 8) == uVar1 >> 0xc)) {
    pCVar4 = *(CBaseEntity **)(puVar5 + 4);
  }
  COutputEvent::FireOutput((COutputEvent *)(this + 0x16cc),pCVar4,(CBaseEntity *)this,0.0);
  fVar6 = *(float *)(gpGlobals + 0xc) + 0.5;
  pcVar2 = "AreaPortal";
  pcVar8 = DisableAreaPortalThink;
  uVar9 = 0;
  pCVar7 = this;
  CBaseEntity::ThinkSet((_func_void *)local_14,(float)this,(char *)DisableAreaPortalThink);
  (**(code **)(*(int *)this + 0x4a4))(this,pCVar7,pcVar8,uVar9,fVar6,pcVar2);
  if (0 < *(int *)(this + 0x1660)) {
    CCollisionProperty::SetSolidFlags
              ((CCollisionProperty *)(this + 0x194),*(ushort *)(this + 0x1b4) & 0xfffffffb);
    *(undefined4 *)(this + 0x1660) = 0;
  }
  *(undefined4 *)(this + 0x1620) = 0xffffffff;
  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)