Author: anonymissimus
Date: Fri Mar 30 19:10:24 2012
New Revision: 53700
URL: http://svn.gna.org/viewcvs/wesnoth?rev=53700&view=rev
Log:
remove unused varible team::seen_ and related functions (+calls)
This was holding data about which side has already seen which
other side. Probably a left over thing from someone
who wanted to implement something at some spot. It also wasn't saved
in the savegames (surely needed).
Modified:
trunk/src/actions.cpp
trunk/src/team.cpp
trunk/src/team.hpp
Modified: trunk/src/actions.cpp
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/actions.cpp?rev=53700&r1=53699&r2=53700&view=diff
==============================================================================
--- trunk/src/actions.cpp (original)
+++ trunk/src/actions.cpp Fri Mar 30 19:10:24 2012
@@ -2487,7 +2487,6 @@
foreach (const unit &u, units) {
if (!tm->fogged(u.get_location())) {
known_units.insert(u.get_location());
- tm->see(u.side() - 1);
}
}
}
@@ -2804,7 +2803,6 @@
}
DBG_NG << "processed...\n";
- tm->see(u->side() - 1);
}
// The message we display is different depending on
@@ -2968,7 +2966,6 @@
{
unit_map::const_iterator new_unit =
units.find(*sight_it);
assert(new_unit != units.end());
- tm.see(new_unit->side() - 1);
game_events::raise("sighted", *sight_it,
actual_location);
sighted_event = true;
@@ -2978,7 +2975,6 @@
{
unit_map::const_iterator new_unit =
units.find(*sight_it);
assert(new_unit != units.end());
- tm.see(new_unit->side() - 1);
game_events::raise("sighted", *sight_it,
actual_location);
sighted_event = true;
Modified: trunk/src/team.cpp
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/team.cpp?rev=53700&r1=53699&r2=53700&view=diff
==============================================================================
--- trunk/src/team.cpp (original)
+++ trunk/src/team.cpp Fri Mar 30 19:10:24 2012
@@ -286,7 +286,6 @@
action_bonus_count_(0),
recall_list_(),
enemies_(),
- seen_(),
ally_shroud_(),
ally_fog_(),
planned_actions_()
Modified: trunk/src/team.hpp
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/team.hpp?rev=53700&r1=53699&r2=53700&view=diff
==============================================================================
--- trunk/src/team.hpp (original)
+++ trunk/src/team.hpp Fri Mar 30 19:10:24 2012
@@ -182,21 +182,6 @@
}
}
- bool has_seen(unsigned int index) const {
- if(!uses_shroud() && !uses_fog()) return true;
- if(index < seen_.size()) {
- return seen_[index];
- } else {
- return false;
- }
- }
- void see(unsigned int index) {
- if(index >= seen_.size()) {
- seen_.resize(index+1);
- }
- seen_[index] = true;
- }
-
team_info::CONTROLLER controller() const { return info_.controller; }
char const *controller_string() const { return
info_.controller_string(); }
const std::string& color() const { return info_.color; }
@@ -317,8 +302,6 @@
bool calculate_is_enemy(size_t index) const;
mutable std::vector<bool> enemies_;
- mutable std::vector<bool> seen_;
-
mutable std::vector<const shroud_map*> ally_shroud_, ally_fog_;
/**
_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits