- 🔄 Automatic map reload via
map(orhost_workshop_mapfor workshop maps) when tick drift conditions are likely - 🧩 Workshop-aware — uses
host_workshop_map <workshopId>when the current map has a workshop ID, otherwise falls back tomap <mapName> - ⏱️ Configurable map-age threshold (defaults to 1 hour)
- 👤 Triggers only when exactly one human player is on the server (zero disruption to active sessions)
This plugin exposes no chat or console commands. It operates passively in the background.
Config file: addons/swiftlys2/plugins/MapRestart/config.jsonc
| Setting | Type | Default | Description |
|---|---|---|---|
DetailedLogging |
bool | false |
Enable verbose informational logging for diagnostics. Warnings and errors are always logged. |
MapRestartThresholdMinutes |
int | 60 |
Minimum map age (in minutes) before a restart can be triggered. |
{
"MapRestart": {
"DetailedLogging": false,
"MapRestartThresholdMinutes": 60
}
}CS2 servers develop "tick drift" when a map stays loaded for extended periods. This plugin reloads the map to reset tick state, but only when no active session would be disrupted.
On OnMapLoad, the plugin records the map name and timestamp. On OnClientPutInServer, it checks whether the map has exceeded MapRestartThresholdMinutes. If so, it waits 2 seconds and counts non-bot players — if exactly one human is present, the map is reloaded via host_workshop_map <workshopId> (workshop maps) or map <mapName> (built-in maps).
OnMapLoad → store map + timestamp
│
▼
OnClientPutInServer
│
└─ map age ≥ threshold → wait 2s → humans == 1 → reload map
- Open the project in your preferred .NET IDE (Visual Studio, Rider, VS Code).
- Run
dotnet build. Output DLL and resources are placed inbuild/. - Run
dotnet publish -c Releaseto produce a distributable zip inbuild/.