L L4D2node

CPhysicsPropRespawnable::Event_Killed

0x007ee8d0 · 471 bytes · __thiscall

_ZN23CPhysicsPropRespawnable12Event_KilledERK15CTakeDamageInfo

Decompiled

undefined (2 params)

/* CPhysicsPropRespawnable::Event_Killed(CTakeDamageInfo const&) */

void __thiscall
CPhysicsPropRespawnable::Event_Killed(CPhysicsPropRespawnable *this,CTakeDamageInfo *param_1)

{
  int *piVar1;
  uint uVar2;
  char cVar3;
  CBaseEntity *pCVar4;
  undefined *puVar5;
  undefined1 local_24 [20];
  
  piVar1 = *(int **)(this + 0x238);
  if (piVar1 != (int *)0x0) {
    cVar3 = (**(code **)(*piVar1 + 0x2c))(piVar1);
    if (cVar3 == '\0') {
      (**(code **)(*piVar1 + 0x40))(piVar1,1);
      (**(code **)(*(int *)this + 0x2a0))(this,param_1);
    }
  }
  uVar2 = *(uint *)(param_1 + 0x30);
  pCVar4 = (CBaseEntity *)0x0;
  if (((uVar2 != 0xffffffff) &&
      (puVar5 = g_pEntityList + (uVar2 & 0xfff) * 0x10, puVar5 != (undefined *)0xfffffffc)) &&
     (*(uint *)(puVar5 + 8) == uVar2 >> 0xc)) {
    pCVar4 = *(CBaseEntity **)(puVar5 + 4);
  }
  CBreakableProp::Break((CBreakableProp *)this,pCVar4,param_1);
  PhysCleanupFrictionSounds((CBaseEntity *)this);
  (**(code **)(*(int *)this + 0x298))(this);
  CBaseEntity::PhysicsRemoveTouchedList((CBaseEntity *)this);
  CBaseEntity::PhysicsRemoveGroundList((CBaseEntity *)this,pCVar4);
  CBaseEntity::DestroyAllDataObjects((CBaseEntity *)this);
  CBaseEntity::AddEffects((CBaseEntity *)this,0x20);
  if ((*(uint *)(this + 0x150) & 0x18000000) != 0) {
    uVar2 = *(uint *)(this + 0x224);
    pCVar4 = (CBaseEntity *)0x0;
    if (((uVar2 != 0xffffffff) &&
        (puVar5 = g_pEntityList + (uVar2 & 0xfff) * 0x10, puVar5 != (undefined *)0xfffffffc)) &&
       (*(uint *)(puVar5 + 8) == uVar2 >> 0xc)) {
      pCVar4 = *(CBaseEntity **)(puVar5 + 4);
    }
    UTIL_Remove(pCVar4);
  }
  (**(code **)(*(int *)this + 0x1dc))(this,this + 0x1688,this + 0x1694,0);
  CBaseEntity::ThinkSet((_func_void *)local_24,(float)this,(char *)0x0);
  CBaseEntity::ThinkSet((_func_void *)local_24,(float)this,(char *)Materialize);
  CBaseEntity::SetNextThink
            ((CBaseEntity *)this,*(float *)(this + 0x16b8) + *(float *)(gpGlobals + 0xc),(char *)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)