PickTankProjectileForGround
0x004e1180 · 222 bytes · __cdecl
_Z27PickTankProjectileForGroundi
Decompiled
undefined (1 param)
/* PickTankProjectileForGround(int) */
undefined4 PickTankProjectileForGround(int param_1)
{
undefined4 uVar1;
int iVar2;
int local_20;
undefined4 local_1c;
undefined4 local_18;
int local_14;
int local_10;
local_20 = 0;
local_1c = 0;
local_18 = 0;
local_14 = 0;
local_10 = 0;
if (TankProjectile == param_1) {
CUtlVector<char_const*,CUtlMemory<char_const*,int>>::InsertBefore
((CUtlVector<char_const*,CUtlMemory<char_const*,int>> *)&local_20,0,
&PTR_s_models_props_debris_concrete_chu_00f1b0b0);
}
if (DAT_00f1b0b4 == param_1) {
CUtlVector<char_const*,CUtlMemory<char_const*,int>>::InsertBefore
((CUtlVector<char_const*,CUtlMemory<char_const*,int>> *)&local_20,local_14,
&PTR_s_models_props_foliage_tree_trunk__00f1b0b8);
}
if (local_14 == 0) {
/* try { // try from 004e11d2 to 004e125b has its CatchHandler @ 004e1264 */
uVar1 = PickTankProjectileForGround(0x43);
}
else {
iVar2 = RandomInt(0,local_14 + -1);
uVar1 = *(undefined4 *)(local_20 + iVar2 * 4);
}
local_14 = 0;
CUtlMemory<char_const*,int>::Purge((CUtlMemory<char_const*,int> *)&local_20);
local_10 = local_20;
CUtlMemory<char_const*,int>::Purge((CUtlMemory<char_const*,int> *)&local_20);
return uVar1;
}
SourceMod gamedata
paste intoaddons/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.
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.
Gamedata KeyValues
DHooks plugin example
Type inference is best-effort from the C signature - sanity-check the DHooks types before shipping.