send_tree
0x000eb870 · 551 bytes · __cdecl
_Z9send_treeR6TStateP7ct_datai
Decompiled
undefined (3 params)
/* send_tree(TState&, ct_data*, int) */
void send_tree(TState *param_1,ct_data *param_2,int param_3)
{
int iVar1;
int iVar2;
int iVar3;
int iVar4;
uint uVar5;
uint local_2c;
uint local_28;
int local_24;
local_2c = 0xffffffff;
local_24 = 0;
local_28 = (uint)*(ushort *)(param_2 + 2);
iVar1 = 4 - (uint)(local_28 == 0);
iVar2 = 0;
iVar3 = (-(uint)(local_28 == 0) & 0x83) + 7;
if (-1 < param_3) {
while( true ) {
uVar5 = (uint)*(ushort *)(param_2 + local_24 * 4 + 6);
iVar4 = iVar2 + 1;
if ((iVar3 <= iVar4) || (local_28 != uVar5)) {
if (iVar4 < iVar1) {
do {
send_bits(param_1,(uint)*(ushort *)(param_1 + local_28 * 4 + 0xef4),
(uint)*(ushort *)(param_1 + local_28 * 4 + 0xef6));
iVar4 = iVar4 + -1;
} while (iVar4 != 0);
}
else if (local_28 == 0) {
if (iVar4 < 0xb) {
send_bits(param_1,(uint)*(ushort *)(param_1 + 0xf38),(uint)*(ushort *)(param_1 + 0xf3a))
;
send_bits(param_1,iVar2 + -2,3);
}
else {
send_bits(param_1,(uint)*(ushort *)(param_1 + 0xf3c),(uint)*(ushort *)(param_1 + 0xf3e))
;
send_bits(param_1,iVar2 + -10,7);
}
}
else {
if (local_2c != local_28) {
send_bits(param_1,(uint)*(ushort *)(param_1 + local_28 * 4 + 0xef4),
(uint)*(ushort *)(param_1 + local_28 * 4 + 0xef6));
iVar4 = iVar2;
}
if (3 < iVar4 - 3U) {
*(undefined **)(param_1 + 0x6afa4) = &DAT_002a510a;
}
send_bits(param_1,(uint)*(ushort *)(param_1 + 0xf34),(uint)*(ushort *)(param_1 + 0xf36));
send_bits(param_1,iVar4 - 3U,2);
}
if (uVar5 == 0) {
iVar3 = 0x8a;
iVar1 = 3;
iVar4 = 0;
local_2c = local_28;
}
else if (local_28 == uVar5) {
iVar3 = 6;
iVar1 = 3;
iVar4 = 0;
local_2c = uVar5;
}
else {
iVar3 = 7;
iVar1 = 4;
iVar4 = 0;
local_2c = local_28;
}
}
iVar2 = iVar4;
if (param_3 < local_24 + 1) break;
local_24 = local_24 + 1;
local_28 = uVar5;
}
}
return;
}
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.