CRotorWashShooter::DoWashPush
0x00670960 · 565 bytes · __thiscall
_ZN17CRotorWashShooter10DoWashPushEfRK6Vector
Decompiled
undefined (3 params)
/* CRotorWashShooter::DoWashPush(float, Vector const&) */
undefined4 __thiscall
CRotorWashShooter::DoWashPush(CRotorWashShooter *this,float param_1,Vector *param_2)
{
float fVar1;
int iVar2;
undefined4 uVar3;
longdouble lVar4;
float fVar5;
undefined1 local_24 [12];
float local_18;
float local_14;
float local_10;
iVar2 = gpGlobals;
if ((param_1 != *(float *)(this + 0x498)) ||
(*(float *)(this + 0x49c) < *(float *)(gpGlobals + 0xc) ||
*(float *)(this + 0x49c) == *(float *)(gpGlobals + 0xc))) {
fVar5 = *(float *)(this + 0x490);
*(float *)(this + 0x498) = param_1;
fVar1 = *(float *)(iVar2 + 0xc);
lVar4 = (longdouble)(**(code **)(*random_valve + 4))(random_valve,0xbf800000,0x3f800000);
iVar2 = gpGlobals;
fVar5 = (float)lVar4 * *(float *)(this + 0x494) + fVar5 + fVar1;
*(float *)(this + 0x49c) = fVar5;
if (fVar5 <= *(float *)(iVar2 + 0xc)) {
*(float *)(this + 0x49c) = *(float *)(iVar2 + 0xc) + 0.01;
}
local_18 = *(float *)param_2;
local_14 = *(float *)(param_2 + 4);
local_10 = *(float *)(param_2 + 8);
VectorNormalize((Vector *)&local_18);
lVar4 = (longdouble)(**(code **)(*random_valve + 4))(random_valve,0xbf800000,0x3f800000);
local_18 = (float)lVar4 * *(float *)(this + 0x464) + local_18;
lVar4 = (longdouble)(**(code **)(*random_valve + 4))(random_valve,0xbf800000,0x3f800000);
local_14 = (float)lVar4 * *(float *)(this + 0x464) + local_14;
lVar4 = (longdouble)(**(code **)(*random_valve + 4))(random_valve,0xbf800000,0x3f800000);
local_10 = (float)lVar4 * *(float *)(this + 0x464) + local_10;
VectorNormalize((Vector *)&local_18);
uVar3 = CGibShooter::SpawnGib((CGibShooter *)this,(Vector *)&local_18,*(float *)(this + 0x450));
iVar2 = *(int *)(this + 0x440);
*(int *)(this + 0x440) = iVar2 + -1;
if (iVar2 + -1 < 1) {
if (((byte)this[0x148] & 1) != 0) {
*(undefined4 *)(this + 0x440) = *(undefined4 *)(this + 0x444);
return uVar3;
}
CBaseEntity::ThinkSet((_func_void *)local_24,(float)this,(char *)CBaseEntity::SUB_Remove);
CBaseEntity::SetNextThink((CBaseEntity *)this,*(float *)(gpGlobals + 0xc),(char *)0x0);
}
}
else {
uVar3 = 0;
}
return uVar3;
}
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.