L L4D2node

CChainsaw::UpdatePoseParameters

0x00532ce0 · 308 bytes · __thiscall

_ZN9CChainsaw20UpdatePoseParametersEv

Decompiled

undefined (1 param)

/* CChainsaw::UpdatePoseParameters() */

void __thiscall CChainsaw::UpdatePoseParameters(CChainsaw *this)

{
  float fVar1;
  CBaseAnimating *this_00;
  int iVar2;
  int iVar3;
  CStudioHdr *pCVar4;
  CStudioHdr *pCVar5;
  CChainsaw *pCVar6;
  float *pfVar7;
  float fVar8;
  float fVar9;
  float local_24 [5];
  
  if (*(int *)(this + 0x1804) != 0) {
    local_24[0] = 1.0;
    pfVar7 = local_24;
    local_24[1] = 8.0;
    pCVar6 = this;
    do {
      fVar8 = *(float *)(pCVar6 + 0x1820);
      fVar1 = *(float *)(pCVar6 + 0x1828);
      if (fVar1 != fVar8) {
        fVar9 = *pfVar7 * *(float *)(gpGlobals + 0x10);
        if (fVar1 <= fVar8) {
          fVar8 = fVar8 - fVar9;
          if (fVar8 <= fVar1) {
            fVar8 = fVar1;
          }
          *(float *)(pCVar6 + 0x1820) = fVar8;
        }
        else {
          fVar9 = fVar9 + fVar8;
          if (fVar1 <= fVar9) {
            fVar9 = fVar1;
          }
          *(float *)(pCVar6 + 0x1820) = fVar9;
        }
      }
      this_00 = *(CBaseAnimating **)(this + 0x1808);
      if (this_00 != (CBaseAnimating *)0x0) {
        pCVar4 = *(CStudioHdr **)(this_00 + 0x13e0);
        fVar8 = *(float *)(pCVar6 + 0x1820);
        iVar2 = *(int *)(pCVar6 + 0x1830);
        if (pCVar4 == (CStudioHdr *)0x0) {
          iVar3 = CBaseEntity::GetModel((CBaseEntity *)this_00);
          if (iVar3 == 0) {
            pCVar4 = *(CStudioHdr **)(this_00 + 0x13e0);
          }
          else {
            CBaseAnimating::LockStudioHdr(this_00);
            pCVar4 = *(CStudioHdr **)(this_00 + 0x13e0);
          }
          pCVar5 = (CStudioHdr *)0x0;
          if (pCVar4 != (CStudioHdr *)0x0) goto LAB_00532d74;
        }
        else {
LAB_00532d74:
          pCVar5 = (CStudioHdr *)0x0;
          if (*(int *)pCVar4 != 0) {
            pCVar5 = pCVar4;
          }
        }
        CBaseAnimating::SetPoseParameter(this_00,pCVar5,iVar2,fVar8);
      }
      pfVar7 = pfVar7 + 1;
      pCVar6 = pCVar6 + 4;
    } while (pfVar7 != local_24 + 2);
  }
  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)