Index: hud/hudtarget.cpp
===================================================================
--- hud/hudtarget.cpp	(revision 6575)
+++ hud/hudtarget.cpp	(working copy)
@@ -1777,8 +1777,18 @@
 	for (A=GET_FIRST(&target_shipp->subsys_list); A!=END_OF_LIST(&target_shipp->subsys_list); A=GET_NEXT(A))  {
 		// get a turret
 		if (A->system_info->type == SUBSYSTEM_TURRET) {
-			// check turret has hit points and has a weapon
-			if ( (A->current_hits > 0) && (A->weapons.num_primary_banks > 0 || A->weapons.num_secondary_banks > 0) ) {
+			// turret banks wihtout a weapon assigned don't count in targeting so we need to check for weapons assigned
+			int banks_with_weapons = 0;
+			for (int i=0; i < A->weapons.num_primary_banks; i++) {
+				if (A->weapons.primary_bank_weapons[i] >= 0)
+					banks_with_weapons++;
+			}
+			for (int i=0; i < A->weapons.num_secondary_banks; i++) {
+				if (A->weapons.secondary_bank_weapons[i] >= 0)
+					banks_with_weapons++;
+			}
+			// check turret has hit points and has a weapon				
+			if ( (A->current_hits > 0) && (banks_with_weapons > 0) ) {
 				if ( !only_player_target || (A->turret_enemy_objnum == OBJ_INDEX(Player_obj)) ) {
 					vec3d gsubpos, vec_to_subsys;
 					float distance, dot;
