SurvivorCheckpointLeaving::ShouldPickUp
0x0090add0 · 303 bytes · __thiscall
_ZNK25SurvivorCheckpointLeaving12ShouldPickUpEPK8INextBotP11CBaseEntity
Decompiled
undefined (3 params)
/* SurvivorCheckpointLeaving::ShouldPickUp(INextBot const*, CBaseEntity*) const */
undefined4 __thiscall
SurvivorCheckpointLeaving::ShouldPickUp
(SurvivorCheckpointLeaving *this,INextBot *param_1,CBaseEntity *param_2)
{
int *piVar1;
CTerrorPlayer *pCVar2;
char cVar3;
int iVar4;
int iVar5;
int local_30 [8];
if ((param_2 != (CBaseEntity *)0x0) &&
(((*(char **)(param_2 + 0x7c) == "weapon_first_aid_kit*" ||
(cVar3 = CBaseEntity::ClassMatchesComplex(param_2,"weapon_first_aid_kit*"), cVar3 != '\0'))
&& (this[0x32] != (SurvivorCheckpointLeaving)0x0)))) {
local_30[0] = 0;
local_30[1] = 0;
local_30[2] = 0;
local_30[3] = 0;
local_30[4] = 0;
/* try { // try from 0090ae42 to 0090af07 has its CatchHandler @ 0090af12 */
ForEachSurvivor<SurvivorCollector>((SurvivorCollector *)local_30);
if (0 < local_30[3]) {
iVar5 = 0;
do {
piVar1 = *(int **)(local_30[0] + iVar5 * 4);
cVar3 = (**(code **)(*piVar1 + 0x778))(piVar1);
pCVar2 = *(CTerrorPlayer **)(local_30[0] + iVar5 * 4);
if (((cVar3 == '\0') || (pCVar2[0x4335] != (CTerrorPlayer)0x0)) &&
(((float)*(int *)(pCVar2 + 0x100) < 75.0 ||
(iVar4 = CTerrorPlayer::GetTerrorWeapon(pCVar2,0xc), iVar4 == 0)))) {
if (iVar5 < local_30[3]) {
local_30[3] = 0;
CUtlMemory<CTerrorPlayer*,int>::Purge((CUtlMemory<CTerrorPlayer*,int> *)local_30);
local_30[4] = local_30[0];
CUtlMemory<CTerrorPlayer*,int>::Purge((CUtlMemory<CTerrorPlayer*,int> *)local_30);
return 0;
}
break;
}
iVar5 = iVar5 + 1;
} while (iVar5 < local_30[3]);
}
local_30[3] = 0;
CUtlMemory<CTerrorPlayer*,int>::Purge((CUtlMemory<CTerrorPlayer*,int> *)local_30);
local_30[4] = local_30[0];
CUtlMemory<CTerrorPlayer*,int>::Purge((CUtlMemory<CTerrorPlayer*,int> *)local_30);
}
return 1;
}
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.