CTerrorWeapon::CanPlayerTouch
0x0056c680 · 358 bytes · __thiscall
_ZN13CTerrorWeapon14CanPlayerTouchEP9CCSPlayer
Decompiled
undefined (2 params)
/* CTerrorWeapon::CanPlayerTouch(CCSPlayer*) */
undefined4 __thiscall CTerrorWeapon::CanPlayerTouch(CTerrorWeapon *this,CCSPlayer *param_1)
{
code *pcVar1;
uint uVar2;
char cVar3;
int iVar4;
undefined4 uVar5;
CCSPlayer *pCVar6;
int *piVar7;
undefined *puVar8;
if (param_1 != (CCSPlayer *)0x0) {
iVar4 = CBaseEntity::GetTeamNumber((CBaseEntity *)param_1);
cVar3 = IsASurvivorTeam(iVar4);
if ((cVar3 != '\0') && (cVar3 = (**(code **)(*(int *)param_1 + 300))(param_1), cVar3 != '\0')) {
iVar4 = (**(code **)(*(int *)this + 0x638))(this);
if (iVar4 == 1) {
piVar7 = (int *)CCSPlayer::GetCSWeapon(param_1,1);
if (piVar7 == (int *)0x0) {
return 0;
}
cVar3 = (**(code **)(*piVar7 + 0x674))(piVar7);
if (cVar3 != '\0') {
return 0;
}
}
else {
pcVar1 = *(code **)(*(int *)param_1 + 0x484);
uVar5 = (**(code **)(*(int *)this + 0x530))(this);
iVar4 = (*pcVar1)(param_1,uVar5);
if ((iVar4 != 0) && (cVar3 = (**(code **)(*(int *)param_1 + 0x778))(param_1), cVar3 == '\0')
) {
return 0;
}
cVar3 = (**(code **)(*(int *)param_1 + 0x16c))(param_1);
pCVar6 = (CCSPlayer *)0x0;
if (cVar3 != '\0') {
pCVar6 = param_1;
}
cVar3 = (**(code **)(*(int *)pCVar6 + 0x464))(pCVar6,this);
if (cVar3 == '\0') {
return 0;
}
}
pCVar6 = (CCSPlayer *)(**(code **)(*(int *)this + 0x5e0))(this);
if ((((pCVar6 != (CCSPlayer *)0x0) &&
(uVar5 = (**(code **)(*(int *)pCVar6 + 0x16c))(pCVar6), (char)uVar5 != '\0')) &&
(param_1 != pCVar6)) &&
(((uVar2 = *(uint *)(this + 0x179c), uVar2 != 0xffffffff &&
(puVar8 = g_pEntityList + (uVar2 & 0xfff) * 0x10, puVar8 != (undefined *)0xfffffffc)) &&
((*(uint *)(puVar8 + 8) == uVar2 >> 0xc && (param_1 == *(CCSPlayer **)(puVar8 + 4))))))) {
return uVar5;
}
}
}
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.