Author: shadowmaster
Date: Sat May 7 10:08:15 2011
New Revision: 49405
URL: http://svn.gna.org/viewcvs/wesnoth?rev=49405&view=rev
Log:
Force gamemap label refreshing on controller switch events (i.e. :control)
This effectively fixes the glitch noted in 48572, and possibly others
not reported affecting the more general case.
(Backported from trunk, r48573.)
Modified:
branches/1.8/changelog
branches/1.8/src/playturn.cpp
Modified: branches/1.8/changelog
URL:
http://svn.gna.org/viewcvs/wesnoth/branches/1.8/changelog?rev=49405&r1=49404&r2=49405&view=diff
==============================================================================
--- branches/1.8/changelog (original)
+++ branches/1.8/changelog Sat May 7 10:08:15 2011
@@ -15,6 +15,8 @@
* A New Land:
* Award correct amount of research to units (bug #17406).
* Don't show team labels to observers (feature request #9648).
+ * Recalculate map labels to account for team changes when switching players
+ with :control.
* User interface:
* Fix old multiplayer lobby glitches caused by the loadscreen code when
skipping to the lobby with -s <server> command line.
Modified: branches/1.8/src/playturn.cpp
URL:
http://svn.gna.org/viewcvs/wesnoth/branches/1.8/src/playturn.cpp?rev=49405&r1=49404&r2=49405&view=diff
==============================================================================
--- branches/1.8/src/playturn.cpp (original)
+++ branches/1.8/src/playturn.cpp Sat May 7 10:08:15 2011
@@ -21,6 +21,7 @@
#include "game_preferences.hpp"
#include "gettext.hpp"
#include "log.hpp"
+#include "map_label.hpp"
#include "replay.hpp"
#include "resources.hpp"
#include "rng.hpp"
@@ -154,7 +155,6 @@
bool restart = resources::screen->get_playing_team() ==
index;
if (!player.empty() && leader.valid())
leader->second.rename(player);
-
if (controller == "human" && !tm.is_human()) {
if
(!(*resources::teams)[resources::screen->get_playing_team()].is_human())
@@ -176,6 +176,8 @@
restart = false;
}
+ resources::screen->labels().recalculate_labels();
+
return restart ? PROCESS_RESTART_TURN :
PROCESS_CONTINUE;
}
}
_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits