Fixed bug where destroyed buildings didn't show under fow until they were destroyed. (They show immediately now)

This commit is contained in:
mr-russ 2003-02-25 09:03:19 +00:00
parent ea34a1140a
commit fb86d99668
3 changed files with 6 additions and 1 deletions

View file

@ -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>

View file

@ -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);

View file

@ -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;