mirror of
https://github.com/wesnoth/wesnoth
synced 2025-05-18 15:46:49 +00:00
Hack to allow the editing of the odd border tiles, not perfect
...but if fixes bug #10216 for now. (The problem is that in the hex the neighbour is sometimes selected.)
This commit is contained in:
parent
0cfe68a0d5
commit
1398025580
@ -174,6 +174,11 @@ const gamemap::location display::pixel_position_to_hex(int x, int y,
|
|||||||
if ((x_mod * 2 + y_mod) < (s / 2)) {
|
if ((x_mod * 2 + y_mod) < (s / 2)) {
|
||||||
x_modifier = -1;
|
x_modifier = -1;
|
||||||
y_modifier = -1;
|
y_modifier = -1;
|
||||||
|
// @todo this hack allows the editor to modify the odd border tiles
|
||||||
|
// but the selection still has glitches.
|
||||||
|
} else if (y_mod < 0 && (x_mod * 2 - y_mod) < (s * 3 / 2)) {
|
||||||
|
x_modifier = 0;
|
||||||
|
y_modifier = -1;
|
||||||
} else if ((x_mod * 2 - y_mod) < (s * 3 / 2)) {
|
} else if ((x_mod * 2 - y_mod) < (s * 3 / 2)) {
|
||||||
x_modifier = 0;
|
x_modifier = 0;
|
||||||
y_modifier = 0;
|
y_modifier = 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user