Index: fred.rc
===================================================================
RCS file: /home/fs2source/cvsroot/fs2_open/code/fred2/fred.rc,v
retrieving revision 1.33
diff -u -r1.33 fred.rc
--- fred.rc	30 Dec 2007 18:30:28 -0000	1.33
+++ fred.rc	5 Jan 2008 19:51:34 -0000
@@ -986,6 +986,9 @@
     LTEXT           "Persona",IDC_STATIC,11,258,32,8
     CONTROL         "Use Autopilot Cinematics",IDC_USE_AUTOPILOT_CINEMATICS,
                     "Button",BS_AUTOCHECKBOX | WS_TABSTOP,163,118,123,10
+    CONTROL         "Deactivate Hardcoded Autopilot",
+                    IDC_DEACTIVATE_AUTOPILOT,"Button",BS_AUTOCHECKBOX | 
+                    WS_TABSTOP,163,129,123,10
 END
 
 IDD_PREFERENCES DIALOG DISCARDABLE  0, 0, 333, 81
 
 
Index: missionnotesdlg.cpp
===================================================================
RCS file: /home/fs2source/cvsroot/fs2_open/code/fred2/missionnotesdlg.cpp,v
retrieving revision 1.12
diff -u -r1.12 missionnotesdlg.cpp
--- missionnotesdlg.cpp	23 Jul 2007 15:16:48 -0000	1.12
+++ missionnotesdlg.cpp	5 Jan 2008 19:51:33 -0000
@@ -320,6 +320,7 @@
 	m_no_briefing = FALSE;
 	m_no_debriefing = FALSE;
 	m_autpilot_cinematics = FALSE;
+    m_no_autpilot = FALSE;
 	m_max_hull_repair_val = 0.0f;
 	m_max_subsys_repair_val = 100.0f;
 	m_contrail_threshold = CONTRAIL_THRESHOLD_DEFAULT;
@@ -365,6 +366,7 @@
 	DDX_Check(pDX, IDC_NO_BRIEFING, m_no_briefing);
 	DDX_Check(pDX, IDC_NO_DEBRIEFING, m_no_debriefing);
 	DDX_Check(pDX, IDC_USE_AUTOPILOT_CINEMATICS, m_autpilot_cinematics);
+    DDX_Check(pDX, IDC_DEACTIVATE_AUTOPILOT, m_no_autpilot);
 	DDX_Text(pDX, IDC_MAX_HULL_REPAIR_VAL, m_max_hull_repair_val);
 	DDV_MinMaxFloat(pDX, m_max_hull_repair_val, 0, 100);
 	DDX_Text(pDX, IDC_MAX_SUBSYS_REPAIR_VAL, m_max_subsys_repair_val);
@@ -577,6 +579,13 @@
 	} else {
 		The_mission.flags &= ~MISSION_FLAG_USE_AP_CINEMATICS;
 	}
