L L4D2node

CRopeKeyframe::SetAttachmentPoint

0x00807f50 · 203 bytes · __thiscall

_ZN13CRopeKeyframe18SetAttachmentPointER11CBaseHandleRsP11CBaseEntityi

Decompiled

undefined (5 params)

/* CRopeKeyframe::SetAttachmentPoint(CBaseHandle&, short&, CBaseEntity*, int) */

void __thiscall
CRopeKeyframe::SetAttachmentPoint
          (CRopeKeyframe *this,CBaseHandle *param_1,short *param_2,CBaseEntity *param_3,int param_4)

{
  uint uVar1;
  int *piVar2;
  undefined4 *puVar3;
  CBaseEntity *this_00;
  int iVar4;
  short local_24;
  
  uVar1 = *(uint *)param_1;
  if (((uVar1 != 0xffffffff) &&
      (iVar4 = (uVar1 & 0xfff) * 0x10, *(uint *)(gEntList + iVar4 + 8) == uVar1 >> 0xc)) &&
     (piVar2 = *(int **)(gEntList + iVar4 + 4), piVar2 != (int *)0x0)) {
    this_00 = (CBaseEntity *)(**(code **)(*piVar2 + 0x18))(piVar2);
    if ((this_00 != (CBaseEntity *)0x0) && (*(int *)(this_00 + 0x30) != 0)) {
      this_00[0x184] = (CBaseEntity)((char)this_00[0x184] + -1);
      CBaseEntity::DispatchUpdateTransmitState(this_00);
    }
  }
  local_24 = (short)param_4;
  if (param_3 != (CBaseEntity *)0x0) {
    puVar3 = (undefined4 *)(**(code **)(*(int *)param_3 + 0xc))(param_3);
    *(undefined4 *)param_1 = *puVar3;
    *param_2 = local_24;
    CBaseEntity::SetTransmitState(param_3,8);
    param_3[0x184] = (CBaseEntity)((char)param_3[0x184] + '\x01');
    EndpointsChanged(this);
    return;
  }
  *(undefined4 *)param_1 = 0xffffffff;
  *param_2 = local_24;
  EndpointsChanged(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)