CEnvWindShared::Init
0x0044ba20 · 335 bytes · __thiscall
_ZN14CEnvWindShared4InitEiifif
Decompiled
undefined (6 params)
/* CEnvWindShared::Init(int, int, float, int, float) */
void __thiscall
CEnvWindShared::Init
(CEnvWindShared *this,int param_1,int param_2,float param_3,int param_4,float param_5)
{
int iVar1;
*(undefined4 *)(this + 0xc0) = 0x3f800000;
*(float *)(this + 0xa4) = param_3;
*(int *)(this + 0xc4) = param_1;
*(undefined4 *)(this + 0xbc) = 0x3f800000;
*(float *)(this + 0xb0) = param_3;
*(float *)(this + 0xac) = param_3;
if (param_3 != *(float *)(this + 4)) {
(**(code **)(*(int *)this + 4))(this,this + 4);
*(float *)(this + 4) = param_3;
}
if (param_2 != *(int *)(this + 8)) {
(**(code **)(*(int *)this + 4))(this,this + 8);
*(int *)(this + 8) = param_2;
}
CUniformRandomStream::SetSeed((int)(this + 200));
CUniformRandomStream::SetSeed((int)(this + 0x15c));
if (param_4 != *(int *)(this + 0x6c)) {
(**(code **)(*(int *)this + 4))(this,this + 0x6c);
*(int *)(this + 0x6c) = param_4;
}
*(int *)(this + 0x40) = param_4;
iVar1 = (int)((float)((int)((float)param_4 * 182.04445) & 0xffff) * 0.005493164);
if (iVar1 != param_4) {
(**(code **)(*(int *)this + 4))(this,this + 0x6c);
*(int *)(this + 0x6c) = iVar1;
}
if (param_5 != *(float *)(this + 0x70)) {
(**(code **)(*(int *)this + 4))(this,this + 0x70);
*(float *)(this + 0x70) = param_5;
}
this[0xb8] = (CEnvWindShared)0x1;
*(float *)(this + 0x44) = param_5;
*(float *)(this + 0xb4) = param_5;
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.