// Allow the "-nohints" option to be toggled at runtime with the "H" key

diff -u -r flying-6.20.orig/flying.man flying-6.20/flying.man
--- flying-6.20.orig/flying.man	1995-07-18 23:10:11.000000000 +0200
+++ flying-6.20/flying.man	2009-05-01 02:43:06.000000000 +0200
@@ -107,6 +107,10 @@
 .IP ^L 8
 redraw screen
 .PP
+.IP H 8
+toggle hint arrows (see the \fI-nohints\fP option);
+cannot be used while hints are being shown
+.PP
 .SH OPTIONS
 .SS X11
 .TP 8
@@ -160,6 +164,9 @@
 should be in a range of 6 to 9 feet. If not given, the size is selected
 randomly, except in the deluxe-version, where it default to 8 feet.
 This was done because every size would need other pixmaps for the balls.
+.TP
+.B -nohints
+turn off hint arrows
 
 .SS DEBUG
 .TP 8
diff -u -r flying-6.20.orig/global-e.h flying-6.20/global-e.h
--- flying-6.20.orig/global-e.h	1995-08-07 23:26:55.000000000 +0200
+++ flying-6.20/global-e.h	2009-05-01 02:43:58.000000000 +0200
@@ -191,6 +191,7 @@
 extern	int light_flag;		// Light-Sources								(main.C)
 extern	int color_flag;		// table color									(main.C)
 extern	int nohint_flag;		// aiming hint									(main.C)
+extern	int nohint_flag_in_use;
 extern	int enhanced_mover;	// flag for desired mover class        (main.C)
 extern	int frames_per_sec;	// flag for limited frames             (main.C)
 #define	ON_ROOT		-1
diff -u -r flying-6.20.orig/global.h flying-6.20/global.h
--- flying-6.20.orig/global.h	1995-08-07 23:26:56.000000000 +0200
+++ flying-6.20/global.h	2009-05-01 02:43:58.000000000 +0200
@@ -208,6 +208,7 @@
 extern	int light_flag;		// Light-Sources								(main.C)
 extern	int color_flag;		// table color									(main.C)
 extern	int nohint_flag;		// aiming hint									(main.C)
+extern	int nohint_flag_in_use;
 extern	int enhanced_mover;	// flag for desired mover class        (main.C)
 extern	int frames_per_sec;	// flag for limited frames             (main.C)
 
diff -u -r flying-6.20.orig/main.C flying-6.20/main.C
--- flying-6.20.orig/main.C	2009-04-30 21:03:11.000000000 +0200
+++ flying-6.20/main.C	2009-05-01 02:43:58.000000000 +0200
@@ -80,6 +80,7 @@
 int	light_flag		= 1;				// Light-Source
 int	color_flag		= 0;				// Desired table color
 int	nohint_flag		= 0;				// Dont draw arrows for hints
+int	nohint_flag_in_use = 0;
 int	enhanced_mover = 2;
 int	frames_per_sec = 0;				// limit frames per seconds
 int	no_server_grabs= 0;				// never grab server
@@ -461,6 +462,7 @@
 #endif
 
 		if (pressed_key==' ')	g->ResetGame();
+		if (pressed_key=='h' && !nohint_flag_in_use)	nohint_flag = !nohint_flag;
 		if (pressed_key=='q'||pressed_key=='\033'||pressed_key=='\n'||pressed_key=='r'||((stop_time)&&(GetCurrentTime()>stop_time)))		break;
 	};
 
diff -u -r flying-6.20.orig/pball.C flying-6.20/pball.C
--- flying-6.20.orig/pball.C	2009-05-01 02:42:19.000000000 +0200
+++ flying-6.20/pball.C	2009-05-01 02:43:58.000000000 +0200
@@ -468,7 +468,7 @@
 		cue->v = dir.Norm1();
 		Object *obj;
 
-		for (ncalc_pos=0;ncalc_pos<MAX_PREPOS;) {
+		for (ncalc_pos=0;ncalc_pos<(nohint_flag?1:MAX_PREPOS);) {
 			min_time   = MAX_TIME;
 			hit_object = 0;
 			for (obj=Object::stat_queue; obj; obj=obj->Object::next ) {
@@ -613,6 +613,7 @@
 		}
 	}
 	tool_is_visible ^= 1;	// toggle state
+	nohint_flag_in_use = tool_is_visible;
 }
 
 
