L L4D2node

CEngineTraceServer::SetTraceEntity

0x00159230 · 133 bytes · __thiscall

_ZN18CEngineTraceServer14SetTraceEntityEP12ICollideableP10CGameTrace

Decompiled

undefined (3 params)

/* CEngineTraceServer::SetTraceEntity(ICollideable*, CGameTrace*) */

void __thiscall
CEngineTraceServer::SetTraceEntity
          (CEngineTraceServer *this,ICollideable *param_1,CGameTrace *param_2)

{
  char cVar1;
  undefined4 uVar2;
  int *piVar3;
  undefined4 uVar4;
  int iVar5;
  
  if (((*(float *)(param_2 + 0x2c) <= 1.0 && *(float *)(param_2 + 0x2c) != 1.0) ||
      (param_2[0x36] != (CGameTrace)0x0)) || (param_2[0x37] != (CGameTrace)0x0)) {
    uVar2 = (*(code *)**(undefined4 **)param_1)(param_1);
    piVar3 = (int *)StaticPropMgr();
    cVar1 = (**(code **)(*piVar3 + 0x28))(piVar3,uVar2);
    if (cVar1 == '\0') {
      *(undefined4 *)(param_2 + 0x4c) = uVar2;
      return;
    }
    uVar4 = 0;
    if ((*DAT_003b8174 & 4) != 0) {
      uVar4 = *(undefined4 *)(DAT_003b8174 + 0xc);
    }
    *(undefined4 *)(param_2 + 0x4c) = uVar4;
    piVar3 = (int *)StaticPropMgr();
    iVar5 = (**(code **)(*piVar3 + 0x30))(piVar3,uVar2);
    *(int *)(param_2 + 0x50) = iVar5 + 1;
  }
  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)