CPropHealthCabinet::Use
0x004eecf0 · 245 bytes · __cdecl
_ZN18CPropHealthCabinet3UseEP11CBaseEntityS1_8USE_TYPEf
Decompiled
undefined (4 params)
/* CPropHealthCabinet::Use(CBaseEntity*, CBaseEntity*, USE_TYPE, float) */
void CPropHealthCabinet::Use(CDynamicProp *param_1,CBaseEntity *param_2)
{
CBaseEdict *this;
char cVar1;
int iVar2;
if (param_2 != (CBaseEntity *)0x0) {
cVar1 = (**(code **)(*(int *)param_2 + 0x16c))(param_2);
if (cVar1 != '\0') {
iVar2 = CBaseEntity::GetTeamNumber(param_2);
cVar1 = IsASurvivorTeam(iVar2);
if ((cVar1 != '\0') && (param_1[0x15d5] == (CDynamicProp)0x0)) {
if (param_1[0x6c] == (CDynamicProp)0x0) {
this = *(CBaseEdict **)(param_1 + 0x30);
if (this != (CBaseEdict *)0x0) {
*(uint *)this = *(uint *)this | 0x101;
iVar2 = CBaseEdict::GetChangeAccessor(this);
*(undefined2 *)(iVar2 + 2) = 0;
}
}
else {
param_1[0x70] = (CDynamicProp)((byte)param_1[0x70] | 1);
}
param_1[0x15d5] = (CDynamicProp)0x1;
iVar2 = (**(code **)(*(int *)param_1 + 0x340))(param_1,0x330);
CDynamicProp::PropSetSequence(param_1,iVar2);
CBaseEntity::SetCollisionGroup((CBaseEntity *)param_1,4);
CBaseEntity::EmitSound((CBaseEntity *)param_1,"Doors.Medkit_Cabinet",0.0,(float *)0x0);
CDirectorItemManager::OnHealthCabinetOpened
(*(CDirectorItemManager **)(TheDirector + 0x62c),(CBaseEntity *)param_1);
return;
}
}
}
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.