L L4D2node

CPhysSlideConstraint::InputSetVelocity

0x00775d00 · 456 bytes · __thiscall

_ZN20CPhysSlideConstraint16InputSetVelocityER11inputdata_t

Decompiled

undefined (2 params)

/* CPhysSlideConstraint::InputSetVelocity(inputdata_t&) */

void __thiscall
CPhysSlideConstraint::InputSetVelocity(CPhysSlideConstraint *this,inputdata_t *param_1)

{
  char cVar1;
  int iVar2;
  int *piVar3;
  longdouble lVar4;
  float fVar5;
  float local_18;
  float local_10;
  
  piVar3 = *(int **)(this + 0x440);
  if (piVar3 == (int *)0x0) {
    return;
  }
  iVar2 = (**(code **)(*piVar3 + 0x18))(piVar3);
  if (iVar2 == 0) {
    return;
  }
  iVar2 = (**(code **)(**(int **)(this + 0x440) + 0x1c))(*(int **)(this + 0x440));
  if (iVar2 == 0) {
    return;
  }
  local_10 = *(float *)(param_1 + 8);
  if (*(int *)(param_1 + 0x18) != 1) {
    local_10 = 0.0;
  }
  piVar3 = (int *)(**(code **)(**(int **)(this + 0x440) + 0x18))(*(int **)(this + 0x440));
  cVar1 = (**(code **)(*piVar3 + 0x2c))(piVar3);
  iVar2 = **(int **)(this + 0x440);
  if (cVar1 == '\0') {
    piVar3 = (int *)(**(code **)(iVar2 + 0x1c))();
    cVar1 = (**(code **)(*piVar3 + 0x2c))(piVar3);
    if (cVar1 == '\0') {
      local_18 = 1.0;
      goto LAB_00775df7;
    }
    local_18 = 1.0;
    iVar2 = 0;
LAB_00775e70:
    iVar2 = iVar2 + 1;
    piVar3 = (int *)(**(code **)(**(int **)(this + 0x440) + 0x1c))(*(int **)(this + 0x440));
    lVar4 = (longdouble)(**(code **)(*piVar3 + 0x78))(piVar3);
    local_18 = (float)lVar4 + local_18;
    piVar3 = (int *)(**(code **)(**(int **)(this + 0x440) + 0x1c))(*(int **)(this + 0x440));
    (**(code **)(*piVar3 + 100))(piVar3);
  }
  else {
    piVar3 = (int *)(**(code **)(iVar2 + 0x18))(*(int **)(this + 0x440));
    iVar2 = 1;
    lVar4 = (longdouble)(**(code **)(*piVar3 + 0x78))(piVar3);
    local_18 = (float)lVar4;
    piVar3 = (int *)(**(code **)(**(int **)(this + 0x440) + 0x18))(*(int **)(this + 0x440));
    (**(code **)(*piVar3 + 100))(piVar3);
    piVar3 = (int *)(**(code **)(**(int **)(this + 0x440) + 0x1c))(*(int **)(this + 0x440));
    cVar1 = (**(code **)(*piVar3 + 0x2c))(piVar3);
    if (cVar1 != '\0') goto LAB_00775e70;
  }
  local_18 = local_18 / (float)iVar2;
LAB_00775df7:
  fVar5 = *(float *)(this + 0x490);
  if (fVar5 == 0.0) {
    fVar5 = 1.0;
  }
  (**(code **)(**(int **)(this + 0x440) + 0x20))
            (*(int **)(this + 0x440),local_10,
             (local_18 * local_10 * fVar5) / *(float *)(gpGlobals + 0x1c));
  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)