Author: suokko
Date: Thu Apr 16 16:23:58 2009
New Revision: 34966
URL: http://svn.gna.org/viewcvs/wesnoth?rev=34966&view=rev
Log:
Changed delayed shroud updates and scenarion objectives to change and show
settings for viewing team. (help in bug #13313)
I don't know if this should be backported to stable also. Current behavior
could be considered as bug so maybe yes.
Modified:
trunk/changelog
trunk/src/play_controller.cpp
trunk/src/playsingle_controller.cpp
Modified: trunk/changelog
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/changelog?rev=34966&r1=34965&r2=34966&view=diff
==============================================================================
--- trunk/changelog (original)
+++ trunk/changelog Thu Apr 16 16:23:58 2009
@@ -79,6 +79,8 @@
special
* Fix missing faction column when waiting that the host start the game,
plus some other unwanted changes there (bug #13243)
+ * Make delayed shroud updates and scenarion objectives to change and
+ show information for viewing team. (help in bug #13313)
* Making the game return to the add-on install dialog just before
installing one, and with its entry selected
* Implemented FR #13321: added "unit advances=N" command to debug console
Modified: trunk/src/play_controller.cpp
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/play_controller.cpp?rev=34966&r1=34965&r2=34966&view=diff
==============================================================================
--- trunk/src/play_controller.cpp (original)
+++ trunk/src/play_controller.cpp Thu Apr 16 16:23:58 2009
@@ -271,7 +271,7 @@
}
void play_controller::objectives(){
- menu_handler_.objectives(player_number_);
+ menu_handler_.objectives(gui_->viewing_team()+1);
}
void play_controller::show_statistics(){
@@ -722,9 +722,9 @@
}
void play_controller::slice_end() {
- if(!browse_ && current_team().objectives_changed()) {
- dialogs::show_objectives(*gui_, level_,
current_team().objectives());
- current_team().reset_objectives_changed();
+ if(!browse_ && teams_[gui_->viewing_team()].objectives_changed()) {
+ dialogs::show_objectives(*gui_, level_,
teams_[gui_->viewing_team()].objectives());
+ teams_[gui_->viewing_team()].reset_objectives_changed();
}
}
@@ -951,7 +951,7 @@
{
switch(command) {
case hotkey::HOTKEY_DELAY_SHROUD:
- return current_team().auto_shroud_updates() ?
hotkey::ACTION_OFF : hotkey::ACTION_ON;
+ return teams_[gui_->viewing_team()].auto_shroud_updates() ?
hotkey::ACTION_OFF : hotkey::ACTION_ON;
default:
return hotkey::ACTION_STATELESS;
}
Modified: trunk/src/playsingle_controller.cpp
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/playsingle_controller.cpp?rev=34966&r1=34965&r2=34966&view=diff
==============================================================================
--- trunk/src/playsingle_controller.cpp (original)
+++ trunk/src/playsingle_controller.cpp Thu Apr 16 16:23:58 2009
@@ -108,11 +108,11 @@
}
void playsingle_controller::toggle_shroud_updates(){
- menu_handler_.toggle_shroud_updates(player_number_);
+ menu_handler_.toggle_shroud_updates(gui_->viewing_team()+1);
}
void playsingle_controller::update_shroud_now(){
- menu_handler_.update_shroud_now(player_number_);
+ menu_handler_.update_shroud_now(gui_->viewing_team()+1);
}
void playsingle_controller::end_turn(){
@@ -875,10 +875,13 @@
return (!browse_ || linger_) &&
!events::commands_disabled;
case hotkey::HOTKEY_DELAY_SHROUD:
- return !linger_ && (current_team().uses_fog() ||
current_team().uses_shroud())
+ return !linger_ &&
(teams_[gui_->viewing_team()].uses_fog() ||
teams_[gui_->viewing_team()].uses_shroud())
&& !events::commands_disabled;
case hotkey::HOTKEY_UPDATE_SHROUD:
- return !linger_ && !events::commands_disabled &&
current_team().auto_shroud_updates() == false;
+ return !linger_
+ && player_number_-1 == gui_->viewing_team()
+ && !events::commands_disabled
+ &&
teams_[gui_->viewing_team()].auto_shroud_updates() == false;
// Commands we can only do if in debug mode
case hotkey::HOTKEY_CREATE_UNIT:
_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits