L L4D2node

CTerrorGameMovement::UpdatePosition

0x004ffa20 · 1185 bytes · __thiscall

_ZN19CTerrorGameMovement14UpdatePositionERK6Vectorf

Decompiled

undefined (3 params)

/* CTerrorGameMovement::UpdatePosition(Vector const&, float) */

void __thiscall
CTerrorGameMovement::UpdatePosition(CTerrorGameMovement *this,Vector *param_1,float param_2)

{
  char cVar1;
  int iVar2;
  int *piVar3;
  int *piVar4;
  CTerrorPlayer *pCVar5;
  ITraceFilter *local_ec;
  float local_e8;
  float local_e4;
  float local_e0;
  float local_dc;
  float local_d8;
  float local_d4;
  undefined4 local_d0;
  undefined4 local_cc;
  undefined4 local_c8;
  CGameTrace local_c4 [12];
  float local_b8;
  float local_b4;
  float local_b0;
  CGameTrace local_70 [12];
  undefined4 local_64;
  undefined4 local_60;
  undefined4 local_5c;
  float local_50;
  
  local_ec = (ITraceFilter *)(**(code **)(*(int *)this + 0x108))(this,8);
  *(undefined4 *)(this + 0x7f4) = 0;
  iVar2 = *(int *)(this + 8);
  local_e8 = *(float *)(iVar2 + 0x40);
  local_e4 = *(float *)(iVar2 + 0x44);
  local_e0 = *(float *)(iVar2 + 0x48);
  iVar2 = (**(code **)(*(int *)this + 0x40))(this,0,0);
  UpdatePosition(this,*(CTerrorPlayer **)(this + 0x810),(Vector *)(*(int *)(this + 8) + 0x9c),
                 param_1,param_2,(Vector *)&local_e8,local_c4,local_ec,iVar2,(Vector *)0x0);
  if (((((local_b8 - *(float *)param_1 <= -0.01) || (0.01 <= local_b8 - *(float *)param_1)) ||
       (local_b4 - *(float *)(param_1 + 4) <= -0.01)) ||
      ((0.01 <= local_b4 - *(float *)(param_1 + 4) || (local_b0 - *(float *)(param_1 + 8) <= -0.01))
      )) || (0.01 <= local_b0 - *(float *)(param_1 + 8))) {
    local_d0 = 0;
    iVar2 = *(int *)(this + 8);
    local_cc = 0;
    local_dc = *(float *)(iVar2 + 0x40);
    local_d8 = *(float *)(iVar2 + 0x44);
    local_d4 = *(float *)(iVar2 + 0x48);
    local_c8 = *(undefined4 *)(*(int *)(this + 4) + 0x1acc);
    iVar2 = (**(code **)(*(int *)this + 0x40))(this,0,0);
    UpdatePosition(this,*(CTerrorPlayer **)(this + 0x810),(Vector *)(*(int *)(this + 8) + 0x9c),
                   param_1,param_2,(Vector *)&local_dc,local_70,local_ec,iVar2,(Vector *)&local_d0);
    if ((param_2 < local_50) &&
       (local_e4 * local_e4 + local_e8 * local_e8 + local_e0 * local_e0 <
        local_d8 * local_d8 + local_dc * local_dc + local_d4 * local_d4)) {
      pCVar5 = *(CTerrorPlayer **)(this + 4);
      if ((pCVar5 == (CTerrorPlayer *)0x0) ||
         (cVar1 = (**(code **)(*(int *)pCVar5 + 0x16c))(pCVar5), cVar1 == '\0')) {
        pCVar5 = (CTerrorPlayer *)0x0;
      }
      iVar2 = CTerrorPlayer::GetOtherResponsibleForMovement(pCVar5);
      if ((iVar2 == 0) &&
         (piVar3 = (int *)(**(code **)(**(int **)(this + 4) + 0x148))(*(int **)(this + 4)),
         piVar3 != (int *)0x0)) {
        piVar4 = (int *)(**(code **)(*piVar3 + 200))(piVar3);
        iVar2 = (**(code **)(*piVar4 + 0xc4))(piVar4,piVar3,&local_64);
        if (iVar2 == 0) goto LAB_004ffc13;
      }
      AdjustPosture(this,local_70,param_1,local_ec,true);
      iVar2 = *(int *)(this + 8);
      *(undefined4 *)(iVar2 + 0x9c) = local_64;
      *(undefined4 *)(iVar2 + 0xa0) = local_60;
      *(undefined4 *)(iVar2 + 0xa4) = local_5c;
      iVar2 = *(int *)(this + 8);
      *(float *)(iVar2 + 0x40) = local_dc;
      *(float *)(iVar2 + 0x44) = local_d8;
      *(float *)(iVar2 + 0x48) = local_d4;
      goto LAB_004ffc13;
    }
  }
  pCVar5 = *(CTerrorPlayer **)(this + 4);
  if ((pCVar5 == (CTerrorPlayer *)0x0) ||
     (cVar1 = (**(code **)(*(int *)pCVar5 + 0x16c))(pCVar5), cVar1 == '\0')) {
    iVar2 = CTerrorPlayer::GetOtherResponsibleForMovement((CTerrorPlayer *)0x0);
  }
  else {
    iVar2 = CTerrorPlayer::GetOtherResponsibleForMovement(pCVar5);
  }
  if ((iVar2 == 0) &&
     (piVar3 = (int *)(**(code **)(**(int **)(this + 4) + 0x148))(*(int **)(this + 4)),
     piVar3 != (int *)0x0)) {
    piVar4 = (int *)(**(code **)(*piVar3 + 200))(piVar3);
    iVar2 = (**(code **)(*piVar4 + 0xc4))(piVar4,piVar3,&local_b8);
    if (iVar2 == 0) goto LAB_004ffc13;
  }
  AdjustPosture(this,local_c4,param_1,local_ec,false);
  iVar2 = *(int *)(this + 8);
  *(float *)(iVar2 + 0x9c) = local_b8;
  *(float *)(iVar2 + 0xa0) = local_b4;
  *(float *)(iVar2 + 0xa4) = local_b0;
  iVar2 = *(int *)(this + 8);
  *(float *)(iVar2 + 0x40) = local_e8;
  *(float *)(iVar2 + 0x44) = local_e4;
  *(float *)(iVar2 + 0x48) = local_e0;
LAB_004ffc13:
  (**(code **)(*(int *)this + 0x10c))(this,&local_ec);
  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)