CL_SolidMoved
0x0023f510 · 1002 bytes · __cdecl
_Z13CL_SolidMovedP13IClientEntityP12ICollideablePK6Vectorb
Decompiled
undefined (4 params)
/* CL_SolidMoved(IClientEntity*, ICollideable*, Vector const*, bool) */
void CL_SolidMoved(IClientEntity *param_1,ICollideable *param_2,Vector *param_3,bool param_4)
{
float *pfVar1;
int *piVar2;
float local_b4;
float local_b0;
float local_ac;
float local_a8;
float local_a4;
float local_a0;
undefined **local_9c [4];
float local_8c;
float local_88;
float local_84;
float local_7c;
float local_78;
float local_74;
float local_6c;
float local_68;
float local_64;
float local_5c;
float local_58;
float local_54;
undefined4 local_4c;
undefined1 local_48;
undefined1 local_47;
IClientEntity *local_3c;
ICollideable *local_38;
void *local_34;
undefined4 local_30;
undefined4 local_2c;
undefined4 local_28;
void *local_24;
local_30 = 8;
local_2c = 8;
local_9c[0] = &PTR_EnumElement_002cadc0;
if (param_3 == (Vector *)0x0) {
local_34 = malloc(0x20);
local_28 = 0;
local_3c = param_1;
/* try { // try from 0023f762 to 0023f78f has its CatchHandler @ 0023f8fe */
local_24 = local_34;
local_38 = (ICollideable *)(**(code **)(*(int *)param_1 + 0x10))(param_1);
CM_GetCollideableTriggerTestBox(local_38,(Vector *)&local_b4,(Vector *)&local_a8,param_4);
pfVar1 = (float *)(**(code **)(*(int *)local_38 + 0x20))(local_38);
local_7c = 0.0;
local_78 = 0.0;
local_47 = 0;
local_74 = 0.0;
local_4c = 0;
local_58 = (local_a4 - local_b0) * 0.5;
local_5c = (local_a8 - local_b4) * 0.5;
local_54 = (local_a0 - local_ac) * 0.5;
local_68 = (local_a4 + local_b0) * 0.5;
local_6c = (local_a8 + local_b4) * 0.5;
local_64 = (local_a0 + local_ac) * 0.5;
local_48 = local_58 * local_58 + local_5c * local_5c + local_54 * local_54 < 1e-06;
local_8c = *pfVar1 + local_6c;
local_88 = pfVar1[1] + local_68;
local_84 = pfVar1[2] + local_64;
local_6c = -local_6c;
local_68 = -local_68;
local_64 = -local_64;
/* try { // try from 0023f8c7 to 0023f8f8 has its CatchHandler @ 0023f923 */
(**(code **)(*(int *)param_2 + 0x3c))(param_2,(Vector *)&local_b4,(Vector *)&local_a8);
piVar2 = (int *)SpatialPartition();
(**(code **)(*piVar2 + 0x38))(piVar2,0x100,(Vector *)&local_b4,(Vector *)&local_a8,0,local_9c);
}
else {
local_34 = malloc(0x20);
local_28 = 0;
local_3c = param_1;
/* try { // try from 0023f566 to 0023f58f has its CatchHandler @ 0023f921 */
local_24 = local_34;
local_38 = (ICollideable *)(**(code **)(*(int *)param_1 + 0x10))(param_1);
CM_GetCollideableTriggerTestBox(local_38,(Vector *)&local_b4,(Vector *)&local_a8,param_4);
pfVar1 = (float *)(**(code **)(*(int *)local_38 + 0x20))(local_38);
local_7c = *pfVar1 - *(float *)param_3;
local_78 = pfVar1[1] - *(float *)(param_3 + 4);
local_4c = 0;
local_74 = pfVar1[2] - *(float *)(param_3 + 8);
local_47 = local_78 * local_78 + local_7c * local_7c + local_74 * local_74 != 0.0;
local_5c = (local_a8 - local_b4) * 0.5;
local_58 = (local_a4 - local_b0) * 0.5;
local_54 = (local_a0 - local_ac) * 0.5;
local_6c = (local_a8 + local_b4) * 0.5;
local_8c = *(float *)param_3 + local_6c;
local_48 = local_58 * local_58 + local_5c * local_5c + local_54 * local_54 < 1e-06;
local_64 = (local_ac + local_a0) * 0.5;
local_68 = (local_b0 + local_a4) * 0.5;
local_84 = *(float *)(param_3 + 8) + local_64;
local_6c = -local_6c;
local_88 = *(float *)(param_3 + 4) + local_68;
local_68 = -local_68;
local_64 = -local_64;
/* try { // try from 0023f6de to 0023f70e has its CatchHandler @ 0023f913 */
piVar2 = (int *)SpatialPartition();
(**(code **)(*piVar2 + 0x40))(piVar2,0x100,&local_8c,0,local_9c);
}
local_28 = 0;
local_9c[0] = &PTR_EnumElement_002cadc0;
CUtlMemory<IClientEntity*,int>::Purge((CUtlMemory<IClientEntity*,int> *)&local_34);
local_24 = local_34;
CUtlMemory<IClientEntity*,int>::Purge((CUtlMemory<IClientEntity*,int> *)&local_34);
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.