CDirectorChallengeMode::TeamStartTouchIsValid
0x0089a640 · 402 bytes · __thiscall
_ZNK22CDirectorChallengeMode21TeamStartTouchIsValidEP12CBaseTrigger
Decompiled
undefined (2 params)
/* CDirectorChallengeMode::TeamStartTouchIsValid(CBaseTrigger*) const */
CDirectorChallengeMode __thiscall
CDirectorChallengeMode::TeamStartTouchIsValid(CDirectorChallengeMode *this,CBaseTrigger *param_1)
{
CDirectorChallengeMode CVar1;
uint uVar2;
CTerrorPlayer *this_00;
char cVar3;
undefined *puVar4;
int iVar5;
int *piVar6;
int iVar7;
undefined *puVar8;
int iVar9;
uVar2 = *(uint *)(this + 0x13c);
if (((uVar2 == 0xffffffff) ||
(puVar8 = g_pEntityList + (uVar2 & 0xfff) * 0x10, puVar8 == (undefined *)0xfffffffc)) ||
(*(uint *)(puVar8 + 8) != uVar2 >> 0xc)) {
if (param_1 != (CBaseTrigger *)0x0) {
return (CDirectorChallengeMode)0x1;
}
}
else if (param_1 != *(CBaseTrigger **)(puVar8 + 4)) {
return (CDirectorChallengeMode)0x1;
}
CVar1 = this[1];
if ((CVar1 == (CDirectorChallengeMode)0x0) ||
((cVar3 = VIPTarget(), cVar3 == '\0' &&
((this[1] == (CDirectorChallengeMode)0x0 || (cVar3 = HealingGnome(), cVar3 == '\0')))))) {
return (CDirectorChallengeMode)0x1;
}
puVar8 = g_pEntityList;
uVar2 = *(uint *)(this + 0x13c);
if (uVar2 == 0xffffffff) {
return CVar1;
}
puVar4 = g_pEntityList + (uVar2 & 0xfff) * 0x10;
if (puVar4 == (undefined *)0xfffffffc) {
return CVar1;
}
if (*(uint *)(puVar4 + 8) != uVar2 >> 0xc) {
return CVar1;
}
if (*(int *)(puVar4 + 4) == 0) {
return CVar1;
}
iVar5 = __dynamic_cast(*(int *)(puVar4 + 4),&CBaseEntity::typeinfo,&CBaseTrigger::typeinfo,0);
if (iVar5 == 0) {
return CVar1;
}
iVar9 = 0;
if (0 < *(int *)(iVar5 + 0x560)) {
do {
uVar2 = *(uint *)(*(int *)(iVar5 + 0x554) + iVar9 * 4);
if (((uVar2 == 0xffffffff) ||
(puVar8 = puVar8 + (uVar2 & 0xfff) * 0x10, puVar8 == (undefined *)0xfffffffc)) ||
((*(uint *)(puVar8 + 8) != uVar2 >> 0xc ||
(((this_00 = *(CTerrorPlayer **)(puVar8 + 4), this_00 == (CTerrorPlayer *)0x0 ||
(cVar3 = (**(code **)(*(int *)this_00 + 0x16c))(this_00), cVar3 == '\0')) ||
(piVar6 = (int *)CTerrorPlayer::GetActiveTerrorWeapon(this_00), piVar6 == (int *)0x0)))))
) {
if (*(int *)(iVar5 + 0x560) <= iVar9 + 1) {
return (CDirectorChallengeMode)0x0;
}
}
else {
iVar7 = (**(code **)(*piVar6 + 0x638))(piVar6);
if (iVar7 == 0x1b) {
return CVar1;
}
if (*(int *)(iVar5 + 0x560) <= iVar9 + 1) {
return (CDirectorChallengeMode)0x0;
}
}
iVar9 = iVar9 + 1;
puVar8 = g_pEntityList;
} while( true );
}
return (CDirectorChallengeMode)0x0;
}
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.