reload
0x0017db40 · 317 bytes · __cdecl
_ZL6reloadRK8CCommand
Decompiled
undefined (1 param)
/* reload(CCommand const&) */
void reload(CCommand *param_1)
{
char cVar1;
char *pcVar2;
int iVar3;
bool bVar4;
if ((DAT_003b7f64 < 2) || (1 < DAT_003b8064)) {
return;
}
cVar1 = (**(code **)(*serverGameDLL + 100))(serverGameDLL);
if (cVar1 == '\0') {
return;
}
if (cmd_source == 1) {
if ((*(int *)param_1 == 2) &&
(iVar3 = _V_stricmp(*(char **)(param_1 + 0x40c),"setpos"), iVar3 == 0)) {
bVar4 = true;
}
else {
bVar4 = false;
}
pcVar2 = "FCVAR_NEVER_AS_STRING";
if ((host_map[0x15] & 0x10) == 0) {
pcVar2 = "";
if (*(char **)(host_map._28_4_ + 0x24) != (char *)0x0) {
pcVar2 = *(char **)(host_map._28_4_ + 0x24);
}
}
cVar1 = CL_HL2Demo_MapCheck(pcVar2);
if (cVar1 != '\0') {
pcVar2 = "FCVAR_NEVER_AS_STRING";
if ((host_map[0x15] & 0x10) == 0) {
pcVar2 = "";
if (*(char **)(host_map._28_4_ + 0x24) != (char *)0x0) {
pcVar2 = *(char **)(host_map._28_4_ + 0x24);
}
}
cVar1 = CL_PortalDemo_MapCheck(pcVar2);
if (cVar1 != '\0') {
pcVar2 = "FCVAR_NEVER_AS_STRING";
if ((host_map[0x15] & 0x10) == 0) {
pcVar2 = "";
if (*(char **)(host_map._28_4_ + 0x24) != (char *)0x0) {
pcVar2 = *(char **)(host_map._28_4_ + 0x24);
}
}
HostState_NewGame(pcVar2,bVar4,false,false);
return;
}
}
pcVar2 = "FCVAR_NEVER_AS_STRING";
if ((host_map[0x15] & 0x10) == 0) {
pcVar2 = "";
if (*(char **)(host_map._28_4_ + 0x24) != (char *)0x0) {
pcVar2 = *(char **)(host_map._28_4_ + 0x24);
}
}
Warning("map load failed: %s not found or invalid\n",pcVar2);
return;
}
return;
}
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.