L L4D2node

CBaseAnimating::GetIntervalMovement

0x005e38d0 · 709 bytes · __thiscall

_ZN14CBaseAnimating19GetIntervalMovementEfRbR6VectorR6QAngle

Decompiled

undefined (5 params)

/* CBaseAnimating::GetIntervalMovement(float, bool&, Vector&, QAngle&) */

undefined4 __thiscall
CBaseAnimating::GetIntervalMovement
          (CBaseAnimating *this,float param_1,bool *param_2,Vector *param_3,QAngle *param_4)

{
  float fVar1;
  float fVar2;
  char cVar3;
  undefined4 uVar4;
  int iVar5;
  int iVar6;
  CStudioHdr *pCVar7;
  CStudioHdr *pCVar8;
  CStudioHdr *this_00;
  longdouble lVar9;
  float fVar10;
  float fVar11;
  float local_34;
  float local_30;
  float local_2c;
  QAngle local_28 [4];
  float local_24;
  
  this_00 = *(CStudioHdr **)(this + 0x13e0);
  if (this_00 == (CStudioHdr *)0x0) {
    iVar5 = CBaseEntity::GetModel((CBaseEntity *)this);
    if (iVar5 == 0) {
      this_00 = *(CStudioHdr **)(this + 0x13e0);
    }
    else {
      LockStudioHdr(this);
      this_00 = *(CStudioHdr **)(this + 0x13e0);
    }
    if (this_00 == (CStudioHdr *)0x0) {
      return 0;
    }
  }
  if ((*(int *)this_00 == 0) || (cVar3 = CStudioHdr::SequencesAvailable(this_00), cVar3 == '\0')) {
    return 0;
  }
  pCVar7 = *(CStudioHdr **)(this + 0x13e0);
  iVar5 = *(int *)(this + 0x494);
  if (pCVar7 == (CStudioHdr *)0x0) {
    iVar6 = CBaseEntity::GetModel((CBaseEntity *)this);
    if (iVar6 == 0) {
      pCVar7 = *(CStudioHdr **)(this + 0x13e0);
    }
    else {
      LockStudioHdr(this);
      pCVar7 = *(CStudioHdr **)(this + 0x13e0);
    }
    if (pCVar7 == (CStudioHdr *)0x0) {
      pCVar8 = (CStudioHdr *)0x0;
      goto LAB_005e3921;
    }
  }
  pCVar8 = (CStudioHdr *)0x0;
  if (*(int *)pCVar7 != 0) {
    pCVar8 = pCVar7;
  }
LAB_005e3921:
  lVar9 = (longdouble)SequenceDuration(this,pCVar8,iVar5);
  fVar10 = 0.0;
  if ((float)lVar9 <= 0.0) {
    fVar11 = 10.0;
  }
  else {
    fVar11 = 1.0 / (float)lVar9;
  }
  fVar1 = *(float *)(this + 0x528);
  fVar2 = *(float *)(this + 0x490);
  if (fVar1 < 0.0) {
    fVar10 = *(float *)(this + 0x468) * param_1 * fVar11;
  }
  else if (fVar1 <= 1.0) {
    fVar10 = *(float *)(this + 0x468) * param_1 * (1.0 - fVar1) * fVar11;
  }
  if ((this[0x489] != (CBaseAnimating)0x0) || (fVar11 = 1.0, fVar10 + fVar2 <= 1.0)) {
    *param_2 = false;
    fVar11 = fVar10 + fVar2;
  }
  else {
    *param_2 = true;
  }
  uVar4 = Studio_SeqMovement(this_00,*(int *)(this + 0x494),*(float *)(this + 0x490),fVar11,
                             (float *)(this + 0x498),(Vector *)&local_34,local_28);
  if ((char)uVar4 == '\0') {
    *(undefined4 *)param_3 = *(undefined4 *)(this + 0x39c);
    *(undefined4 *)(param_3 + 4) = *(undefined4 *)(this + 0x3a0);
    *(undefined4 *)(param_3 + 8) = *(undefined4 *)(this + 0x3a4);
    *(undefined4 *)param_4 = *(undefined4 *)(this + 0x3a8);
    *(undefined4 *)(param_4 + 4) = *(undefined4 *)(this + 0x3ac);
    *(undefined4 *)(param_4 + 8) = *(undefined4 *)(this + 0x3b0);
    return uVar4;
  }
  VectorYawRotate((Vector *)&local_34,*(float *)(this + 0x3ac),(Vector *)&local_34);
  fVar10 = *(float *)(this + 0x3a0);
  fVar11 = *(float *)(this + 0x39c);
  *(float *)(param_3 + 8) = local_2c + *(float *)(this + 0x3a4);
  *(float *)(param_3 + 4) = local_30 + fVar10;
  *(float *)param_3 = local_34 + fVar11;
  *(undefined4 *)(param_4 + 4) = 0;
  *(undefined4 *)param_4 = 0;
  *(undefined4 *)(param_4 + 8) = 0;
  *(float *)(param_4 + 4) = local_24 + *(float *)(this + 0x3ac);
  return uVar4;
}

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)