| 77 | } |
| 78 | |
| 79 | void 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 | |
| 101 | void RulesFix::OnUnload() |
| 102 | { |
no test coverage detected