COM_CreatePath
0x00126610 · 143 bytes · __cdecl
_Z14COM_CreatePathPKc
Decompiled
undefined (1 param)
/* COM_CreatePath(char const*) */
void COM_CreatePath(char *param_1)
{
char *pcVar1;
int in_GS_OFFSET;
char local_220;
char local_21f [511];
int local_20;
local_20 = *(int *)(in_GS_OFFSET + 0x14);
V_strncpy(&local_220,param_1,0x200);
pcVar1 = local_21f;
while (local_21f[0] != '\0') {
while ((local_21f[0] != '\\' && (local_21f[0] != '/'))) {
pcVar1 = pcVar1 + 1;
local_21f[0] = *pcVar1;
if (local_21f[0] == '\0') goto LAB_0012668c;
}
*pcVar1 = '\0';
Sys_mkdir(&local_220);
*pcVar1 = local_21f[0];
local_21f[0] = pcVar1[1];
pcVar1 = pcVar1 + 1;
}
LAB_0012668c:
if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
return;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
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.