L L4D2node

CBasePropDoor::Spawn

0x007f3750 · 440 bytes · __thiscall

_ZN13CBasePropDoor5SpawnEv

Decompiled

undefined (1 param)

/* CBasePropDoor::Spawn() */

void __thiscall CBasePropDoor::Spawn(CBasePropDoor *this)

{
  CCollisionProperty *this_00;
  CBaseEdict *pCVar1;
  int iVar2;
  
  CDynamicProp::Spawn((CDynamicProp *)this);
  CBaseEntity::SetGlobalFadeScale((CBaseEntity *)this,0.0);
  *(undefined4 *)(this + 0x1528) = 0;
  (**(code **)(*(int *)this + 0x6c))(this);
  (**(code **)(*(int *)this + 0x4bc))(this);
  if ((((byte)this[0x149] & 8) != 0) && (this[0x1624] != (CBasePropDoor)0x1)) {
    if (this[0x6c] == (CBasePropDoor)0x0) {
      pCVar1 = *(CBaseEdict **)(this + 0x30);
      if (pCVar1 != (CBaseEdict *)0x0) {
        *(uint *)pCVar1 = *(uint *)pCVar1 | 0x101;
        iVar2 = CBaseEdict::GetChangeAccessor(pCVar1);
        *(undefined2 *)(iVar2 + 2) = 0;
      }
    }
    else {
      this[0x70] = (CBasePropDoor)((byte)this[0x70] | 1);
    }
    this[0x1624] = (CBasePropDoor)0x1;
  }
  CBaseEntity::SetMoveType((CBaseEntity *)this,7,0);
  if (*(float *)(this + 0x11c) == 0.0) {
    *(undefined4 *)(this + 0x11c) = 0x42c80000;
  }
  this_00 = (CCollisionProperty *)(this + 0x194);
  CBaseEntity::RemoveFlag((CBaseEntity *)this,0x40000);
  CCollisionProperty::SetSolid(this_00,6);
  CCollisionProperty::SetSolidFlags(this_00,(uint)(*(ushort *)(this + 0x1b4) | 0x1000));
  CBaseEntity::VPhysicsInitShadow((CBaseEntity *)this,false,false,(solid_t *)0x0);
  CCollisionProperty::SetSolidFlags(this_00,(uint)(*(ushort *)(this + 0x1b4) | 3));
  if (this[0x14ac] == (CBasePropDoor)0x0) {
    CBaseProp::CalculateBlockLOS((CBaseProp *)this);
  }
  SetDoorBlocker(this,(CBaseEntity *)0x0);
  (**(code **)(*(int *)this + 0x4a0))(this);
  if (this[0x162e] == (CBasePropDoor)0x0) {
    this[0x162f] = (CBasePropDoor)0x0;
    return;
  }
  if (this[0x6c] == (CBasePropDoor)0x0) {
    pCVar1 = *(CBaseEdict **)(this + 0x30);
    if (pCVar1 != (CBaseEdict *)0x0) {
      *(uint *)pCVar1 = *(uint *)pCVar1 | 0x101;
      iVar2 = CBaseEdict::GetChangeAccessor(pCVar1);
      *(undefined2 *)(iVar2 + 2) = 0;
    }
    this[0x162e] = (CBasePropDoor)0x0;
  }
  else {
    this[0x70] = (CBasePropDoor)((byte)this[0x70] | 1);
    this[0x162e] = (CBasePropDoor)0x0;
  }
  this[0x162f] = (CBasePropDoor)0x0;
  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)