L L4D2node

CRopeKeyframe::Activate

0x008085f0 · 503 bytes · __thiscall

_ZN13CRopeKeyframe8ActivateEv

Decompiled

undefined (1 param)

/* CRopeKeyframe::Activate() */

void __thiscall CRopeKeyframe::Activate(CRopeKeyframe *this)

{
  CBaseEdict *pCVar1;
  char *pcVar2;
  CBaseEntity *pCVar3;
  int iVar4;
  int iVar5;
  undefined4 uVar6;
  undefined *puVar7;
  uint uVar8;
  
  CBaseEntity::Activate((CBaseEntity *)this);
  if (this[0x478] == (CRopeKeyframe)0x0) {
    return;
  }
  if ((*(int *)(this + 0x464) == -1) &&
     (iVar4 = CBaseEntity::PrecacheModel("cable/cable.vmt"), iVar4 != *(int *)(this + 0x464))) {
    if (this[0x6c] == (CRopeKeyframe)0x0) {
      pCVar1 = *(CBaseEdict **)(this + 0x30);
      if (pCVar1 != (CBaseEdict *)0x0) {
        *(uint *)pCVar1 = *(uint *)pCVar1 | 0x101;
        iVar5 = CBaseEdict::GetChangeAccessor(pCVar1);
        *(undefined2 *)(iVar5 + 2) = 0;
      }
    }
    else {
      this[0x70] = (CRopeKeyframe)((byte)this[0x70] | 1);
    }
    *(int *)(this + 0x464) = iVar4;
  }
  pcVar2 = "";
  if (*(char **)(this + 0x448) != (char *)0x0) {
    pcVar2 = *(char **)(this + 0x448);
  }
  pCVar3 = (CBaseEntity *)
           CGlobalEntityList::FindEntityByName
                     ((CGlobalEntityList *)gEntList,(CBaseEntity *)0x0,pcVar2,(CBaseEntity *)0x0,
                      (CBaseEntity *)0x0,(CBaseEntity *)0x0,(IEntityFindFilter *)0x0);
  if ((pCVar3 == (CBaseEntity *)0x0) || (*(int *)(pCVar3 + 0x30) == 0)) {
    if ((((byte)this[0x474] & 2) == 0) ||
       (uVar8 = *(uint *)(this + 0x444) & 0xfffffff7, *(uint *)(this + 0x444) == uVar8))
    goto LAB_008086b0;
  }
  else {
    SetEndPoint(this,pCVar3,0);
    if ((((byte)this[0x148] & 1) == 0) ||
       (uVar8 = *(uint *)(this + 0x444) | 1, *(uint *)(this + 0x444) == uVar8)) goto LAB_008086b0;
  }
  if (this[0x6c] == (CRopeKeyframe)0x0) {
    pCVar1 = *(CBaseEdict **)(this + 0x30);
    if (pCVar1 != (CBaseEdict *)0x0) {
      *(uint *)pCVar1 = *(uint *)pCVar1 | 0x101;
      iVar4 = CBaseEdict::GetChangeAccessor(pCVar1);
      *(undefined2 *)(iVar4 + 2) = 0;
    }
  }
  else {
    this[0x70] = (CRopeKeyframe)((byte)this[0x70] | 1);
  }
  *(uint *)(this + 0x444) = uVar8;
LAB_008086b0:
  SetStartPoint(this,(CBaseEntity *)this,0);
  uVar6 = 0;
  uVar8 = *(uint *)(this + 0x180);
  if (((uVar8 != 0xffffffff) &&
      (puVar7 = g_pEntityList + (uVar8 & 0xfff) * 0x10, puVar7 != (undefined *)0xfffffffc)) &&
     (*(uint *)(puVar7 + 8) == uVar8 >> 0xc)) {
    uVar6 = *(undefined4 *)(puVar7 + 4);
  }
  (**(code **)(*(int *)this + 0x98))(this,uVar6,this[0x185]);
  EndpointsChanged(this);
                    /* WARNING: Could not recover jumptable at 0x00808733. Too many branches */
                    /* WARNING: Treating indirect jump as call */
  (**(code **)(*(int *)this + 0x328))();
  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)