CFourWheelVehiclePhysics::PlaceWheelDust
0x006aab50 · 530 bytes · __thiscall
_ZN24CFourWheelVehiclePhysics14PlaceWheelDustEib.part.19
Decompiled
undefined (3 params)
/* CFourWheelVehiclePhysics::PlaceWheelDust(int, bool) [clone .part.19] */
void __thiscall
CFourWheelVehiclePhysics::PlaceWheelDust(CFourWheelVehiclePhysics *this,int param_1,bool param_2)
{
int in_EAX;
int iVar1;
char in_CL;
longdouble lVar2;
undefined4 uVar3;
float local_88;
float local_84;
float local_80;
CEffectData local_7c [12];
undefined4 local_70;
undefined4 local_6c;
undefined4 local_68;
float local_64;
float local_60;
float local_5c;
undefined4 local_58;
undefined4 local_54;
undefined4 local_50;
undefined4 local_4c;
undefined4 local_48;
float local_44;
undefined4 local_40;
undefined4 local_3c;
undefined4 local_38;
undefined2 local_34;
undefined4 local_30;
undefined4 local_2c;
undefined4 local_28;
undefined1 local_24;
undefined1 local_23;
uVar3 = 0;
(**(code **)(**(int **)(in_EAX + 0x24) + 0x24))(*(int **)(in_EAX + 0x24));
iVar1 = rand();
local_88 = (float)iVar1 * 6.103702e-05 - 1.0;
iVar1 = rand();
local_84 = (float)iVar1 * 6.103702e-05 - 1.0;
iVar1 = rand();
local_80 = (float)iVar1 * 6.103702e-05 - 1.0;
lVar2 = (longdouble)(**(code **)(*random_valve + 4))(random_valve,0x3e99999a,0x3f800000,uVar3);
local_80 = (float)lVar2;
VectorNormalize((Vector *)&local_88);
if (in_CL == '\0') {
if (*(float *)(in_EAX + 0x48) != 5.0) {
local_44 = ((float)*(int *)(in_EAX + 0x28) - 5.0) / (*(float *)(in_EAX + 0x48) - 5.0);
if (1.0 <= local_44) {
local_44 = 1.0;
}
if (local_44 <= 0.0) {
local_44 = 0.0;
}
if (local_44 == 0.0) {
return;
}
goto LAB_006aac50;
}
if ((float)*(int *)(in_EAX + 0x28) < 5.0) {
return;
}
}
local_44 = 1.0;
LAB_006aac50:
local_24 = 0;
local_34 = 0;
local_70 = 0;
local_64 = local_88;
local_6c = 0;
local_60 = local_84;
local_68 = 0;
local_58 = 0;
local_54 = 0;
local_50 = 0;
local_4c = 0;
local_48 = 0;
local_38 = 0;
local_40 = 0;
local_3c = 0;
local_30 = 0;
local_2c = 0;
local_28 = 0;
local_23 = 0;
local_5c = local_80;
DispatchEffect("WheelDust",local_7c);
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.