diff --git a/src/ai.cpp b/src/ai.cpp index 9dc732ff0ca..303d96a679f 100644 --- a/src/ai.cpp +++ b/src/ai.cpp @@ -835,7 +835,7 @@ bool ai::get_villages(std::map& possible_moves, const m } } - return moves_made > 0; + return moves_made > 0 && village_moves.size() == max_village_moves; } bool ai::get_healing(std::map& possible_moves, const move_map& srcdst, const move_map& dstsrc, const move_map& enemy_srcdst, const move_map& enemy_dstsrc) diff --git a/src/display.cpp b/src/display.cpp index c6d9b89c8d6..0f789c45f90 100644 --- a/src/display.cpp +++ b/src/display.cpp @@ -1255,9 +1255,9 @@ void display::draw_bar(const std::string& image, int xpos, int ypos, size_t heig blit_surface(xpos,ypos,surf,&top); blit_surface(xpos,ypos+top.h,surf,&bot); - const size_t unfilled = size_t(height*(1.0 - filled)); + const size_t unfilled = height*(1.0 - filled); - if(unfilled < height) { + if(unfilled < height && alpha >= 0.3) { SDL_Rect filled_area = {xpos+bar_loc.x,ypos+bar_loc.y+unfilled,bar_loc.w,height-unfilled}; const Uint16 colour = SDL_MapRGB(video().getSurface()->format,col.r,col.g,col.b); SDL_FillRect(video().getSurface(),&filled_area,colour); diff --git a/src/team.hpp b/src/team.hpp index b12f5fb47e5..9c34fcfa44a 100644 --- a/src/team.hpp +++ b/src/team.hpp @@ -142,8 +142,8 @@ public: bool uses_shroud() const { return shroud_.enabled(); } bool uses_fog() const { return fog_.enabled(); } bool fog_or_shroud() const { return uses_shroud() || uses_fog(); } - bool clear_shroud(size_t x, size_t y) { shroud_.clear(x,y); } - bool clear_fog(size_t x, size_t y) { fog_.clear(x,y); } + bool clear_shroud(size_t x, size_t y) { return shroud_.clear(x,y); } + bool clear_fog(size_t x, size_t y) { return fog_.clear(x,y); } void refog() { fog_.reset(); } bool knows_about_team(size_t index) const;