CEnvWind::Spawn
0x0066c7f0 · 455 bytes · __thiscall
_ZN8CEnvWind5SpawnEv
Decompiled
undefined (1 param)
/* CEnvWind::Spawn() */
void __thiscall CEnvWind::Spawn(CEnvWind *this)
{
CEnvWindShared *this_00;
int iVar1;
undefined1 local_24 [20];
this_00 = (CEnvWindShared *)(this + 0x440);
(**(code **)(*(int *)this + 0x6c))(this);
CCollisionProperty::SetSolid((CCollisionProperty *)(this + 0x194),0);
CBaseEntity::AddEffects((CBaseEntity *)this,0x20);
iVar1 = (int)((float)((int)((float)*(int *)(this + 0x4ac) * 182.04445) & 0xffff) * 0.005493164);
if (*(int *)(this + 0x4ac) != iVar1) {
(**(code **)(*(int *)(this + 0x440) + 4))(this_00,this + 0x4ac);
*(int *)(this + 0x4ac) = iVar1;
}
if (*(int *)(this + 0x30) == 0) {
iVar1 = 0;
}
else {
iVar1 = *(int *)(this + 0x30) - *(int *)(gpGlobals + 0x58) >> 4;
}
CEnvWindShared::Init
(this_00,iVar1,0,*(float *)(gpGlobals + 0xc),(int)*(float *)(this + 0x3ac),0.0);
if (((byte)this[0x14d] & 8) != 0) {
CBaseEntity::CalcAbsolutePosition((CBaseEntity *)this);
}
if (((*(float *)(this + 0x2e0) != *(float *)(this + 0x470)) ||
(*(float *)(this + 0x2e4) != *(float *)(this + 0x474))) ||
(*(float *)(this + 0x2e8) != *(float *)(this + 0x478))) {
(**(code **)(*(int *)(this + 0x440) + 4))(this_00,this + 0x470);
*(undefined4 *)(this + 0x470) = *(undefined4 *)(this + 0x2e0);
*(undefined4 *)(this + 0x474) = *(undefined4 *)(this + 0x2e4);
*(undefined4 *)(this + 0x478) = *(undefined4 *)(this + 0x2e8);
}
CBaseEntity::ThinkSet((_func_void *)local_24,(float)this,(char *)WindThink);
CBaseEntity::SetNextThink((CBaseEntity *)this,*(float *)(gpGlobals + 0xc),(char *)0x0);
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.