From 98471092f68c41de98ce97a411d37491837dd946 Mon Sep 17 00:00:00 2001 From: Pavlos Touboulidis Date: Sun, 22 Jun 2014 12:18:13 +0300 Subject: [PATCH] Add /crash dev command Throws an exception and crashes the game. Useful to test the shutdown sequence. --- OpenRA.Mods.RA/Console/DevCommands.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/OpenRA.Mods.RA/Console/DevCommands.cs b/OpenRA.Mods.RA/Console/DevCommands.cs index 0840738410..53d983010a 100644 --- a/OpenRA.Mods.RA/Console/DevCommands.cs +++ b/OpenRA.Mods.RA/Console/DevCommands.cs @@ -40,6 +40,7 @@ namespace OpenRA.Mods.RA register("enabletech", "toggles the ability to build everything."); register("instantcharge", "toggles instant support power charging."); register("all", "toggles all cheats and gives you some cash for your trouble."); + register("crash", "crashes the game"); } public void InvokeCommand(string name, string arg) @@ -80,6 +81,9 @@ namespace OpenRA.Mods.RA IssueDevCommand(world, "DevFastCharge"); IssueDevCommand(world, "DevGiveCash"); break; + + case "crash": + throw new DevException(); } } @@ -87,5 +91,7 @@ namespace OpenRA.Mods.RA { world.IssueOrder(new Order(command, world.LocalPlayer.PlayerActor, false)); } + + class DevException : Exception { } } }