L L4D2node

CVoxelHash::LeafListExtrudedRaySetup

0x001dc4f0 · 489 bytes · __thiscall

_ZN10CVoxelHash24LeafListExtrudedRaySetupERK5Ray_tRK6VectorS5_S5_PiS6_S6_PfS7_S7_

Decompiled

undefined (11 params)

/* CVoxelHash::LeafListExtrudedRaySetup(Ray_t const&, Vector const&, Vector const&, Vector const&,
   int*, int*, int*, float*, float*, float*) */

void __thiscall
CVoxelHash::LeafListExtrudedRaySetup
          (CVoxelHash *this,Ray_t *param_1,Vector *param_2,Vector *param_3,Vector *param_4,
          int *param_5,int *param_6,int *param_7,float *param_8,float *param_9,float *param_10)

{
  int iVar1;
  int iVar2;
  float fVar3;
  float fVar4;
  float fVar5;
  float fVar6;
  float local_28 [6];
  
  local_28[0] = *(float *)param_3 - *(float *)this;
  local_28[1] = *(float *)(param_3 + 4) - *(float *)(this + 4);
  local_28[2] = *(float *)(param_3 + 8) - *(float *)(this + 8);
  local_28[3] = *(float *)param_4 - *(float *)this;
  local_28[4] = *(float *)(param_4 + 4) - *(float *)(this + 4);
  local_28[5] = *(float *)(param_4 + 8) - *(float *)(this + 8);
  iVar1 = 0;
  do {
    if (*(float *)(param_1 + iVar1 * 4 + 0x10) == 0.0) {
      param_9[iVar1] = 65536.0;
      param_8[iVar1] = 65536.0;
      param_10[iVar1] = 65536.0;
    }
    else {
      if (*(float *)(param_1 + iVar1 * 4 + 0x10) < 0.0) {
        param_7[iVar1] = -1;
        iVar2 = 0x100 << ((char)*(undefined4 *)(this + 0x104c) * '\x02' & 0x1fU);
        fVar4 = local_28[iVar1] - (float)(iVar2 * param_5[iVar1]);
        fVar3 = local_28[iVar1 + 3] - (float)(iVar2 * param_6[iVar1]);
        fVar6 = -*(float *)(param_2 + iVar1 * 4);
        fVar5 = -*(float *)(param_1 + iVar1 * 4 + 0x10);
      }
      else {
        param_7[iVar1] = 1;
        fVar5 = *(float *)(param_1 + iVar1 * 4 + 0x10);
        iVar2 = 0x100 << ((char)*(undefined4 *)(this + 0x104c) * '\x02' & 0x1fU);
        fVar4 = -((float)(~param_6[iVar1] * iVar2) + local_28[iVar1 + 3]);
        fVar6 = *(float *)(param_2 + iVar1 * 4);
        fVar3 = -((float)(~param_5[iVar1] * iVar2) + local_28[iVar1]);
      }
      if (fVar4 <= fVar5) {
        param_9[iVar1] = fVar4 * fVar6;
        param_10[iVar1] =
             (float)(0x100 << ((char)*(undefined4 *)(this + 0x104c) * '\x02' & 0x1fU)) * fVar6;
      }
      else {
        param_9[iVar1] = 65536.0;
        param_10[iVar1] = 65536.0;
      }
      if (fVar3 <= fVar5) {
        param_8[iVar1] = fVar6 * fVar3;
      }
      else {
        param_8[iVar1] = 65536.0;
      }
    }
    iVar1 = iVar1 + 1;
  } while (iVar1 != 3);
  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)