L L4D2node

CTerrorGameMovement::GetWaterCheckPosition

0x004f8630 · 346 bytes · __thiscall

_ZN19CTerrorGameMovement21GetWaterCheckPositionEiP6Vector

Decompiled

undefined (3 params)

/* CTerrorGameMovement::GetWaterCheckPosition(int, Vector*) */

void __thiscall
CTerrorGameMovement::GetWaterCheckPosition(CTerrorGameMovement *this,int param_1,Vector *param_2)

{
  float fVar1;
  float fVar2;
  char cVar3;
  float *pfVar4;
  int iVar5;
  
  cVar3 = (**(code **)(**(int **)(this + 0x810) + 0x7e8))(*(int **)(this + 0x810));
  if (cVar3 == '\0') {
    CGameMovement::GetWaterCheckPosition((CGameMovement *)this,param_1,param_2);
    return;
  }
  fVar1 = *(float *)(*(int *)(this + 8) + 0x9c);
  pfVar4 = (float *)(**(code **)(*(int *)this + 0x7c))(this);
  fVar2 = *pfVar4;
  pfVar4 = (float *)(**(code **)(*(int *)this + 0x80))(this);
  *(float *)param_2 = (fVar2 + *pfVar4) * 0.5 + fVar1;
  fVar1 = *(float *)(*(int *)(this + 8) + 0xa0);
  iVar5 = (**(code **)(*(int *)this + 0x7c))(this);
  fVar2 = *(float *)(iVar5 + 4);
  iVar5 = (**(code **)(*(int *)this + 0x80))(this);
  *(float *)(param_2 + 4) = (fVar2 + *(float *)(iVar5 + 4)) * 0.5 + fVar1;
  if (1 < param_1 - 2U) {
    fVar1 = *(float *)(*(int *)(this + 8) + 0xa4);
    iVar5 = (**(code **)(*(int *)this + 0x7c))(this);
    *(float *)(param_2 + 8) = fVar1 + 1.0 + *(float *)(iVar5 + 8);
    return;
  }
  fVar1 = *(float *)(*(int *)(this + 8) + 0xa4);
  iVar5 = (**(code **)(**(int **)(this + 4) + 0x250))(*(int **)(this + 4));
  *(float *)(param_2 + 8) = fVar1 + *(float *)(iVar5 + 8);
  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)