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 intoaddons/sourcemod/gamedata/<your_plugin>.txt
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.
Signatures + Functions block. The plugin uses
DHookCreateFromConf - DHooks reads return type, this-type,
calling convention, and argument types straight from the gamedata. Less
boilerplate in the plugin, types travel with the gamedata.
Type inference is best-effort from the C signature - sanity-check the DHooks types before shipping.