L L4D2node

CTerrorGameMovement::CategorizeGroundSurface

0x004f81e0 · 182 bytes · __thiscall

_ZN19CTerrorGameMovement23CategorizeGroundSurfaceER10CGameTrace

Decompiled

undefined (2 params)

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

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

{
  uint uVar1;
  int *piVar2;
  char cVar3;
  int *piVar4;
  undefined *puVar5;
  longdouble lVar6;
  
  CGameMovement::CategorizeGroundSurface((CGameMovement *)this,param_1);
  piVar4 = *(int **)(this + 0x810);
  uVar1 = piVar4[0xc2f];
  if ((((uVar1 != 0xffffffff) &&
       (puVar5 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar5 != (undefined *)0xfffffffc)) &&
      (*(uint *)(puVar5 + 8) == uVar1 >> 0xc)) &&
     (piVar2 = *(int **)(puVar5 + 4), piVar2 != (int *)0x0)) {
    lVar6 = (longdouble)(**(code **)(*piVar2 + 0x374))(piVar2);
    *(float *)(*(int *)(this + 4) + 0x2180) = (float)lVar6 * *(float *)(*(int *)(this + 4) + 0x2180)
    ;
    piVar4 = *(int **)(this + 0x810);
  }
  cVar3 = (**(code **)(*piVar4 + 0x558))(piVar4);
  if (cVar3 != '\0') {
    *(float *)(*(int *)(this + 4) + 0x2180) =
         *(float *)(*(int *)(this + 4) + 0x2180) * *(float *)(ZombieGhostFriction._28_4_ + 0x2c);
  }
  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)