Don't erase starting position when changing a terrain (for bug #9041).

I suppose it's only affect the editor, since in game starting postions
are not used after start

(and it's make more sense like this)
This commit is contained in:
Ali El Gariani 2007-05-01 00:06:41 +00:00
parent b24f72d974
commit 20d517f469
2 changed files with 0 additions and 17 deletions

View File

@ -1191,16 +1191,6 @@ void map_editor::terrain_changed(const gamemap::location &hex, map_undo_action &
void map_editor::terrain_changed(const std::vector<gamemap::location> &hexes,
map_undo_action &undo_action)
{
for (std::vector<gamemap::location>::const_iterator it = hexes.begin();
it != hexes.end(); it++) {
const int start_side = starting_side_at(map_, *it);
if (start_side != -1) {
// A terrain which had a starting position has changed, save
// this position in the undo_action and unset it.
map_.set_starting_position(start_side, gamemap::location());
undo_action.add_starting_location(start_side, start_side, *it, gamemap::location());
}
}
invalidate_all_and_adjacent(hexes);
}

View File

@ -697,13 +697,6 @@ void gamemap::set_terrain(const gamemap::location& loc, const t_translation::t_l
villages_.push_back(loc);
}
//If the terrain is set under a starting position, do also erase the
//starting position.
for(int i = 0; i < STARTING_POSITIONS; ++i) {
if(loc == startingPositions_[i])
startingPositions_[i] = location();
}
tiles_[loc.x][loc.y] = terrain;
location adj[6];