L L4D2node

CPropHealthCabinet::Spawn

0x004eebf0 · 233 bytes · __thiscall

_ZN18CPropHealthCabinet5SpawnEv

Decompiled

undefined (1 param)

/* CPropHealthCabinet::Spawn() */

void __thiscall CPropHealthCabinet::Spawn(CPropHealthCabinet *this)

{
  CCollisionProperty *this_00;
  CBaseEdict *this_01;
  int iVar1;
  
  this_00 = (CCollisionProperty *)(this + 0x194);
  CDynamicProp::Spawn((CDynamicProp *)this);
  CBaseEntity::SetMoveType((CBaseEntity *)this,0,0);
  CCollisionProperty::SetSolid(this_00,6);
  CCollisionProperty::SetSolidFlags(this_00,(uint)(*(ushort *)(this + 0x1b4) | 8));
  CBaseEntity::AddEffects((CBaseEntity *)this,0x10);
  CCollisionProperty::UseTriggerBounds(this_00,true,24.0);
  CBaseEntity::SetGlobalFadeScale((CBaseEntity *)this,0.0);
  if (this[0x15d5] != (CPropHealthCabinet)0x0) {
    if (this[0x6c] == (CPropHealthCabinet)0x0) {
      this_01 = *(CBaseEdict **)(this + 0x30);
      if (this_01 != (CBaseEdict *)0x0) {
        *(uint *)this_01 = *(uint *)this_01 | 0x101;
        iVar1 = CBaseEdict::GetChangeAccessor(this_01);
        *(undefined2 *)(iVar1 + 2) = 0;
      }
      this[0x15d5] = (CPropHealthCabinet)0x0;
    }
    else {
      this[0x70] = (CPropHealthCabinet)((byte)this[0x70] | 1);
      this[0x15d5] = (CPropHealthCabinet)0x0;
    }
  }
  CBaseEntity::SetCollisionGroup((CBaseEntity *)this,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)