SV_ReplicateConVarChange
0x00200380 · 466 bytes · __cdecl
_Z24SV_ReplicateConVarChangePK6ConVarPKc
Decompiled
undefined (2 params)
/* SV_ReplicateConVarChange(ConVar const*, char const*) */
void SV_ReplicateConVarChange(ConVar *param_1,char *param_2)
{
char *pcVar1;
char *pcVar2;
int in_GS_OFFSET;
undefined **local_288;
undefined1 local_284;
undefined4 local_280;
undefined4 local_27c;
undefined4 local_278;
undefined8 local_274;
undefined4 local_26c;
undefined4 local_268;
undefined8 local_264;
undefined4 local_25c;
undefined4 local_258;
undefined1 local_254;
undefined8 local_250;
undefined4 local_248;
undefined4 local_244;
undefined4 local_23c;
undefined4 local_238;
undefined4 local_234;
int local_230;
undefined4 local_22c;
NetMessageCvar_t local_228 [260];
char local_124 [260];
int local_20;
local_20 = *(int *)(in_GS_OFFSET + 0x14);
if ((1 < DAT_003b7f64) && (1 < DAT_003b8064)) {
pcVar1 = (char *)Host_CleanupConVarStringValue(param_2);
pcVar2 = (char *)(**(code **)(*(int *)param_1 + 0x1c))(param_1);
local_27c = 0;
local_278 = 0;
local_274 = 0;
local_26c = 0;
local_268 = 0;
local_264 = 0;
local_25c = 0;
local_258 = 0;
local_254 = 0;
local_250 = 0;
local_248 = 0;
local_244 = 0;
local_284 = 1;
local_280 = 0;
local_288 = &PTR__NET_SetConVar_002a1ca8;
local_23c = 0;
local_238 = 0;
local_234 = 0;
local_230 = 0;
local_22c = 0;
/* try { // try from 002004a5 to 002004df has its CatchHandler @ 0020056e */
V_strncpy((char *)local_228,pcVar2,0x104);
V_strncpy(local_124,pcVar1,0x104);
CUtlVector<NetMessageCvar_t,CUtlMemory<NetMessageCvar_t,int>>::InsertBefore
((CUtlVector<NetMessageCvar_t,CUtlMemory<NetMessageCvar_t,int>> *)&local_23c,local_230
,local_228);
/* try { // try from 00200501 to 00200505 has its CatchHandler @ 00200552 */
CBaseServer::BroadcastMessage((CBaseServer *)&sv,(INetMessage *)&local_288,false,false);
local_288 = &PTR__NET_SetConVar_002a1ca8;
local_230 = 0;
CUtlMemory<NetMessageCvar_t,int>::Purge((CUtlMemory<NetMessageCvar_t,int> *)&local_23c);
local_22c = local_23c;
CUtlMemory<NetMessageCvar_t,int>::Purge((CUtlMemory<NetMessageCvar_t,int> *)&local_23c);
}
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.