Skip to content

Commit cf0a1dd

Browse files
committed
Move variable declaration to another place
1 parent 6714af0 commit cf0a1dd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/fheroes2/gui/interface_gamearea.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -473,8 +473,6 @@ void Interface::GameArea::Redraw( fheroes2::Image & dst, int flag, bool isPuzzle
473473

474474
TileUnfitRenderObjectInfo tileUnfit;
475475

476-
const Heroes * currentHero = drawHeroes ? GetFocusHeroes() : nullptr;
477-
478476
// TODO: Dragon City with Object ICN Type OBJ_ICN_TYPE_OBJNMUL2 and object index 46 is a bottom layer sprite.
479477
// TODO: When a hero standing besides this turns a part of the hero is visible. This can be fixed only by some hack.
480478

@@ -695,6 +693,8 @@ void Interface::GameArea::Redraw( fheroes2::Image & dst, int flag, bool isPuzzle
695693
// Draw hero's route. It should be drawn on top of everything.
696694
const bool drawRoutes = ( flag & LEVEL_ROUTES ) != 0;
697695

696+
const Heroes * currentHero = drawHeroes ? GetFocusHeroes() : nullptr;
697+
698698
if ( drawRoutes && ( currentHero != nullptr ) && currentHero->GetPath().isShow() ) {
699699
const Route::Path & path = currentHero->GetPath();
700700
int32_t greenColorSteps = path.GetAllowedSteps();

0 commit comments

Comments
 (0)