L L4D2node

CBaseRopePhysics::SetNumNodes

0x00593380 · 104 bytes · __thiscall

_ZN16CBaseRopePhysics11SetNumNodesEi

Decompiled

undefined (2 params)

/* CBaseRopePhysics::SetNumNodes(int) */

void __thiscall CBaseRopePhysics::SetNumNodes(CBaseRopePhysics *this,int param_1)

{
  int iVar1;
  int iVar2;
  int iVar3;
  
  iVar2 = 0;
  iVar1 = 0x24;
  *(int *)(this + 0xc) = param_1;
  if (1 < param_1) {
    do {
      *(int *)(*(int *)(this + 0x10) + iVar2 * 8) = *(int *)(this + 8) + -0x24 + iVar1;
      iVar3 = *(int *)(this + 8) + iVar1;
      iVar1 = iVar1 + 0x24;
      *(int *)(*(int *)(this + 0x10) + 4 + iVar2 * 8) = iVar3;
      *(float *)(*(int *)(this + 0x1c) + iVar2 * 4) =
           *(float *)(this + 0x18) / (float)(*(int *)(this + 0xc) + -1);
      iVar2 = iVar2 + 1;
    } while (iVar2 < *(int *)(this + 0xc) + -1);
  }
  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)