L L4D2node

GetWindspeedAtLocation

0x0044b460 · 276 bytes · __cdecl

_Z22GetWindspeedAtLocationRK6Vector

Decompiled

undefined (1 param)

/* GetWindspeedAtLocation(Vector const&) */

void GetWindspeedAtLocation(Vector *param_1)

{
  int *piVar1;
  int iVar2;
  undefined4 uVar3;
  int iVar4;
  uint uVar5;
  uint uVar6;
  float fVar7;
  float fVar8;
  float fVar9;
  float *in_stack_00000008;
  
  uVar6 = (uint)DAT_00f79fc0;
  if (uVar6 != 0xffff) {
    uVar5 = uVar6;
    do {
      piVar1 = (int *)(s_windControllers + uVar5 * 8);
      iVar2 = *piVar1;
      fVar7 = *(float *)(iVar2 + 0x30) - *in_stack_00000008;
      fVar9 = *(float *)(iVar2 + 0x34) - in_stack_00000008[1];
      fVar8 = *(float *)(iVar2 + 0x38) - in_stack_00000008[2];
      if (SQRT(fVar7 * fVar7 + fVar9 * fVar9 + fVar8 * fVar8) < (float)*(int *)(iVar2 + 0x14)) {
        *(undefined4 *)param_1 = *(undefined4 *)(iVar2 + 0x48);
        uVar3 = *(undefined4 *)(iVar2 + 0x50);
        *(undefined4 *)(param_1 + 4) = *(undefined4 *)(iVar2 + 0x4c);
        *(undefined4 *)(param_1 + 8) = uVar3;
        return;
      }
      uVar5 = (uint)*(ushort *)((int)piVar1 + 6);
    } while (uVar5 != 0xffff);
    piVar1 = (int *)(s_windControllers + uVar6 * 8);
    iVar2 = *piVar1;
    iVar4 = *(int *)(iVar2 + 0x14);
    while( true ) {
      if ((float)iVar4 == -1.0) {
        *(undefined4 *)param_1 = *(undefined4 *)(iVar2 + 0x48);
        *(undefined4 *)(param_1 + 4) = *(undefined4 *)(iVar2 + 0x4c);
        *(undefined4 *)(param_1 + 8) = *(undefined4 *)(iVar2 + 0x50);
        return;
      }
      if (*(ushort *)((int)piVar1 + 6) == 0xffff) break;
      piVar1 = (int *)(s_windControllers + (uint)*(ushort *)((int)piVar1 + 6) * 8);
      iVar2 = *piVar1;
      iVar4 = *(int *)(iVar2 + 0x14);
    }
  }
  *(undefined4 *)param_1 = 0;
  *(undefined4 *)(param_1 + 4) = 0;
  *(undefined4 *)(param_1 + 8) = 0;
  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)