SurvivorDislodgeVictim::OnStartUse
0x0092a600 · 561 bytes · __thiscall
_ZN22SurvivorDislodgeVictim10OnStartUseEP11SurvivorBot
Decompiled
undefined (2 params)
/* SurvivorDislodgeVictim::OnStartUse(SurvivorBot*) */
void __thiscall
SurvivorDislodgeVictim::OnStartUse(SurvivorDislodgeVictim *this,SurvivorBot *param_1)
{
SurvivorBot *pSVar1;
uint uVar2;
CBaseEntity *this_00;
char cVar3;
int *piVar4;
int iVar5;
undefined *puVar6;
longdouble lVar7;
undefined4 local_20;
if (this[0x68] == (SurvivorDislodgeVictim)0x0) {
piVar4 = (int *)(**(code **)(*(int *)param_1 + 0x9a4))(param_1);
local_20 = 0;
uVar2 = *(uint *)(this + 0x34);
if (((uVar2 != 0xffffffff) &&
(puVar6 = g_pEntityList + (uVar2 & 0xfff) * 0x10, puVar6 != (undefined *)0xfffffffc)) &&
(*(uint *)(puVar6 + 8) == uVar2 >> 0xc)) {
local_20 = *(undefined4 *)(puVar6 + 4);
}
(**(code **)(*piVar4 + 0xc4))
(piVar4,local_20,4,0x3f800000,&g_SurvivorBotAttackOnReply,
"Trying to dislodge by attacking",1,0x3e800000);
}
else {
piVar4 = (int *)(**(code **)(*(int *)param_1 + 0x9a4))();
local_20 = 0;
uVar2 = *(uint *)(this + 0x34);
if (((uVar2 != 0xffffffff) &&
(puVar6 = g_pEntityList + (uVar2 & 0xfff) * 0x10, puVar6 != (undefined *)0xfffffffc)) &&
(*(uint *)(puVar6 + 8) == uVar2 >> 0xc)) {
local_20 = *(undefined4 *)(puVar6 + 4);
}
(**(code **)(*piVar4 + 0xc4))
(piVar4,local_20,4,0x3f800000,&g_SurvivorBotMeleeOnReply,
"Dislodging enemy from my friend!",1,0x3e800000);
uVar2 = *(uint *)(this + 0x34);
if (((uVar2 != 0xffffffff) &&
(puVar6 = g_pEntityList + (uVar2 & 0xfff) * 0x10, puVar6 != (undefined *)0xfffffffc)) &&
((*(uint *)(puVar6 + 8) == uVar2 >> 0xc &&
(this_00 = *(CBaseEntity **)(puVar6 + 4), this_00 != (CBaseEntity *)0x0)))) {
iVar5 = CBaseEntity::GetTeamNumber(this_00);
cVar3 = IsASurvivorTeam(iVar5);
if ((cVar3 != '\0') && (*(uint *)(this_00 + 0x2ba0) < 8)) {
pSVar1 = param_1 + *(uint *)(this_00 + 0x2ba0) * 0xc + 0x1ab10;
lVar7 = (longdouble)CountdownTimer::Now();
if ((float)lVar7 + 10.0 != *(float *)(pSVar1 + 8)) {
(**(code **)(*(int *)pSVar1 + 4))(pSVar1,pSVar1 + 8);
*(float *)(pSVar1 + 8) = (float)lVar7 + 10.0;
}
if (*(float *)(pSVar1 + 4) != 10.0) {
(**(code **)(*(int *)pSVar1 + 4))(pSVar1,pSVar1 + 4);
*(int *)(pSVar1 + 4) = 0x41200000;
}
}
}
}
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.