From 6dd09d9a531576373854e54769be7614e2b44251 Mon Sep 17 00:00:00 2001
From: jsalmon3 <>
Date: Thu, 13 Jun 2002 16:47:57 +0000
Subject: [PATCH] Added ALT-R, CTRL-R to restart scenario

---
 doc/ChangeLog.html   |  1 +
 doc/freecraft.html   |  2 ++
 src/ui/interface.cpp | 10 ++++++++++
 3 files changed, 13 insertions(+)

diff --git a/doc/ChangeLog.html b/doc/ChangeLog.html
index 1e5ad2b9e..0c0d08116 100644
--- a/doc/ChangeLog.html
+++ b/doc/ChangeLog.html
@@ -852,6 +852,7 @@
     <LI>Fixed bug: #443203: Mouse pointer not updated when scrolling with
 	keyboard (from Nehal Mistry).
     <LI>Fixed bug #568071: Crash after Master-Volume toggle (from ari).
+    <LI>Added ALT-R, CTRL-R to restart the scenario (from Jimmy Salmon).
     </UL>
 </UL>
 
diff --git a/doc/freecraft.html b/doc/freecraft.html
index 50c528d02..e5e0fc52b 100644
--- a/doc/freecraft.html
+++ b/doc/freecraft.html
@@ -254,6 +254,8 @@ freecraft [OPTIONS] [map.pud|map.pud.gz]
     Exit program.
 <LI><KBD>ALT+Q, CTRL+Q</KBD><BR>
     Quit level.
+<LI><KBD>ALT+R, CTRL+R</KBD><BR>
+    Restart scenario.
 <LI><KBD>^</KBD><BR>
     Unselect all units.
 <LI><KBD># (1-9,0)</KBD><BR>
diff --git a/src/ui/interface.cpp b/src/ui/interface.cpp
index 6717ed8ef..631f35076 100644
--- a/src/ui/interface.cpp
+++ b/src/ui/interface.cpp
@@ -861,6 +861,16 @@ local int CommandKey(int key)
 	    GameRunning=0;
 	    break;
 
+	case 'r'&0x1F:
+	case 'r':
+	case 'R':			// ALT+R, CTRL+R: Restart scenario
+	    if( !(KeyModifiers&(ModifierAlt|ModifierControl)) ) {
+		break;
+	    }
+	    RestartScenario=1;
+	    GameRunning=0;
+	    break;
+
 	case '.':
 	case 'i':
 	case 'I':			// ., ALT+I, CTRL+I: Find idle worker