L L4D2node

CBaseServerVehicle::GetLocalAttachmentAtTime

0x00b39d20 · 366 bytes · __thiscall

_ZN18CBaseServerVehicle24GetLocalAttachmentAtTimeEiifP6VectorP6QAngle

Decompiled

undefined (6 params)

/* CBaseServerVehicle::GetLocalAttachmentAtTime(int, int, float, Vector*, QAngle*) */

undefined4 __thiscall
CBaseServerVehicle::GetLocalAttachmentAtTime
          (CBaseServerVehicle *this,int param_1,int param_2,float param_3,Vector *param_4,
          QAngle *param_5)

{
  float fVar1;
  CBaseEdict *pCVar2;
  CBaseAnimating *this_00;
  undefined4 uVar3;
  int iVar4;
  int iVar5;
  undefined4 local_34;
  undefined4 local_30;
  undefined4 local_2c;
  undefined4 local_28;
  undefined4 local_24;
  undefined4 local_20;
  
  this_00 = (CBaseAnimating *)(**(code **)(**(int **)(this + 0x2c) + 0xf0))(*(int **)(this + 0x2c));
  uVar3 = 0;
  if (this_00 != (CBaseAnimating *)0x0) {
    iVar5 = *(int *)(this_00 + 0x494);
    fVar1 = *(float *)(this_00 + 0x490);
    CBaseAnimating::SetSequence(this_00,param_1);
    if (param_3 != *(float *)(this_00 + 0x490)) {
      if (this_00[0x6c] == (CBaseAnimating)0x0) {
        pCVar2 = *(CBaseEdict **)(this_00 + 0x30);
        if (pCVar2 != (CBaseEdict *)0x0) {
          *(uint *)pCVar2 = *(uint *)pCVar2 | 0x101;
          iVar4 = CBaseEdict::GetChangeAccessor(pCVar2);
          *(undefined2 *)(iVar4 + 2) = 0;
        }
      }
      else {
        this_00[0x70] = (CBaseAnimating)((byte)this_00[0x70] | 1);
      }
      *(float *)(this_00 + 0x490) = param_3;
    }
    CBaseAnimating::InvalidateBoneCache(this_00);
    CBaseAnimating::GetAttachmentLocal(this_00,param_2,(Vector *)&local_34,(QAngle *)&local_28);
    if (param_4 != (Vector *)0x0) {
      *(undefined4 *)param_4 = local_34;
      *(undefined4 *)(param_4 + 4) = local_30;
      *(undefined4 *)(param_4 + 8) = local_2c;
    }
    if (param_5 != (QAngle *)0x0) {
      *(undefined4 *)param_5 = local_28;
      *(undefined4 *)(param_5 + 4) = local_24;
      *(undefined4 *)(param_5 + 8) = local_20;
    }
    CBaseAnimating::SetSequence(this_00,iVar5);
    if (fVar1 != *(float *)(this_00 + 0x490)) {
      if (this_00[0x6c] == (CBaseAnimating)0x0) {
        pCVar2 = *(CBaseEdict **)(this_00 + 0x30);
        if (pCVar2 != (CBaseEdict *)0x0) {
          *(uint *)pCVar2 = *(uint *)pCVar2 | 0x101;
          iVar5 = CBaseEdict::GetChangeAccessor(pCVar2);
          *(undefined2 *)(iVar5 + 2) = 0;
        }
      }
      else {
        this_00[0x70] = (CBaseAnimating)((byte)this_00[0x70] | 1);
      }
      *(float *)(this_00 + 0x490) = fVar1;
    }
    CBaseAnimating::InvalidateBoneCache(this_00);
    uVar3 = 1;
  }
  return uVar3;
}

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)