CDirectorChallengeMode::IsTransitionAllowed
0x0089a530 · 238 bytes · __thiscall
_ZNK22CDirectorChallengeMode19IsTransitionAllowedEv
Decompiled
undefined (1 param)
/* CDirectorChallengeMode::IsTransitionAllowed() const */
undefined4 __thiscall CDirectorChallengeMode::IsTransitionAllowed(CDirectorChallengeMode *this)
{
char cVar1;
CTerrorPlayer *this_00;
int *piVar2;
int iVar3;
int iVar4;
undefined4 uVar5;
if ((this[1] == (CDirectorChallengeMode)0x0) ||
((cVar1 = VIPTarget(), cVar1 == '\0' &&
((this[1] == (CDirectorChallengeMode)0x0 || (cVar1 = HealingGnome(), cVar1 == '\0')))))) {
uVar5 = 1;
}
else {
iVar4 = 1;
do {
this_00 = (CTerrorPlayer *)UTIL_PlayerByIndex(iVar4);
if ((((this_00 != (CTerrorPlayer *)0x0) &&
(uVar5 = (**(code **)(*(int *)this_00 + 0x16c))(this_00), (char)uVar5 != '\0')) &&
(piVar2 = (int *)CTerrorPlayer::GetActiveTerrorWeapon(this_00), piVar2 != (int *)0x0)) &&
(iVar3 = (**(code **)(*piVar2 + 0x638))(piVar2), iVar3 == 0x1b)) {
return uVar5;
}
iVar4 = iVar4 + 1;
} while (iVar4 != 0x21);
uVar5 = 0;
iVar4 = (**(code **)(*gameeventmanager + 0x1c))
(gameeventmanager,"explain_need_gnome_to_continue",0,0);
if (iVar4 != 0) {
(**(code **)(*gameeventmanager + 0x20))(gameeventmanager,iVar4,0);
return 0;
}
}
return uVar5;
}
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.