L L4D2node

CM_TraceToDispTree<true>

0x00125750 · 226 bytes · __cdecl

_Z18CM_TraceToDispTreeILb1EEvP11TraceInfo_tP13CDispCollTreeff

Decompiled

void (4 params)

/* void CM_TraceToDispTree<true>(TraceInfo_t*, CDispCollTree*, float, float) */

void CM_TraceToDispTree<true>
               (TraceInfo_t *param_1,CDispCollTree *param_2,float param_3,float param_4)

{
  undefined4 uVar1;
  char cVar2;
  undefined4 local_5c;
  undefined4 local_58;
  undefined4 local_54;
  undefined4 local_4c;
  undefined4 local_48;
  undefined4 local_44;
  undefined4 local_2c;
  undefined4 local_28;
  undefined4 local_24;
  undefined1 local_18;
  undefined1 local_17;
  
  local_17 = 1;
  local_2c = 0;
  local_28 = 0;
  local_24 = 0;
  local_18 = 1;
  local_54 = *(undefined4 *)(param_1 + 8);
  local_58 = *(undefined4 *)(param_1 + 4);
  local_5c = *(undefined4 *)param_1;
  local_44 = *(undefined4 *)(param_1 + 0x44);
  local_48 = *(undefined4 *)(param_1 + 0x40);
  local_4c = *(undefined4 *)(param_1 + 0x3c);
  cVar2 = CDispCollTree::AABBTree_Ray
                    (param_2,(Ray_t *)&local_5c,(Vector *)(param_1 + 0x48),
                     (CBaseTrace *)(param_1 + 0x54),true);
  if (cVar2 != '\0') {
    *(undefined4 *)(param_1 + 0x114) = 1;
    uVar1 = *(undefined4 *)(param_2 + 0x20);
    *(char **)(param_1 + 0x90) = "**displacement**";
    *(undefined4 *)(param_1 + 0x84) = uVar1;
    *(undefined2 *)(param_1 + 0x96) = 0;
    if (((byte)param_1[0x88] & 0x10) != 0) {
      *(undefined2 *)(param_1 + 0x94) = *(undefined2 *)(param_2 + 0x6e);
      return;
    }
    *(undefined2 *)(param_1 + 0x94) = *(undefined2 *)(param_2 + 0x6c);
  }
  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)