L L4D2node

CPropDoorRotatingBreakable::Event_Killed

0x007f8890 · 1296 bytes · __thiscall

_ZN26CPropDoorRotatingBreakable12Event_KilledERK15CTakeDamageInfo

Decompiled

undefined (2 params)

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

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

{
  CPropDoorRotatingBreakable CVar1;
  CPropDoorRotatingBreakable CVar2;
  CPropDoorRotatingBreakable CVar3;
  uint uVar4;
  undefined4 uVar5;
  int iVar6;
  code *pcVar7;
  undefined4 uVar8;
  int iVar9;
  Vector *pVVar10;
  undefined4 uVar11;
  undefined1 *puVar12;
  undefined1 *puVar13;
  int *piVar14;
  char *pcVar15;
  undefined *puVar16;
  int in_GS_OFFSET;
  longdouble lVar17;
  float fVar18;
  float fVar19;
  float fVar20;
  AI_CriteriaSet *local_ec;
  CPropDoorRotatingBreakable *local_e8;
  undefined1 *local_d0 [4];
  float local_c0;
  float local_bc;
  float local_b8;
  float local_b4;
  float local_b0;
  float local_ac;
  float local_a8;
  float local_a4;
  float local_a0;
  undefined **local_9c [8];
  undefined **local_7c;
  undefined1 local_78;
  char local_77 [83];
  undefined4 local_24;
  int local_20;
  
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  if ((*(int *)(this + 0x17e4) != 0) &&
     (iVar9 = *(int *)(this + 0x17e4) + -1, *(int *)(this + 0x17d4) < iVar9)) {
    if (((byte)this[0x14d] & 8) != 0) {
      CBaseEntity::CalcAbsolutePosition((CBaseEntity *)this);
    }
    PhysBreakSound(this,*(undefined4 *)(this + 0x238),*(undefined4 *)(this + 0x2e0),
                   *(undefined4 *)(this + 0x2e4),*(undefined4 *)(this + 0x2e8));
    pVVar10 = (Vector *)(**(code **)(*(int *)this + 0x288))(this);
    CRecipientFilter::CRecipientFilter((CRecipientFilter *)local_9c);
    local_9c[0] = &PTR__CPASFilter_00bfaf28;
                    /* try { // try from 007f8a45 to 007f8a49 has its CatchHandler @ 007f8de4 */
    CRecipientFilter::AddRecipientsByPAS((CRecipientFilter *)local_9c,pVVar10);
    while (local_ec = (AI_CriteriaSet *)local_9c, *(int *)(this + 0x17d4) < iVar9) {
      local_c0 = *(float *)param_1;
      local_bc = *(float *)(param_1 + 4);
      local_b8 = *(float *)(param_1 + 8);
      lVar17 = (longdouble)VectorNormalize((Vector *)&local_c0);
      local_ac = (float)lVar17;
      if (300.0 <= local_ac) {
        local_ac = 300.0;
      }
      fVar18 = local_c0 * 10.0;
      fVar19 = local_bc * 10.0;
      local_b4 = local_c0 * local_ac;
      local_b0 = local_bc * local_ac;
      fVar20 = local_b8 * 10.0;
      local_ac = local_ac * local_b8;
      pcVar7 = *(code **)(*(int *)te + 0xa0);
      CVar1 = this[0x126];
      CVar2 = this[0x125];
      CVar3 = this[0x124];
      uVar8 = *(undefined4 *)(this + 0xd4);
      local_c0 = fVar18;
      local_bc = fVar19;
      local_b8 = fVar20;
      if ((((byte)this[0x14d] & 8) != 0) &&
         (CBaseEntity::CalcAbsolutePosition((CBaseEntity *)this), ((byte)this[0x14d] & 8) != 0)) {
        CBaseEntity::CalcAbsolutePosition((CBaseEntity *)this);
      }
      local_e8 = this + 0x37c;
      local_ec = (AI_CriteriaSet *)local_9c;
      local_a8 = local_c0 + *(float *)(this + 0x2e0);
      local_a4 = local_bc + *(float *)(this + 0x2e4);
      local_a0 = local_b8 + *(float *)(this + 0x2e8);
      uVar5 = *(undefined4 *)(this + 0x458);
                    /* try { // try from 007f8a97 to 007f8cf2 has its CatchHandler @ 007f8da5 */
      uVar11 = (**(code **)(*(int *)this + 0x1c))(this);
      (*pcVar7)(te,local_ec,0xbf800000,uVar11,uVar5,&local_a8,local_e8,&local_b4,1,uVar8,CVar3,CVar2
                ,CVar1);
      iVar6 = *(int *)(this + 0x17d4);
      local_7c = &PTR_InitQuietTruncation_00cc5b10;
      local_78 = 1;
      local_77[0] = '\0';
      local_24 = 0;
      *(int *)(this + 0x17d4) = iVar6 + 1;
      puVar13 = *(undefined1 **)(*(int *)(this + 0x17d8) + (iVar6 + 1) * 4);
      puVar12 = &DAT_00d539c2;
      if (puVar13 != (undefined1 *)0x0) {
        puVar12 = puVar13;
      }
      CFmtStrN<80>::sprintf((CFmtStrN<80> *)&local_7c,"models/%s.mdl",puVar12);
      V_FixSlashes(local_77,'/');
      pcVar7 = *(code **)(*(int *)this + 0x70);
      AllocPooledString((char *)local_d0);
      puVar13 = &DAT_00d539c2;
      if (local_d0[0] != (undefined1 *)0x0) {
        puVar13 = local_d0[0];
      }
      (*pcVar7)(this,puVar13);
    }
    local_9c[0] = &PTR__CPASFilter_00bfaf28;
    CRecipientFilter::~CRecipientFilter((CRecipientFilter *)local_ec);
  }
  local_ec = (AI_CriteriaSet *)local_9c;
  if (*(int *)(this + 0x15f4) == 0) {
    CBasePropDoor::UpdateAreaPortals((CBasePropDoor *)this,true);
  }
  AI_CriteriaSet::AI_CriteriaSet(local_ec);
  uVar4 = *(uint *)(param_1 + 0x34);
                    /* try { // try from 007f8d56 to 007f8d8f has its CatchHandler @ 007f8dcc */
  if ((((uVar4 != 0xffffffff) &&
       (puVar16 = g_pEntityList + (uVar4 & 0xfff) * 0x10, puVar16 != (undefined *)0xfffffffc)) &&
      (*(uint *)(puVar16 + 8) == uVar4 >> 0xc)) &&
     ((*(CBaseEntity **)(puVar16 + 4) != (CBaseEntity *)0x0 &&
      (piVar14 = (int *)CBaseEntity::GetTeam(*(CBaseEntity **)(puVar16 + 4)), piVar14 != (int *)0x0)
      ))) {
    pcVar15 = (char *)(**(code **)(*piVar14 + 0x32c))(piVar14);
    AI_CriteriaSet::AppendCriteria(local_ec,"brokenby",pcVar15,1.0);
  }
  local_a8 = 0.0;
  local_a4 = -NAN;
                    /* try { // try from 007f8947 to 007f897c has its CatchHandler @ 007f8dcc */
  CAI_Concept::CAI_Concept((CAI_Concept *)&local_b4,"DoorBroken");
  CResponseQueue::Add((CResponseQueue *)g_ResponseQueueManager._12_4_,(CAI_Concept *)&local_b4,
                      local_ec,0.0,(CFollowupTargetSpec_t *)&local_a8,(CBaseEntity *)this);
  AI_CriteriaSet::~AI_CriteriaSet(local_ec);
  COutputEvent::FireOutput
            ((COutputEvent *)(this + 0x13fc),(CBaseEntity *)this,(CBaseEntity *)this,0.0);
  CBreakableProp::Event_Killed((CBreakableProp *)this,param_1);
  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {
                    /* WARNING: Subroutine does not return */
    __stack_chk_fail();
  }
  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)