+    
+    // set autopilot
+	if ( m_no_autpilot ) {
+		The_mission.flags |= MISSION_FLAG_DEACTIVATE_AP;
+	} else {
+		The_mission.flags &= ~MISSION_FLAG_DEACTIVATE_AP;
+	}
 
 	if ( flags != The_mission.flags ){
 		set_modified();
@@ -659,6 +668,7 @@
 	m_no_briefing = (The_mission.flags & MISSION_FLAG_NO_BRIEFING) ? 1 : 0;
 	m_no_debriefing = (The_mission.flags & MISSION_FLAG_NO_DEBRIEFING) ? 1 : 0;
 	m_autpilot_cinematics = (The_mission.flags & MISSION_FLAG_USE_AP_CINEMATICS) ? 1 : 0;
+    m_no_autpilot =  (The_mission.flags & MISSION_FLAG_DEACTIVATE_AP) ? 1 : 0;
 	
 
 	m_loading_640=_T(The_mission.loading_screen[GR_640]);
 	
 	
Index: missionnotesdlg.h
===================================================================
RCS file: /home/fs2source/cvsroot/fs2_open/code/fred2/missionnotesdlg.h,v
retrieving revision 1.7
diff -u -r1.7 missionnotesdlg.h
--- missionnotesdlg.h	23 Jul 2007 15:16:48 -0000	1.7
+++ missionnotesdlg.h	5 Jan 2008 19:51:33 -0000
@@ -230,6 +230,7 @@
 	BOOL		m_no_briefing;
 	BOOL		m_no_debriefing;
 	BOOL		m_autpilot_cinematics;
+    BOOL		m_no_autpilot;
 	float		m_max_hull_repair_val;
 	float		m_max_subsys_repair_val;
 	BOOL		m_contrail_threshold_flag;
 	

Index: resource.h
===================================================================
RCS file: /home/fs2source/cvsroot/fs2_open/code/fred2/resource.h,v
retrieving revision 1.25
diff -u -r1.25 resource.h
--- resource.h	30 Dec 2007 18:30:28 -0000	1.25
+++ resource.h	5 Jan 2008 19:51:33 -0000
@@ -1103,6 +1103,7 @@
 #define IDC_SKYBOX_MODEL                1594
 #define IDC_MINI_HELP_BOX               1595
 #define IDC_ALT_AS_CALLSIGN             1596
+#define IDC_DEACTIVATE_AUTOPILOT        1597
 #define ID_FILE_MISSIONNOTES            32771
 #define ID_DUPLICATE                    32774
 #define ID_VIEW_ROTATE                  32775
 

Index: keycontrol.cpp
===================================================================
RCS file: /home/fs2source/cvsroot/fs2_open/code/io/keycontrol.cpp,v
retrieving revision 2.85
diff -u -r2.85 keycontrol.cpp
--- keycontrol.cpp	20 Nov 2007 01:11:12 -0000	2.85
+++ keycontrol.cpp	6 Jan 2008 12:25:39 -0000
@@ -3373,19 +3373,17 @@
 
 		// Autopilot key control
 		case AUTO_PILOT_TOGGLE:
-			if (AutoPilotEngaged)
-			{
-				EndAutoPilot();
-			}
-			else
-			{
-				if (CanAutopilot(true))
-				{
-					StartAutopilot();
-				}
-				else
-					gamesnd_play_iface(SND_GENERAL_FAIL);
-			}
+            if (!(The_mission.flags & MISSION_FLAG_DEACTIVATE_AP)) {
+                if (AutoPilotEngaged) {
+                    EndAutoPilot();
+                }
+                else if (CanAutopilot(true)) {
+                    StartAutopilot();
+                }
+                else {
+                    gamesnd_play_iface(SND_GENERAL_FAIL);
+                }
+            }
 			break;
 
 		case NAV_CYCLE:
 	

Index: missionparse.h
===================================================================
RCS file: /home/fs2source/cvsroot/fs2_open/code/mission/missionparse.h,v
retrieving revision 2.104
diff -u -r2.104 missionparse.h
--- missionparse.h	30 Dec 2007 18:30:29 -0000	2.104
+++ missionparse.h	5 Jan 2008 19:51:33 -0000
@@ -670,6 +670,7 @@
 #define MISSION_FLAG_PLAYER_START_AI			(1<<19) // Player Starts mission under AI Control (NOT MULTI COMPATABLE) - Kazan
 #define MISSION_FLAG_ALL_ATTACK					(1<<20)	// all teams at war - Goober5000
 #define MISSION_FLAG_USE_AP_CINEMATICS			(1<<21) // Kazan - use autopilot cinematics
+#define MISSION_FLAG_DEACTIVATE_AP         	    (1<<22) // KeldorKatarn - deactivate autopilot
 
 // some mice macros for mission type
 #define IS_MISSION_MULTI_COOP			(The_mission.game_type & MISSION_TYPE_MULTI_COOP)
 
 
