CShower::Spawn
0x00699a70 · 489 bytes · __thiscall
_ZN7CShower5SpawnEv
Decompiled
undefined (1 param)
/* CShower::Spawn() */
void __thiscall CShower::Spawn(CShower *this)
{
int iVar1;
longdouble lVar2;
float local_24;
float local_20;
float local_1c;
float local_18;
float local_14;
float local_10;
AngleVectors((QAngle *)(this + 0x3a8),(Vector *)&local_24);
lVar2 = (longdouble)(**(code **)(*random_valve + 4))(random_valve,0x43480000,0x43960000);
local_18 = (float)lVar2;
local_14 = local_20 * local_18;
local_10 = local_1c * local_18;
local_18 = local_18 * local_24;
lVar2 = (longdouble)(**(code **)(*random_valve + 4))(random_valve,0xc2c80000,0x42c80000);
local_18 = (float)lVar2 + local_18;
lVar2 = (longdouble)(**(code **)(*random_valve + 4))(random_valve,0xc2c80000,0x42c80000);
local_14 = (float)lVar2 + local_14;
if (local_10 < 0.0) {
local_10 = local_10 - 200.0;
}
else {
local_10 = local_10 + 200.0;
}
CBaseEntity::SetAbsVelocity((CBaseEntity *)this,(Vector *)&local_18);
CBaseEntity::SetMoveType((CBaseEntity *)this,5,1);
lVar2 = (longdouble)UTIL_ScaleForGravity(400.0);
iVar1 = gpGlobals;
*(float *)(this + 0x2c0) = (float)lVar2;
CBaseEntity::SetNextThink((CBaseEntity *)this,*(float *)(iVar1 + 0xc) + 0.1,(char *)0x0);
CCollisionProperty::SetSolid((CCollisionProperty *)(this + 0x194),0);
UTIL_SetSize((CBaseEntity *)this,(Vector *)&vec3_origin,(Vector *)&vec3_origin);
CBaseEntity::AddEffects((CBaseEntity *)this,0x20);
lVar2 = (longdouble)(**(code **)(*random_valve + 4))(random_valve,0x3f000000,0x3fc00000);
*(float *)(this + 0x11c) = (float)lVar2;
CBaseEntity::SetLocalAngles((CBaseEntity *)this,(QAngle *)&vec3_angle);
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.