Merge branch 'master' of github.com:wesnoth/wesnoth
This commit is contained in:
commit
99a0819ff0
4 changed files with 27 additions and 4 deletions
|
@ -162,11 +162,15 @@ Version 1.13.5+dev:
|
|||
multiple network and local players was ran.
|
||||
* Added a tab to run the wmlxgettext tool to GUI.pyw
|
||||
* Fixed problem with Spectre's hitpoint bar positioning.
|
||||
* Fixed crash when unit with planned actions is killed before those actions are
|
||||
completed (bug #20071)
|
||||
* Show correct number of attacks in case of swarm weapon special (bug #24978)
|
||||
* Fixed bug that icons of buttons under the minimap disappeared when the
|
||||
player opened and closed a menu.
|
||||
* Correct unit recall count in statistics when undoing a unit recall (bug #25060)
|
||||
* Add tip to recall units instead of recruiting them if costs exceed 20 gold (recruitment costs)
|
||||
* Resolve sides in map editor not having a proper side number and subsequently
|
||||
causing a crash upon editing (bug #25093)
|
||||
|
||||
Version 1.13.5:
|
||||
* Campaigns:
|
||||
|
|
|
@ -207,15 +207,18 @@ void context_manager::load_mru_item(unsigned int index, bool force_same_context
|
|||
load_map(mru[index], !force_same_context);
|
||||
}
|
||||
|
||||
void context_manager::edit_side_dialog(int side)
|
||||
void context_manager::edit_side_dialog(int side_index)
|
||||
{
|
||||
team& t = get_map_context().get_teams()[side];
|
||||
team& t = get_map_context().get_teams()[side_index];
|
||||
|
||||
//TODO
|
||||
//t.support()
|
||||
|
||||
editor_team_info team_info(t);
|
||||
|
||||
// The side number perhaps should have been set in map_context::new_side() but the design of team::team_info appears to be read-only.
|
||||
team_info.side = side_index + 1; // note team_info::side is supposed to be 1 to n, while side/team indexes are 0 to n-1
|
||||
|
||||
if(gui2::teditor_edit_side::execute(team_info, gui_.video())) {
|
||||
get_map_context().set_side_setup(team_info);
|
||||
}
|
||||
|
|
|
@ -133,8 +133,8 @@ public:
|
|||
/** Display a scenario edit dialog and process user input. */
|
||||
void edit_scenario_dialog();
|
||||
|
||||
/** TODO */
|
||||
void edit_side_dialog(int side);
|
||||
/** Display a side edit dialog and process user input. */
|
||||
void edit_side_dialog(int side_index);
|
||||
|
||||
/** Display a new map dialog and process user input. */
|
||||
void new_map_dialog();
|
||||
|
|
|
@ -190,6 +190,22 @@ void highlighter::last_action_redraw(move_ptr move)
|
|||
//Last action with a fake unit always gets normal appearance
|
||||
if(move->get_fake_unit()) {
|
||||
side_actions& sa = *resources::gameboard->teams().at(move->team_index()).get_side_actions().get();
|
||||
|
||||
// Units with planned actions may have been killed in the previous turn before all actions were completed.
|
||||
// In these cases, remove these planned actions for any invalid units and do not redraw anything.
|
||||
if (move->get_unit() == NULL)
|
||||
{
|
||||
// Note: the planned actions seem to only get removed from the screen when
|
||||
// a redraw is triggered by the mouse cursor moving over them.
|
||||
for (side_actions::iterator iterator = sa.begin(); iterator < sa.end(); iterator++)
|
||||
{
|
||||
if (iterator->get()->get_unit() == NULL)
|
||||
sa.remove_action (iterator);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
side_actions::iterator last_action = sa.find_last_action_of(*(move->get_unit()));
|
||||
side_actions::iterator second_to_last_action = last_action != sa.end() && last_action != sa.begin() ? last_action - 1 : sa.end();
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue