CWeaponCSBase::Materialize
0x0043f680 · 205 bytes · __thiscall
_ZN13CWeaponCSBase11MaterializeEv
Decompiled
undefined (1 param)
/* CWeaponCSBase::Materialize() */
void __thiscall CWeaponCSBase::Materialize(CWeaponCSBase *this)
{
uint uVar1;
CBaseEdict *this_00;
int iVar2;
uint *puVar3;
undefined1 local_14 [8];
uVar1 = *(uint *)(this + 0xd4);
if ((uVar1 & 0x20) != 0) {
if (uVar1 == (uVar1 & 0xffffffdf)) {
puVar3 = *(uint **)(this + 0x30);
}
else {
if (this[0x6c] == (CWeaponCSBase)0x0) {
this_00 = *(CBaseEdict **)(this + 0x30);
puVar3 = (uint *)0x0;
if (this_00 != (CBaseEdict *)0x0) {
*(uint *)this_00 = *(uint *)this_00 | 0x101;
iVar2 = CBaseEdict::GetChangeAccessor(this_00);
*(undefined2 *)(iVar2 + 2) = 0;
puVar3 = *(uint **)(this + 0x30);
}
}
else {
this[0x70] = (CWeaponCSBase)((byte)this[0x70] | 1);
puVar3 = *(uint **)(this + 0x30);
}
*(uint *)(this + 0xd4) = uVar1 & 0xffffffdf;
}
if (puVar3 != (uint *)0x0) {
*puVar3 = *puVar3 | 0x80;
}
CBaseEntity::DispatchUpdateTransmitState((CBaseEntity *)this);
CBaseAnimating::DoMuzzleFlash((CBaseAnimating *)this);
}
CCollisionProperty::SetSolidFlags
((CCollisionProperty *)(this + 0x194),(uint)(*(ushort *)(this + 0x1b4) | 8));
CBaseEntity::ThinkSet((_func_void *)local_14,(float)this,(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.