SurvivorReviveFriend::Update
0x00935260 · 377 bytes · __thiscall
_ZN20SurvivorReviveFriend6UpdateEP11SurvivorBotf
Decompiled
undefined (3 params)
/* SurvivorReviveFriend::Update(SurvivorBot*, float) */
SurvivorReviveFriend * __thiscall
SurvivorReviveFriend::Update(SurvivorReviveFriend *this,SurvivorBot *param_1,float param_2)
{
uint uVar1;
int *piVar2;
code *pcVar3;
char cVar4;
int *piVar5;
float *pfVar6;
undefined4 uVar7;
undefined *puVar8;
float fVar9;
float fVar10;
float fVar11;
piVar5 = (int *)(**(code **)(*(int *)param_2 + 0x9a4))(param_2);
uVar1 = *(uint *)(param_1 + 0x34);
if ((((uVar1 != 0xffffffff) &&
(puVar8 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar8 != (undefined *)0xfffffffc)) &&
(*(uint *)(puVar8 + 8) == uVar1 >> 0xc)) &&
(piVar2 = *(int **)(puVar8 + 4), piVar2 != (int *)0x0)) {
cVar4 = (**(code **)(*(int *)param_1 + 0x16c))(param_1,param_2);
if (cVar4 != '\0') {
pcVar3 = *(code **)(*piVar5 + 0xc0);
uVar7 = (**(code **)(*piVar2 + 0x288))(piVar2);
(*pcVar3)(piVar5,uVar7,3,0x3dcccccd,0,"Looking at friend we are rescuing",1,0x3e800000);
}
pfVar6 = (float *)(**(code **)(*(int *)param_1 + 0x160))(param_1,param_2,piVar2);
if ((*(byte *)((int)param_2 + 0x14d) & 8) != 0) {
CBaseEntity::CalcAbsolutePosition((CBaseEntity *)param_2);
}
fVar9 = *(float *)((int)param_2 + 0x2e0) - *pfVar6;
fVar11 = *(float *)((int)param_2 + 0x2e4) - pfVar6[1];
fVar10 = *(float *)((int)param_2 + 0x2e8) - pfVar6[2];
if (fVar9 * fVar9 + fVar11 * fVar11 + fVar10 * fVar10 < 22500.0) {
(**(code **)(*(int *)param_2 + 0x988))(param_2,0xbf800000);
}
}
SurvivorUseObject::Update((SurvivorUseObject *)this,param_1,param_2);
return this;
}
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.