CFire::Init
0x0069eef0 · 581 bytes · __thiscall
_ZN5CFire4InitERK6Vectorfffii
Decompiled
undefined (7 params)
/* CFire::Init(Vector const&, float, float, float, int, int) */
void __thiscall
CFire::Init(CFire *this,Vector *param_1,float param_2,float param_3,float param_4,int param_5,
int param_6)
{
CBaseEdict *pCVar1;
int iVar2;
undefined *puVar3;
uint uVar4;
float local_68;
float local_64;
float local_60;
float local_5c;
float local_58;
float local_54;
float local_50;
float local_4c;
float local_48;
float local_44;
float local_40;
float local_3c;
float local_38;
float local_34;
float local_30;
*(float *)(this + 0x474) = param_3;
if (param_5 != *(int *)(this + 0x148)) {
if (this[0x6c] == (CFire)0x0) {
pCVar1 = *(CBaseEdict **)(this + 0x30);
if (pCVar1 != (CBaseEdict *)0x0) {
*(uint *)pCVar1 = *(uint *)pCVar1 | 0x101;
iVar2 = CBaseEdict::GetChangeAccessor(pCVar1);
*(undefined2 *)(iVar2 + 2) = 0;
}
}
else {
this[0x70] = (CFire)((byte)this[0x70] | 1);
}
*(int *)(this + 0x148) = param_5;
}
*(int *)(this + 0x448) = param_6;
if ((param_5 & 1U) == 0) {
*(float *)(this + 0x44c) = param_4;
if ((param_4 != 0.0) &&
(uVar4 = *(uint *)(this + 0x148) | 0x80, *(uint *)(this + 0x148) != uVar4)) {
if (this[0x6c] == (CFire)0x0) {
pCVar1 = *(CBaseEdict **)(this + 0x30);
if (pCVar1 != (CBaseEdict *)0x0) {
*(uint *)pCVar1 = *(uint *)pCVar1 | 0x101;
iVar2 = CBaseEdict::GetChangeAccessor(pCVar1);
*(undefined2 *)(iVar2 + 2) = 0;
}
}
else {
this[0x70] = (CFire)((byte)this[0x70] | 1);
}
*(uint *)(this + 0x148) = uVar4;
}
}
else {
*(undefined4 *)(this + 0x44c) = 0;
}
local_68 = *(float *)param_1;
local_64 = *(float *)(param_1 + 4);
local_60 = *(float *)(param_1 + 8);
uVar4 = *(uint *)(this + 0x188);
if ((((uVar4 != 0xffffffff) &&
(puVar3 = g_pEntityList + (uVar4 & 0xfff) * 0x10, puVar3 != (undefined *)0xfffffffc)) &&
(*(uint *)(puVar3 + 8) == uVar4 >> 0xc)) &&
(*(CBaseEntity **)(puVar3 + 4) != (CBaseEntity *)0x0)) {
EntityMatrix::InitFromEntity((EntityMatrix *)&local_5c,*(CBaseEntity **)(puVar3 + 4),0);
local_50 = *(float *)param_1 - local_50;
local_40 = *(float *)(param_1 + 4) - local_40;
local_30 = *(float *)(param_1 + 8) - local_30;
local_60 = local_44 * local_40 + local_54 * local_50 + local_34 * local_30;
local_64 = local_48 * local_40 + local_58 * local_50 + local_38 * local_30;
local_68 = local_40 * local_4c + local_50 * local_5c + local_30 * local_3c;
}
UTIL_SetOrigin((CBaseEntity *)this,(Vector *)&local_68,false);
CCollisionProperty::SetSolid((CCollisionProperty *)(this + 0x194),0);
*(float *)(this + 0x458) = param_2;
*(float *)(this + 0x46c) = param_2 * 0.25;
if (((byte)this[0x148] & 8) != 0) {
*(float *)(this + 0x460) = param_2 * 0.25;
}
*(undefined4 *)(this + 0x470) = 0;
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.