Ping measurement and display (console: ping)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-09-26 22:45:11 +02:00
co-authored by Claude Opus 5.5
parent b408be7559
commit 6d349399ab
4 changed files with 76 additions and 2 deletions
+7
View File
@@ -13,6 +13,7 @@ namespace MSCO
"disconnect - leave the server / game\n" +
"host [port] / join <ip> [port] - direct LAN game (no Steam)\n" +
"save - save the game (host / singleplayer)\n" +
"ping [on|off] - show your ping to the server (toggle)\n" +
"/admin - admin menu (kick / ban / teleport / cheats)\n" +
"vehicles | rig - debug info about vehicles / player models\n" +
"debug - toggle sync debug output\n" +
@@ -61,6 +62,12 @@ namespace MSCO
case "save":
mp.SaveGame();
break;
case "ping":
// "ping" schaltet die Anzeige um, "ping on/off" setzt sie
if (args.Length > 1) mp.ShowPing = args[1].ToLower() == "on" || args[1] == "1";
else mp.ShowPing = !mp.ShowPing;
print("Ping: " + mp.PingText + " (display " + (mp.ShowPing ? "on" : "off") + ")");
break;
case "admin":
case "/admin":
mp.OpenAdminMenu();