L L4D2node

WeaponSpawnSort

0x008a3330 · 179 bytes · __cdecl

_ZL15WeaponSpawnSortPK18EntityLocationInfoI7CHandleI24CWeaponSpawnConfigurableEES5_

Decompiled

undefined (2 params)

/* WeaponSpawnSort(EntityLocationInfo<CHandle<CWeaponSpawnConfigurable> > const*,
   EntityLocationInfo<CHandle<CWeaponSpawnConfigurable> > const*) */

bool WeaponSpawnSort(EntityLocationInfo *param_1,EntityLocationInfo *param_2)

{
  uint uVar1;
  int iVar2;
  undefined *puVar3;
  int iVar4;
  
  iVar2 = 0;
  uVar1 = *(uint *)(param_1 + 0x1c);
  if (((uVar1 != 0xffffffff) &&
      (puVar3 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar3 != (undefined *)0xfffffffc)) &&
     (*(uint *)(puVar3 + 8) == uVar1 >> 0xc)) {
    iVar2 = *(int *)(puVar3 + 4);
  }
  iVar4 = 0;
  uVar1 = *(uint *)(param_2 + 0x1c);
  if (((uVar1 != 0xffffffff) &&
      (puVar3 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar3 != (undefined *)0xfffffffc)) &&
     (*(uint *)(puVar3 + 8) == uVar1 >> 0xc)) {
    iVar4 = *(int *)(puVar3 + 4);
  }
  if (iVar2 == 0) {
    iVar2 = 0;
  }
  else {
    iVar2 = *(int *)(iVar2 + 0x147c);
  }
  if (iVar4 == 0) {
    return iVar2 < 0;
  }
  return iVar2 < *(int *)(iVar4 + 0x147c);
}

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)