SurvivorGivePillsToFriend::OnStartUse
0x00932800 · 264 bytes · __thiscall
_ZN25SurvivorGivePillsToFriend10OnStartUseEP11SurvivorBot
Decompiled
undefined (2 params)
/* SurvivorGivePillsToFriend::OnStartUse(SurvivorBot*) */
void __thiscall
SurvivorGivePillsToFriend::OnStartUse(SurvivorGivePillsToFriend *this,SurvivorBot *param_1)
{
SurvivorBot *pSVar1;
uint uVar2;
CBaseEntity *this_00;
char cVar3;
int iVar4;
undefined *puVar5;
longdouble lVar6;
uVar2 = *(uint *)(this + 0x34);
if ((((uVar2 != 0xffffffff) &&
(puVar5 = g_pEntityList + (uVar2 & 0xfff) * 0x10, puVar5 != (undefined *)0xfffffffc)) &&
(*(uint *)(puVar5 + 8) == uVar2 >> 0xc)) &&
(this_00 = *(CBaseEntity **)(puVar5 + 4), this_00 != (CBaseEntity *)0x0)) {
cVar3 = (**(code **)(*(int *)this_00 + 0x16c))(this_00);
if (cVar3 != '\0') {
iVar4 = CBaseEntity::GetTeamNumber(this_00);
cVar3 = IsASurvivorTeam(iVar4);
if ((cVar3 != '\0') && (*(uint *)(this_00 + 0x2ba0) < 8)) {
pSVar1 = param_1 + *(uint *)(this_00 + 0x2ba0) * 0xc + 0x1ab10;
lVar6 = (longdouble)CountdownTimer::Now();
if ((float)lVar6 + 10.0 != *(float *)(pSVar1 + 8)) {
(**(code **)(*(int *)pSVar1 + 4))(pSVar1,pSVar1 + 8);
*(float *)(pSVar1 + 8) = (float)lVar6 + 10.0;
}
if (*(float *)(pSVar1 + 4) != 10.0) {
(**(code **)(*(int *)pSVar1 + 4))(pSVar1,pSVar1 + 4);
*(int *)(pSVar1 + 4) = 0x41200000;
}
}
}
}
(**(code **)(*(int *)param_1 + 0x940))(param_1,0xbf800000);
SurvivorUseObject::OnStartUse((SurvivorUseObject *)this,param_1);
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.