L L4D2node

CRopeKeyframe::Break

0x00809570 · 353 bytes · __thiscall

_ZN13CRopeKeyframe5BreakEv

Decompiled

undefined (1 param)

/* CRopeKeyframe::Break() */

undefined4 __thiscall CRopeKeyframe::Break(CRopeKeyframe *this)

{
  CBaseEdict *pCVar1;
  int iVar2;
  CBaseEntity *pCVar3;
  char *pcVar4;
  char *pcVar5;
  uint uVar6;
  CBaseEntity *pCVar7;
  
  uVar6 = *(uint *)(this + 0x474) & 0xfffffffe;
  if (*(uint *)(this + 0x474) != uVar6) {
    if (this[0x6c] == (CRopeKeyframe)0x0) {
      pCVar1 = *(CBaseEdict **)(this + 0x30);
      if (pCVar1 != (CBaseEdict *)0x0) {
        *(uint *)pCVar1 = *(uint *)pCVar1 | 0x101;
        iVar2 = CBaseEdict::GetChangeAccessor(pCVar1);
        *(undefined2 *)(iVar2 + 2) = 0;
      }
    }
    else {
      this[0x70] = (CRopeKeyframe)((byte)this[0x70] | 1);
    }
    *(uint *)(this + 0x474) = uVar6;
  }
  pCVar7 = (CBaseEntity *)0x0;
  do {
    pCVar7 = (CBaseEntity *)CGlobalEntityList::NextEnt((CGlobalEntityList *)gEntList,pCVar7);
    if (pCVar7 == (CBaseEntity *)0x0) {
      return 1;
    }
    pCVar3 = (CBaseEntity *)__dynamic_cast(pCVar7,&CBaseEntity::typeinfo,&typeinfo,0);
  } while (pCVar3 == (CBaseEntity *)0x0);
  do {
    pcVar5 = "";
    if (*(char **)(this + 0x154) != (char *)0x0) {
      pcVar5 = *(char **)(this + 0x154);
    }
    pcVar4 = *(char **)(pCVar3 + 0x448);
    if (pcVar4 == (char *)0x0) {
      pcVar4 = "";
    }
    iVar2 = _V_stricmp(pcVar4,pcVar5);
    pCVar7 = pCVar3;
    if ((iVar2 == 0) &&
       (uVar6 = *(uint *)(pCVar3 + 0x474) & 0xfffffffd, *(uint *)(pCVar3 + 0x474) != uVar6)) {
      if (pCVar3[0x6c] == (CBaseEntity)0x0) {
        pCVar1 = *(CBaseEdict **)(pCVar3 + 0x30);
        if (pCVar1 != (CBaseEdict *)0x0) {
          *(uint *)pCVar1 = *(uint *)pCVar1 | 0x101;
          iVar2 = CBaseEdict::GetChangeAccessor(pCVar1);
          *(undefined2 *)(iVar2 + 2) = 0;
        }
      }
      else {
        pCVar3[0x70] = (CBaseEntity)((byte)pCVar3[0x70] | 1);
      }
      *(uint *)(pCVar3 + 0x474) = uVar6;
    }
    do {
      pCVar7 = (CBaseEntity *)CGlobalEntityList::NextEnt((CGlobalEntityList *)gEntList,pCVar7);
      if (pCVar7 == (CBaseEntity *)0x0) {
        return 1;
      }
      pCVar3 = (CBaseEntity *)__dynamic_cast(pCVar7,&CBaseEntity::typeinfo,&typeinfo,0);
    } while (pCVar3 == (CBaseEntity *)0x0);
  } while( true );
}

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)