CFuelBarrelPiece::Create
0x00904580 · 392 bytes · __cdecl
_ZN16CFuelBarrelPiece6CreateERK6VectorRK6QAngle8string_tS6_
Decompiled
undefined (4 params)
/* CFuelBarrelPiece::Create(Vector const&, QAngle const&, string_t, string_t) */
CBaseEntity *
CFuelBarrelPiece::Create(Vector *param_1,QAngle *param_2,undefined1 *param_3,int param_4)
{
CBaseEdict *this;
CBaseEntity *this_00;
undefined1 *puVar1;
int iVar2;
int iVar3;
CBaseEntity *this_01;
undefined4 *puVar4;
this_00 = (CBaseEntity *)
CBaseEntity::CreateNoSpawn("prop_fuel_barrel_piece",param_1,param_2,(CBaseEntity *)0x0);
if (this_00 == (CBaseEntity *)0x0) {
this_00 = (CBaseEntity *)0x0;
}
else {
*(undefined1 **)(this_00 + 0x260) = param_3;
CBaseEntity::DispatchUpdateTransmitState(this_00);
puVar1 = &DAT_00d539c2;
if (param_3 != (undefined1 *)0x0) {
puVar1 = param_3;
}
iVar2 = (**(code **)(*soundemitterbase + 0x88))(soundemitterbase,puVar1);
if (iVar2 != *(int *)(this_00 + 0xf4)) {
if (this_00[0x6c] == (CBaseEntity)0x0) {
this = *(CBaseEdict **)(this_00 + 0x30);
if (this != (CBaseEdict *)0x0) {
*(uint *)this = *(uint *)this | 0x101;
iVar3 = CBaseEdict::GetChangeAccessor(this);
*(undefined2 *)(iVar3 + 2) = 0;
}
}
else {
this_00[0x70] = (CBaseEntity)((byte)this_00[0x70] | 1);
}
*(int *)(this_00 + 0xf4) = iVar2;
}
DispatchSpawn(this_00,true);
if (param_4 != 0) {
this_01 = (CBaseEntity *)CreateEntityByName("info_particle_system",-1,true);
if (this_01 != (CBaseEntity *)0x0) {
(**(code **)(*(int *)this_01 + 0x84))(this_01,"start_active",&DAT_00cbe2d5);
(**(code **)(*(int *)this_01 + 0x84))(this_01,"effect_name",param_4);
(**(code **)(*(int *)this_01 + 0x98))(this_01,this_00,0xffffffff);
CBaseEntity::SetLocalOrigin(this_01,(Vector *)&vec3_origin);
CBaseEntity::SetLocalAngles(this_01,(QAngle *)&vec3_angle);
DispatchSpawn(this_01,true);
(**(code **)(*(int *)this_01 + 0x94))(this_01);
puVar4 = (undefined4 *)(**(code **)(*(int *)this_01 + 0xc))(this_01);
*(undefined4 *)(this_00 + 0x1688) = *puVar4;
}
}
}
return this_00;
}
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.