L L4D2node

CGameMovement::CategorizeGroundSurface

0x00451940 · 246 bytes · __thiscall

_ZN13CGameMovement23CategorizeGroundSurfaceER10CGameTrace

Decompiled

undefined (2 params)

/* CGameMovement::CategorizeGroundSurface(CGameTrace&) */

void __thiscall CGameMovement::CategorizeGroundSurface(CGameMovement *this,CGameTrace *param_1)

{
  int *piVar1;
  undefined4 uVar2;
  int iVar3;
  
  piVar1 = IMoveHelper::sm_pSingleton;
  *(undefined4 *)(this + 0x7d4) = *(undefined4 *)(param_1 + 0x18);
  *(undefined4 *)(this + 0x7d8) = *(undefined4 *)(param_1 + 0x1c);
  *(undefined4 *)(this + 0x7dc) = *(undefined4 *)(param_1 + 0x20);
  piVar1 = (int *)(**(code **)(*piVar1 + 0x30))(piVar1);
  *(int *)(*(int *)(this + 4) + 0x2178) = (int)*(short *)(param_1 + 0x40);
  iVar3 = *(int *)(this + 4);
  uVar2 = (**(code **)(*piVar1 + 0x18))(piVar1,*(undefined4 *)(iVar3 + 0x2178));
  *(undefined4 *)(iVar3 + 0x217c) = uVar2;
  (**(code **)(*piVar1 + 0x14))
            (piVar1,*(undefined4 *)(*(int *)(this + 4) + 0x2178),0,0,*(int *)(this + 4) + 0x2180,0);
  *(float *)(*(int *)(this + 4) + 0x2180) = *(float *)(*(int *)(this + 4) + 0x2180) * 1.25;
  iVar3 = *(int *)(this + 4);
  if (1.0 < *(float *)(iVar3 + 0x2180)) {
    *(undefined4 *)(iVar3 + 0x2180) = 0x3f800000;
    iVar3 = *(int *)(this + 4);
  }
  *(char *)(iVar3 + 0x2184) = (char)*(undefined2 *)(*(int *)(iVar3 + 0x217c) + 0x4c);
  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)