Index: controlsconfig.cpp
===================================================================
--- controlsconfig.cpp	(revision 8529)
+++ controlsconfig.cpp	(working copy)
@@ -2100,7 +2100,7 @@
 	Control_check_count = 0;
 }
 
-int check_control(int id, int key)
+int check_control_used(int id, int key)
 {
 	int z, mask;
 	static int last_key = 0;
@@ -2171,6 +2171,24 @@
 	return 0;
 }
 
+/**
+* Wrapper for check_control_used. Allows the game to ignore the key if told to do so by the ignore-key SEXP.
+*/
+int check_control(int id, int key) 
+{
+	if (check_control_used(id, key)) {
+		if (Ignored_keys[id]) {
+			if (Ignored_keys[id] > 0) {
+				Ignored_keys[id]--;
+			}
+			return 0;
+		}
+		return 1;
+	}
+
+	return 0;
+}
+
 // get heading, pitch, bank, throttle abs. and throttle rel. values.
 void control_get_axes_readings(int *h, int *p, int *b, int *ta, int *tr)
 {
