From 5641e753a78c3a3f8f3ecb96c70f971e5022179f Mon Sep 17 00:00:00 2001
From: johns <>
Date: Sat, 6 May 2000 19:13:06 +0000
Subject: [PATCH] Removed the UnitReachable, the units are still in the
 building and can't reach a deposit.

---
 src/unit/unit.cpp | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/src/unit/unit.cpp b/src/unit/unit.cpp
index a1da2409b..d4cfdb487 100644
--- a/src/unit/unit.cpp
+++ b/src/unit/unit.cpp
@@ -747,6 +747,7 @@ global int UnitVisible(const Unit* unit)
 	//
 	//	Check explored and if visible under fog of war.
 	//	Building could always be seen under fog of war.
+	//	FIXME: only known buildings are visible SceenFrame!=-1.
 	//
 	mf=TheMap.Fields+y*TheMap.Width+x;
 	m=1<<ThisPlayer->Player;
@@ -1807,7 +1808,8 @@ global Unit* FindGoldMine(const Unit* source,int x,int y)
 	    continue;
 	}
 	d=MapDistanceToUnit(x,y,unit);
-	if( d<best_d && UnitReachable(source,unit) ) {
+	// FIXME: UnitReachable(source,unit) didn't work unit still in building
+	if( d<best_d /* && UnitReachable(source,unit) */ ) {
 	    best_d=d;
 	    best=unit;
 	}
@@ -1882,7 +1884,8 @@ global Unit* FindGoldDeposit(const Unit* source,int x,int y)
 	    continue;
 	}
 	d=MapDistanceToUnit(x,y,unit);
-	if( d<best_d && UnitReachable(source,unit) ) {
+	// FIXME: UnitReachable(source,unit) didn't work unit still in building
+	if( d<best_d /* && UnitReachable(source,unit) */ ) {
 	    best_d=d;
 	    best=unit;
 	}