Fix a bug spotted in forum by Velensk:

Incorrect number of total villages in the statusbar info

(didn't count villages at right and bottom border, on map with a border)
This commit is contained in:
Ali El Gariani 2007-11-21 15:08:55 +00:00
parent 56b4ed1ca9
commit a3a1e0f947

View file

@ -456,9 +456,9 @@ void gamemap::read(const std::string& data, const tborder border_tiles, const tu
}
// Is it a village?
if(x >= border_size_ && x < w_ && y >= border_size_ && y < h_ &&
is_village(tiles_[x][y])) {
if(x >= border_size_ && y >= border_size_
&& x < total_width_-border_size_ && y < total_height_-border_size_
&& is_village(tiles_[x][y])) {
villages_.push_back(location(x-border_size_, y-border_size_));
}
}