CDirectorChallengeMode::CanPickupObject
0x0089e0a0 · 360 bytes · __thiscall
_ZN22CDirectorChallengeMode15CanPickupObjectEP13CTerrorPlayerP11CBaseEntity
Decompiled
undefined (3 params)
/* CDirectorChallengeMode::CanPickupObject(CTerrorPlayer*, CBaseEntity*) */
uint __thiscall
CDirectorChallengeMode::CanPickupObject
(CDirectorChallengeMode *this,CTerrorPlayer *param_1,CBaseEntity *param_2)
{
undefined4 *puVar1;
int iVar2;
uint uVar3;
void *local_34 [2];
undefined2 local_2c;
ushort local_2a;
void *local_28;
undefined4 local_24;
undefined2 local_20;
ushort local_1e;
if (this[1] != (CDirectorChallengeMode)0x0) {
puVar1 = (undefined4 *)CDirector::GetScriptScope(TheDirector,3);
iVar2 = (**(code **)(*g_pScriptVM + 0x48))(g_pScriptVM,"CanPickupObject",*puVar1,0);
(**(code **)(*g_pScriptVM + 0x4c))(g_pScriptVM,iVar2);
if (iVar2 != 0) {
local_2c = 0;
local_2a = 0;
local_34[0] = (void *)0x0;
if (param_2 == (CBaseEntity *)0x0) {
local_28 = (void *)0x0;
}
else {
/* try { // try from 0089e135 to 0089e139 has its CatchHandler @ 0089e217 */
local_28 = (void *)CBaseEntity::GetScriptInstance(param_2);
}
local_1e = 0;
local_24 = 0;
local_20 = 0x20;
/* try { // try from 0089e17c to 0089e1cd has its CatchHandler @ 0089e22c */
iVar2 = (**(code **)(*g_pScriptVM + 0x48))(g_pScriptVM,"CanPickupObject",*puVar1,0);
if (iVar2 != 0) {
(**(code **)(*g_pScriptVM + 0x50))
(g_pScriptVM,iVar2,&local_28,1,local_34,*puVar1,1,&local_28);
(**(code **)(*g_pScriptVM + 0x4c))(g_pScriptVM,iVar2);
}
if ((local_1e & 1) != 0) {
free(local_28);
}
uVar3 = (uint)local_34[0] & 0xff;
if ((local_2a & 1) == 0) {
return uVar3;
}
free(local_34[0]);
return uVar3;
}
}
return 0;
}
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.