L L4D2node

CPhysHinge::InputSetHingeFriction

0x00775870 · 125 bytes · __thiscall

_ZN10CPhysHinge21InputSetHingeFrictionER11inputdata_t

Decompiled

undefined (2 params)

/* CPhysHinge::InputSetHingeFriction(inputdata_t&) */

void __thiscall CPhysHinge::InputSetHingeFriction(CPhysHinge *this,inputdata_t *param_1)

{
  double dVar1;
  float fVar2;
  
  fVar2 = *(float *)(param_1 + 8);
  if (*(int *)(param_1 + 0x18) == 1) {
    dVar1 = (double)fVar2;
  }
  else {
    dVar1 = 0.0;
    fVar2 = 0.0;
  }
  *(float *)(this + 0x4c0) = fVar2;
  Msg("Setting hinge friction to %f\n",dVar1);
  *(undefined4 *)(this + 0x498) = 0;
  *(undefined4 *)(this + 0x49c) = 0;
  *(undefined4 *)(this + 0x4a0) = 0;
  *(float *)(this + 0x4a4) = *(float *)(this + 0x4c0) * 1000.0;
  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)