SV_TriggerMoved
0x0023ee10 · 275 bytes · __cdecl
_Z15SV_TriggerMovedP7edict_tb
Decompiled
undefined (2 params)
/* SV_TriggerMoved(edict_t*, bool) */
void SV_TriggerMoved(edict_t *param_1,bool param_2)
{
int *piVar1;
int iVar2;
Vector local_58 [12];
Vector local_4c [12];
undefined **local_40;
edict_t *local_3c;
ICollideable *local_38;
undefined4 local_34;
void *local_24;
undefined4 local_20;
undefined4 local_1c;
int local_18;
void *local_14;
undefined1 local_10;
local_40 = &PTR_EnumElement_002cadd0;
local_20 = 8;
local_1c = 8;
local_24 = malloc(0x20);
local_18 = 0;
local_10 = param_2;
local_3c = param_1;
local_14 = local_24;
if ((((byte)*param_1 & 4) == 0) || (piVar1 = *(int **)(param_1 + 0xc), piVar1 == (int *)0x0)) {
local_38 = (ICollideable *)0x0;
}
else {
/* try { // try from 0023ee6d to 0023eee5 has its CatchHandler @ 0023ef27 */
local_38 = (ICollideable *)(**(code **)(*piVar1 + 0x10))(piVar1);
}
local_34 = (**(code **)(*(int *)local_38 + 0x30))(local_38);
CM_TriggerWorldSpaceBounds(local_38,local_58,local_4c);
piVar1 = (int *)SpatialPartition();
(**(code **)(*piVar1 + 0x38))(piVar1,1,local_58,local_4c,0,&local_40);
iVar2 = 0;
if (0 < local_18) {
do {
(**(code **)(*serverGameEnts + 8))
(serverGameEnts,*(undefined4 *)((int)local_24 + iVar2 * 4),local_3c);
iVar2 = iVar2 + 1;
} while (iVar2 < local_18);
}
local_40 = &PTR_EnumElement_002cadd0;
local_18 = 0;
CUtlMemory<edict_t*,int>::Purge((CUtlMemory<edict_t*,int> *)&local_24);
local_14 = local_24;
CUtlMemory<edict_t*,int>::Purge((CUtlMemory<edict_t*,int> *)&local_24);
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.