L L4D2node

CM_PreStab

0x00124840 · 274 bytes · __cdecl

_Z10CM_PreStabP11TraceInfo_tPKtiR6VectoriRi

Decompiled

undefined (6 params)

/* CM_PreStab(TraceInfo_t*, unsigned short const*, int, Vector&, int, int&) */

void CM_PreStab(TraceInfo_t *param_1,ushort *param_2,int param_3,Vector *param_4,int param_5,
               int *param_6)

{
  ushort *puVar1;
  char cVar2;
  int iVar3;
  CDispCollTree *this;
  
  if (param_3 == 0) {
    *(undefined4 *)param_4 = 0;
    *(undefined4 *)(param_4 + 4) = 0;
    *(undefined4 *)(param_4 + 8) = 0;
    *param_6 = 0;
    return;
  }
  iVar3 = (uint)*param_2 * 0xf4 + g_pDispCollTrees;
  *(undefined4 *)param_4 = *(undefined4 *)(iVar3 + 0x60);
  *(undefined4 *)(param_4 + 4) = *(undefined4 *)(iVar3 + 100);
  *(undefined4 *)(param_4 + 8) = *(undefined4 *)(iVar3 + 0x68);
  *param_6 = 1;
  puVar1 = param_2 + param_3;
  if (0 < param_3) {
    do {
      this = (CDispCollTree *)((uint)*param_2 * 0xf4 + g_pDispCollTrees);
      if (((*(uint *)(this + 0x20) & param_5) != 0) &&
         (cVar2 = CDispCollTree::PointInBounds
                            (this,(Vector *)param_1,(Vector *)(param_1 + 0x18),
                             (Vector *)(param_1 + 0x24),(bool)param_1[0x100]), cVar2 != '\0')) {
        *(undefined4 *)param_4 = *(undefined4 *)(this + 0x60);
        *(undefined4 *)(param_4 + 4) = *(undefined4 *)(this + 100);
        *(undefined4 *)(param_4 + 8) = *(undefined4 *)(this + 0x68);
        *param_6 = *(int *)(this + 0x20);
        return;
      }
      param_2 = param_2 + 1;
    } while (param_2 != puVar1);
  }
  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)