CWeaponSpawn::WeaponSpawnVisibilityMonitorCallback
0x008d6250 · 363 bytes · __cdecl
_ZN12CWeaponSpawn36WeaponSpawnVisibilityMonitorCallbackEP11CBaseEntityP11CBasePlayer
Decompiled
undefined (2 params)
/* CWeaponSpawn::WeaponSpawnVisibilityMonitorCallback(CBaseEntity*, CBasePlayer*) */
undefined4
CWeaponSpawn::WeaponSpawnVisibilityMonitorCallback(CBaseEntity *param_1,CBasePlayer *param_2)
{
code *pcVar1;
int *piVar2;
int *piVar3;
undefined4 uVar4;
int iVar5;
if (param_1 == (CBaseEntity *)0x0) {
(**(code **)(*gameeventmanager + 0x1c))(gameeventmanager,"weapon_spawn_visible",0,0);
return 0;
}
piVar2 = (int *)__dynamic_cast(param_1,&CBaseEntity::typeinfo,&typeinfo,0);
piVar3 = (int *)(**(code **)(*gameeventmanager + 0x1c))
(gameeventmanager,"weapon_spawn_visible",0,0);
if ((piVar2 != (int *)0x0) && (piVar3 != (int *)0x0)) {
pcVar1 = *(code **)(*piVar3 + 0x30);
uVar4 = (**(code **)(*engine + 0x40))(engine,*(undefined4 *)(param_2 + 0x30));
(*pcVar1)(piVar3,"userid",uVar4);
if (*(int *)(param_1 + 0x30) == 0) {
iVar5 = 0;
}
else {
iVar5 = *(int *)(param_1 + 0x30) - *(int *)(gpGlobals + 0x58) >> 4;
}
(**(code **)(*piVar3 + 0x30))(piVar3,"subject",iVar5);
pcVar1 = *(code **)(*piVar3 + 0x3c);
uVar4 = (**(code **)(*piVar2 + 1000))(piVar2);
(*pcVar1)(piVar3,"weaponname",uVar4);
pcVar1 = *(code **)(*piVar3 + 0x3c);
uVar4 = (**(code **)(*piVar2 + 0x3ec))(piVar2);
(*pcVar1)(piVar3,"subtype",uVar4);
(**(code **)(*gameeventmanager + 0x20))(gameeventmanager,piVar3,0);
return 0;
}
return 0;
}
SourceMod gamedata
paste intoaddons/sourcemod/gamedata/<your_plugin>.txt
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.
Type inference is best-effort from the C signature - sanity-check the DHooks types before shipping.