SurvivorDispatchEnemy::UpdateWeaponReady
0x0091e090 · 541 bytes · __thiscall
_ZN21SurvivorDispatchEnemy17UpdateWeaponReadyEP11SurvivorBotf
Decompiled
undefined (3 params)
/* SurvivorDispatchEnemy::UpdateWeaponReady(SurvivorBot*, float) */
SurvivorDispatchEnemy * __thiscall
SurvivorDispatchEnemy::UpdateWeaponReady
(SurvivorDispatchEnemy *this,SurvivorBot *param_1,float param_2)
{
uint uVar1;
char cVar2;
int *piVar3;
undefined *puVar4;
longdouble lVar5;
undefined4 local_20;
lVar5 = (longdouble)CountdownTimer::Now();
if (*(float *)(param_1 + 0x40) <= (float)lVar5) {
*(undefined4 *)this = 3;
*(undefined4 *)(this + 4) = 0;
*(char **)(this + 8) = "Timeout";
return this;
}
uVar1 = *(uint *)(param_1 + 0x34);
if ((((uVar1 != 0xffffffff) &&
(puVar4 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar4 != (undefined *)0xfffffffc)) &&
(*(uint *)(puVar4 + 8) == uVar1 >> 0xc)) &&
((piVar3 = *(int **)(puVar4 + 4), piVar3 != (int *)0x0 &&
(cVar2 = (**(code **)(*piVar3 + 300))(piVar3), cVar2 != '\0')))) {
cVar2 = (**(code **)(*(int *)param_2 + 300))(param_2);
if ((cVar2 != '\0') &&
((cVar2 = (**(code **)(*(int *)param_2 + 0x550))(param_2), cVar2 == '\0' &&
(cVar2 = CTerrorPlayer::IsDominatedBySpecialInfected((CTerrorPlayer *)param_2),
cVar2 == '\0')))) {
cVar2 = CTerrorPlayer::IsActionBeingPerformedOnMe((CTerrorPlayer *)param_2,0);
if ((cVar2 != '\0') &&
(cVar2 = CTerrorPlayer::IsPerformingActionOnSelf((CTerrorPlayer *)param_2,0), cVar2 == '\0'
)) {
*(undefined4 *)this = 3;
*(undefined4 *)(this + 4) = 0;
*(char **)(this + 8) = "Someone is healing me or giving me ammo";
return this;
}
piVar3 = (int *)(**(code **)(*(int *)param_2 + 0x9a4))(param_2);
local_20 = 0;
uVar1 = *(uint *)(param_1 + 0x34);
if (((uVar1 != 0xffffffff) &&
(puVar4 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar4 != (undefined *)0xfffffffc)) &&
(*(uint *)(puVar4 + 8) == uVar1 >> 0xc)) {
local_20 = *(undefined4 *)(puVar4 + 4);
}
(**(code **)(*piVar3 + 0xc4))
(piVar3,local_20,3,0x3fc00000,0,"Dispatching an enemy",1,0x3e800000);
if (param_1[0x44] == (SurvivorBot)0x0) {
(**(code **)(*(int *)param_2 + 0x938))(param_2,0xbf800000);
param_1[0x44] = (SurvivorBot)0x1;
}
else {
(**(code **)(*(int *)param_2 + 0x93c))(param_2);
param_1[0x44] = (SurvivorBot)0x0;
}
*(undefined4 *)this = 0;
*(undefined4 *)(this + 4) = 0;
*(undefined4 *)(this + 8) = 0;
return this;
}
*(undefined4 *)this = 3;
*(undefined4 *)(this + 4) = 0;
*(char **)(this + 8) = "I am dead, dying, or at the mercy of the infected";
return this;
}
*(undefined4 *)this = 3;
*(undefined4 *)(this + 4) = 0;
*(char **)(this + 8) = "Target is dispatched";
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.