L L4D2node

CBasePropDoor::Activate

0x007f8e40 · 400 bytes · __thiscall

_ZN13CBasePropDoor8ActivateEv

Decompiled

undefined (1 param)

/* CBasePropDoor::Activate() */

void __thiscall CBasePropDoor::Activate(CBasePropDoor *this)

{
  char *pcVar1;
  uint uVar2;
  CBaseEdict *this_00;
  int *piVar3;
  undefined4 *puVar4;
  undefined *puVar5;
  int iVar6;
  int *piVar7;
  CBaseEntity *pCVar8;
  char *local_30;
  undefined4 local_20 [4];
  
  CBaseProp::Activate((CBaseProp *)this);
  UpdateAreaPortals(this,*(int *)(this + 0x15f4) != 0);
  local_30 = *(char **)(this + 0x154);
  if (local_30 != (char *)0x0) {
    pcVar1 = *(char **)(this + 0x1664);
    if ((pcVar1 != (char *)0x0) && (*pcVar1 != '\0')) {
      local_30 = pcVar1;
    }
    pCVar8 = (CBaseEntity *)0x0;
    while (pCVar8 = (CBaseEntity *)
                    CGlobalEntityList::FindEntityByName
                              ((CGlobalEntityList *)gEntList,pCVar8,local_30,(CBaseEntity *)0x0,
                               (CBaseEntity *)0x0,(CBaseEntity *)0x0,(IEntityFindFilter *)0x0),
          pCVar8 != (CBaseEntity *)0x0) {
      if (((this != (CBasePropDoor *)pCVar8) &&
          (piVar3 = (int *)__dynamic_cast(pCVar8,&CBaseEntity::typeinfo,&typeinfo,0),
          piVar3 != (int *)0x0)) && (piVar3[0x57a] < 1)) {
        local_20[0] = 0xffffffff;
        puVar4 = (undefined4 *)(**(code **)(*piVar3 + 0xc))(piVar3);
        local_20[0] = *puVar4;
        CUtlVector<CHandle<CBasePropDoor>,CUtlMemory<CHandle<CBasePropDoor>,int>>::InsertBefore
                  ((CUtlVector<CHandle<CBasePropDoor>,CUtlMemory<CHandle<CBasePropDoor>,int>> *)
                   (this + 0x15dc),*(int *)(this + 0x15e8),(CHandle *)local_20);
        uVar2 = piVar3[0x59a];
        if (((uVar2 == 0xffffffff) ||
            (puVar5 = g_pEntityList + (uVar2 & 0xfff) * 0x10, puVar5 == (undefined *)0xfffffffc)) ||
           ((*(uint *)(puVar5 + 8) != uVar2 >> 0xc || (this != *(CBasePropDoor **)(puVar5 + 4))))) {
          if ((char)piVar3[0x1b] == '\0') {
            this_00 = (CBaseEdict *)piVar3[0xc];
            if (this_00 != (CBaseEdict *)0x0) {
              *(uint *)this_00 = *(uint *)this_00 | 0x101;
              iVar6 = CBaseEdict::GetChangeAccessor(this_00);
              *(undefined2 *)(iVar6 + 2) = 0;
            }
          }
          else {
            *(byte *)(piVar3 + 0x1c) = *(byte *)(piVar3 + 0x1c) | 1;
          }
          piVar7 = (int *)(**(code **)(*(int *)this + 0xc))(this);
          piVar3[0x59a] = *piVar7;
        }
        (**(code **)(*piVar3 + 0x50))(piVar3,this);
      }
    }
  }
  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)