mirror of
https://github.com/wesnoth/wesnoth
synced 2025-05-02 15:23:40 +00:00
Don't use the attack/move cursor and attack direction indicator when observing.
This also help to see that it's not your turn and that you can't send move/attack commands. This fix bug #9610 but it can maybe still exist after some events during your turn. The complete fix need a mouse-code more up-to-date with the game (which will need more code changes)
This commit is contained in:
parent
3a9dd6144e
commit
e0af63df01
@ -772,7 +772,7 @@ void mouse_handler::mouse_motion(int x, int y, const bool browse)
|
||||
|
||||
if (cursor::get() != cursor::WAIT) {
|
||||
if(selected_unit != units_.end() && selected_unit->second.side() == team_num_
|
||||
&& !selected_unit->second.incapacitated()) {
|
||||
&& !selected_unit->second.incapacitated() && !browse) {
|
||||
if (attack_from.valid()) {
|
||||
cursor::set(dragging_started_ ? cursor::ATTACK_DRAG : cursor::ATTACK);
|
||||
} else if (mouseover_unit==units_.end() && current_paths_.routes.count(new_hex)) {
|
||||
@ -785,7 +785,7 @@ void mouse_handler::mouse_motion(int x, int y, const bool browse)
|
||||
}
|
||||
}
|
||||
|
||||
if (attack_from.valid()) {
|
||||
if (attack_from.valid() && !browse) {
|
||||
std::string dir_str = gamemap::location::write_direction(new_hex.get_relative_dir(attack_from));
|
||||
surface attack_dir_surf = image::get_image("misc/attack-from-"+dir_str+".png", image::UNMASKED,image::NO_ADJUST_COLOUR);
|
||||
gui_->set_mouseover_hex_overlay(attack_dir_surf);
|
||||
|
Loading…
x
Reference in New Issue
Block a user