CTerrorPlayer::PickupObject
0x00998420 · 497 bytes · __thiscall
_ZN13CTerrorPlayer12PickupObjectEP11CBaseEntityb
Decompiled
undefined (3 params)
/* CTerrorPlayer::PickupObject(CBaseEntity*, bool) */
void __thiscall CTerrorPlayer::PickupObject(CTerrorPlayer *this,CBaseEntity *param_1,bool param_2)
{
char cVar1;
int iVar2;
undefined4 *puVar3;
int iVar4;
CBaseEntity *pCVar5;
char *pcVar6;
undefined4 *puVar7;
char *local_20;
puVar7 = (undefined4 *)&stack0xffffffb4;
iVar2 = CBaseEntity::GetTeamNumber((CBaseEntity *)this);
cVar1 = IsASurvivorTeam(iVar2);
if (cVar1 == '\0') {
return;
}
if (param_1 == (CBaseEntity *)0x0) {
*(undefined4 *)(this + 0x2bb0) = 0xffffffff;
}
else {
puVar3 = (undefined4 *)(**(code **)(*(int *)param_1 + 0xc))();
*(undefined4 *)(this + 0x2bb0) = *puVar3;
}
pcVar6 = *(char **)(param_1 + 0x7c);
if (pcVar6 == (char *)0x0) {
pcVar6 = "";
LAB_00998473:
iVar2 = _V_stricmp(pcVar6,"prop_physics");
if (iVar2 != 0) goto LAB_00998487;
}
else if (pcVar6 != "prop_physics") goto LAB_00998473;
(**(code **)(*(int *)param_1 + 0x20))();
puVar7 = (undefined4 *)&stack0xffffffb0;
if (local_20 == (char *)0x0) {
local_20 = "";
}
iVar2 = 0;
do {
iVar4 = CTerrorWeaponInfo::GetWeaponInfo();
if ((iVar4 != 0) &&
(((char *)(iVar4 + 0xf6) == local_20 ||
(iVar4 = _V_stricmp((char *)(iVar4 + 0xf6),local_20), iVar4 == 0)))) {
iVar2 = (**(code **)(*(int *)this + 0x6c0))();
if (iVar2 == 0) {
return;
}
UTIL_Remove(param_1);
return;
}
iVar2 = iVar2 + 1;
} while (iVar2 != 0x38);
LAB_00998487:
puVar7[2] = param_1;
puVar7[1] = this;
*puVar7 = *(undefined4 *)(TheDirector + 0x648);
puVar7[-1] = 0x9984a2;
cVar1 = CDirectorChallengeMode::CanPickupObject
((CDirectorChallengeMode *)*puVar7,(CTerrorPlayer *)puVar7[1],
(CBaseEntity *)puVar7[2]);
if (cVar1 != '\0') {
*puVar7 = this;
puVar7[-1] = 0x998598;
pCVar5 = (CBaseEntity *)CBaseEntity::GetGroundEntity((CBaseEntity *)*puVar7);
if (param_1 != pCVar5) {
*puVar7 = this;
puVar7[-1] = 0x9985a8;
iVar2 = CBaseEntity::GetGroundEntity((CBaseEntity *)*puVar7);
if (iVar2 != 0) {
if (param_2) {
puVar7[2] = 0x43000000;
puVar7[1] = 0x420c0000;
*puVar7 = param_1;
puVar7[-1] = 0x9985ce;
cVar1 = CBasePlayer::CanPickupObject
((CBaseEntity *)*puVar7,(float)puVar7[1],(float)puVar7[2]);
if (cVar1 == '\0') {
return;
}
}
*puVar7 = param_1;
puVar7[-1] = 0x9985de;
cVar1 = CBaseEntity::HasNPCsOnIt((CBaseEntity *)*puVar7);
if (cVar1 == '\0') {
puVar7[3] = 0;
puVar7[2] = &CWeaponCSBase::typeinfo;
puVar7[1] = &CBaseEntity::typeinfo;
*puVar7 = param_1;
puVar7[-1] = 0x998606;
iVar2 = __dynamic_cast();
if (iVar2 == 0) {
PlayerPickupObject((CBasePlayer *)this,param_1);
return;
}
}
}
}
}
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.