From fb86d996684f4a78cf19cc5aa62d66cf116554bf Mon Sep 17 00:00:00 2001
From: mr-russ <>
Date: Tue, 25 Feb 2003 09:03:19 +0000
Subject: [PATCH] Fixed bug where destroyed buildings didn't show under fow
 until they were destroyed.  (They show immediately now)

---
 doc/ChangeLog.html     | 3 +++
 src/unit/unit.cpp      | 1 +
 src/unit/unit_draw.cpp | 3 ++-
 3 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/doc/ChangeLog.html b/doc/ChangeLog.html
index 1cd198be1..651ffc688 100644
--- a/doc/ChangeLog.html
+++ b/doc/ChangeLog.html
@@ -1091,6 +1091,9 @@
     <LI>Fixed bug #690994: Editor scrolling bug (from Jimmy Salmon).
     <LI>Fixed bug #689227: Internal editor crashes saving 1024x1024 maps
 	(from Jimmy Salmon).
+    <LI>Fixed bug where destroyed buildings didn't show under fow until
+	they were destroyed.  (They show immediately now) (from Russell
+	Smith).
     <LI>+++
     </UL>
 </UL>
diff --git a/src/unit/unit.cpp b/src/unit/unit.cpp
index 7e21dded8..8735a7f92 100644
--- a/src/unit/unit.cpp
+++ b/src/unit/unit.cpp
@@ -3495,6 +3495,7 @@ global void LetUnitDie(Unit* unit)
 	    UnitShowAnimation(unit,unit->Type->Animations->Die);
 	    DebugLevel0Fn("Frame %d\n" _C_ unit->Frame);
 #if defined(NEW_FOW) && defined(BUILDING_DESTROYED)
+	    unit->Visible = 0xffff;
 	    DeadBuildingCacheInsert(unit);	//Insert into corpse list
 #else
 	    CorpseCacheInsert(unit);
diff --git a/src/unit/unit_draw.cpp b/src/unit/unit_draw.cpp
index 59187512c..736511143 100644
--- a/src/unit/unit_draw.cpp
+++ b/src/unit/unit_draw.cpp
@@ -1913,7 +1913,8 @@ global void DrawUnits(const void* v)
     corpses = &DestroyedBuildings;
     while( *corpses ) {
 	if( UnitVisibleInViewport(vp,*corpses) && !(*corpses)->SeenDestroyed
-		&& ((*corpses)->Visible & 1<<ThisPlayer->Player)) {
+		&& (((*corpses)->Visible & 1<<ThisPlayer->Player)
+			|| !(*corpses)->Destroyed)) {
 	    DrawBuilding(*corpses);
 	}
 	corpses=&(*corpses)->Next;