L L4D2node

CRopeKeyframe::CreateWithSecondPointDetached

0x008083b0 · 524 bytes · __cdecl

_ZN13CRopeKeyframe29CreateWithSecondPointDetachedEP11CBaseEntityiiiPKcibS3_

Decompiled

undefined (8 params)

/* CRopeKeyframe::CreateWithSecondPointDetached(CBaseEntity*, int, int, int, char const*, int, bool,
   char const*) */

CRopeKeyframe *
CRopeKeyframe::CreateWithSecondPointDetached
          (CBaseEntity *param_1,int param_2,int param_3,int param_4,char *param_5,int param_6,
          bool param_7,char *param_8)

{
  CBaseEdict *pCVar1;
  CRopeKeyframe *this;
  int iVar2;
  int iVar3;
  uint uVar4;
  undefined4 local_20 [4];
  
  this = (CRopeKeyframe *)CreateEntityByName(param_8,-1,true);
  if (this == (CRopeKeyframe *)0x0) {
    this = (CRopeKeyframe *)0x0;
  }
  else {
    SetStartPoint(this,param_1,param_2);
    SetEndPoint(this,(CBaseEntity *)0x0,0);
    this[0x478] = (CRopeKeyframe)0x0;
    if (*(int *)(this + 0x474) != 1) {
      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);
      }
      *(undefined4 *)(this + 0x474) = 1;
    }
    if ((!param_7) &&
       (uVar4 = *(uint *)(this + 0x444) & 0xffffffbf, *(uint *)(this + 0x444) != uVar4)) {
      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 + 0x444) = uVar4;
    }
    (**(code **)(*(int *)this + 0x328))(this);
    AllocPooledString((char *)local_20);
    *(undefined4 *)(this + 0x460) = local_20[0];
    if (param_3 != *(int *)(this + 0x470)) {
      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);
      }
      *(int *)(this + 0x470) = param_3;
    }
    if ((float)param_4 != *(float *)(this + 0x450)) {
      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);
      }
      *(float *)(this + 0x450) = (float)param_4;
    }
    iVar2 = 2;
    if (1 < param_6) {
      iVar2 = param_6;
    }
    iVar3 = 10;
    if (iVar2 < 0xb) {
      iVar3 = iVar2;
    }
    if (*(int *)(this + 0x458) != iVar3) {
      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);
      }
      *(int *)(this + 0x458) = iVar3;
    }
  }
  return this;
}

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)