L L4D2node

CBaseDoor::Activate

0x00668410 · 379 bytes · __thiscall

_ZN9CBaseDoor8ActivateEv

Decompiled

undefined (1 param)

/* CBaseDoor::Activate() */

void __thiscall CBaseDoor::Activate(CBaseDoor *this)

{
  CBaseDoor *pCVar1;
  char cVar2;
  int iVar3;
  int iVar4;
  CBaseDoor *local_11c [67];
  
  CBaseEntity::Activate((CBaseEntity *)this);
  this[0x4fb] = (CBaseDoor)0x1;
  iVar3 = GetDoorMovementGroup(this,local_11c,0x40);
  if (0 < iVar3) {
    iVar4 = 0;
    do {
      while (((pCVar1 = local_11c[iVar4], *(float *)(this + 0x4c4) != *(float *)(pCVar1 + 0x4c4) ||
              (*(float *)(this + 0x4c8) != *(float *)(pCVar1 + 0x4c8))) ||
             (*(float *)(this + 0x4cc) != *(float *)(pCVar1 + 0x4cc)))) {
LAB_006684a7:
        iVar4 = iVar4 + 1;
        if (iVar4 == iVar3) goto LAB_00668550;
      }
      cVar2 = (**(code **)(*(int *)pCVar1 + 0x330))(pCVar1);
      if (cVar2 != '\0') {
        pCVar1 = local_11c[iVar4];
        if (((*(float *)(this + 0x3a8) != *(float *)(pCVar1 + 0x3a8)) ||
            (*(float *)(this + 0x3ac) != *(float *)(pCVar1 + 0x3ac))) ||
           (*(float *)(this + 0x3b0) != *(float *)(pCVar1 + 0x3b0))) goto LAB_006684a0;
        goto LAB_006684a7;
      }
      pCVar1 = local_11c[iVar4];
      if (((*(float *)(this + 0x39c) != *(float *)(pCVar1 + 0x39c)) ||
          (*(float *)(this + 0x3a0) != *(float *)(pCVar1 + 0x3a0))) ||
         (*(float *)(this + 0x3a4) != *(float *)(pCVar1 + 0x3a4))) {
LAB_006684a0:
        this[0x4fb] = (CBaseDoor)0x0;
        goto LAB_006684a7;
      }
      iVar4 = iVar4 + 1;
    } while (iVar4 != iVar3);
  }
LAB_00668550:
  if (*(int *)(this + 0x440) == 0) {
    UpdateAreaPortals(this,true);
    return;
  }
  if (*(int *)(this + 0x440) == 1) {
    UpdateAreaPortals(this,false);
  }
  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)