OverrideMaterialSystemConfig
0x001925b0 · 194 bytes · __cdecl
_Z28OverrideMaterialSystemConfigR23MaterialSystem_Config_t
Decompiled
undefined (1 param)
/* OverrideMaterialSystemConfig(MaterialSystem_Config_t&) */
void OverrideMaterialSystemConfig(MaterialSystem_Config_t *param_1)
{
int *piVar1;
char cVar2;
char *pcVar3;
int iVar4;
int *local_14;
int local_10;
ConVarRef::ConVarRef((ConVarRef *)&local_14,"mat_supportflashlight");
iVar4 = *(int *)(local_10 + 0x30);
if (iVar4 == -1) {
pcVar3 = (char *)COM_GetModDirectory();
iVar4 = _V_stricmp(pcVar3,"portal");
if (iVar4 != 0) {
iVar4 = _V_stricmp(pcVar3,"tf");
if (iVar4 != 0) {
(**(code **)(*local_14 + 8))(local_14,1);
iVar4 = *(int *)(local_10 + 0x30);
goto LAB_001925d9;
}
}
(**(code **)(*local_14 + 8))(local_14,0);
iVar4 = *(int *)(local_10 + 0x30);
}
LAB_001925d9:
piVar1 = materials;
param_1[0x5e] = (MaterialSystem_Config_t)(iVar4 != 0);
cVar2 = (**(code **)(*piVar1 + 0x40))(piVar1,param_1,0);
if (cVar2 != '\0') {
s_bConfigLightingChanged = 1;
}
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.