CChangeChapterIssue::CanCallVote
0x00a05890 · 233 bytes · __thiscall
_ZN19CChangeChapterIssue11CanCallVoteEiPKcPc
Decompiled
undefined (4 params)
/* CChangeChapterIssue::CanCallVote(int, char const*, char*) */
undefined4 __thiscall
CChangeChapterIssue::CanCallVote(CChangeChapterIssue *this,int param_1,char *param_2,char *param_3)
{
char cVar1;
int *piVar2;
int iVar3;
int iVar4;
undefined4 uVar5;
cVar1 = CBaseTerrorIssue::CanCallVote((CBaseTerrorIssue *)this,param_1,param_2,param_3);
if ((cVar1 == '\0') ||
(((cVar1 = CTerrorGameRules::IsSurvivalMode(), cVar1 == '\0' &&
(cVar1 = CTerrorGameRules::IsScavengeMode(), cVar1 == '\0')) ||
(uVar5 = CBaseTerrorIssue::CanCallVote((CBaseTerrorIssue *)this,param_1,param_2,param_3),
(char)uVar5 == '\0')))) {
uVar5 = 0;
}
else {
piVar2 = (int *)(**(code **)(*g_pMatchFramework + 0x28))(g_pMatchFramework);
iVar3 = (**(code **)(*piVar2 + 4))(piVar2,0);
/* try { // try from 00a05932 to 00a05934 has its CatchHandler @ 00a05987 */
iVar4 = (**(code **)(*g_pMatchExtL4D + 0xc))(g_pMatchExtL4D,iVar3,param_2,0);
if (iVar4 == 0) {
/* try { // try from 00a0597e to 00a05982 has its CatchHandler @ 00a05987 */
V_strncpy(param_3,"Not a valid chapter context.",0x60);
uVar5 = 0;
}
if (iVar3 != 0) {
KeyValues::deleteThis();
}
}
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.