From 56a72201b6027621024c713262b8506535a514aa Mon Sep 17 00:00:00 2001 From: johns <> Date: Wed, 28 Feb 2001 10:10:25 +0000 Subject: [PATCH] Fixed bug #213510. UnitVisible was already called so checks shouldn't be done again. (from Jimmy Salmon) --- src/unit/unit_draw.cpp | 34 ++-------------------------------- 1 file changed, 2 insertions(+), 32 deletions(-) diff --git a/src/unit/unit_draw.cpp b/src/unit/unit_draw.cpp index 5d35e4a1a..4498cc7a4 100644 --- a/src/unit/unit_draw.cpp +++ b/src/unit/unit_draw.cpp @@ -888,40 +888,10 @@ local void DrawBuilding(Unit* unit) UnitType* type; int frame; - // FIXME: This should I rewrite, without checks here!! - type=unit->Type; - x = unit->X; - y = unit->Y; -#ifdef NEW_FOW - if ( !IsMapFieldVisible( x, y ) ) { - frame = unit->SeenFrame; - if (frame == 255) { - return; - } - } else { - // FIXME: is this the correct place? - frame = unit->SeenFrame = unit->Frame; - } -#else - // FIXME: johns: this isn't 100% correct, building which are partly - // FIXME: johns: under the fog are shown partly. - - // FIXME: There is already a check in the main loop UnitVisible! - if ( !IsMapFieldExplored( x, y ) ) { - return; - } - - if ( !IsMapFieldVisible( x, y ) ) { - frame = unit->SeenFrame; - if (frame == 255) { - return; - } - } else { - frame = unit->SeenFrame = unit->Frame; - } -#endif + // FIXME: is this the correct place? + frame = unit->SeenFrame = unit->Frame; GraphicPlayerPixels(unit->Player,unit->Type->Sprite); x=Map2ScreenX(unit->X)+unit->IX;