MCPcopy Create free account
hub / github.com/alliedmodders/sourcemod / OnLoad

Method OnLoad

extensions/cstrike/rulesfix.cpp:79–99  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

77}
78
79void RulesFix::OnLoad()
80{
81 const char *patchSize = g_pGameConf->GetKeyValue("MTUPatchSize");
82 if (patchSize != NULL)
83 {
84 iPatchSize = atoi(patchSize);
85 }
86
87 host_rules_show = g_pCVar->FindVar("host_rules_show");
88 if (host_rules_show)
89 {
90 if (SetMTUMax(iPatchSize))
91 {
92 // Default to enabled. Explicit disable via cfg will still be obeyed.
93 host_rules_show->SetValue(true);
94 bPatched = true;
95 }
96 }
97
98 SH_ADD_HOOK(IServerGameDLL, GameServerSteamAPIActivated, gamedll, SH_MEMBER(this, &RulesFix::Hook_GameServerSteamAPIActivated), true);
99}
100
101void RulesFix::OnUnload()
102{

Callers 1

SDK_OnLoadMethod · 0.80

Calls 3

SetMTUMaxFunction · 0.85
SetValueMethod · 0.80
GetKeyValueMethod · 0.45

Tested by

no test coverage detected