mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-03-09 23:50:25 +00:00
(svn r7000) -Fix: Incorrect use of e->we.click when the event is a 'place'. This didn't cause any
bugs so far because the 'click' element was at the same position in the union for both events.
This commit is contained in:
parent
1d0ebb9cc3
commit
fce44a1ce7
@ -147,7 +147,7 @@ static void BuildDocksToolbWndProc(Window *w, WindowEvent *e)
|
|||||||
}
|
}
|
||||||
|
|
||||||
case WE_PLACE_MOUSEUP:
|
case WE_PLACE_MOUSEUP:
|
||||||
if (e->we.click.pt.x != -1) {
|
if (e->we.place.pt.x != -1) {
|
||||||
if ((e->we.place.userdata & 0xF) == VPM_X_AND_Y) { // dragged actions
|
if ((e->we.place.userdata & 0xF) == VPM_X_AND_Y) { // dragged actions
|
||||||
GUIPlaceProcDragXY(e);
|
GUIPlaceProcDragXY(e);
|
||||||
} else if (e->we.place.userdata == VPM_X_OR_Y) {
|
} else if (e->we.place.userdata == VPM_X_OR_Y) {
|
||||||
|
@ -1351,7 +1351,7 @@ static void ScenEditLandGenWndProc(Window *w, WindowEvent *e)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case WE_PLACE_MOUSEUP:
|
case WE_PLACE_MOUSEUP:
|
||||||
if (e->we.click.pt.x != -1) {
|
if (e->we.place.pt.x != -1) {
|
||||||
if ((e->we.place.userdata & 0xF) == VPM_X_AND_Y) // dragged actions
|
if ((e->we.place.userdata & 0xF) == VPM_X_AND_Y) // dragged actions
|
||||||
GUIPlaceProcDragXY(e);
|
GUIPlaceProcDragXY(e);
|
||||||
}
|
}
|
||||||
|
@ -374,7 +374,7 @@ static void BuildTreesWndProc(Window *w, WindowEvent *e)
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
case WE_PLACE_MOUSEUP:
|
case WE_PLACE_MOUSEUP:
|
||||||
if (e->we.click.pt.x != -1) {
|
if (e->we.place.pt.x != -1) {
|
||||||
DoCommandP(e->we.place.tile, _tree_to_plant, e->we.place.starttile, NULL,
|
DoCommandP(e->we.place.tile, _tree_to_plant, e->we.place.starttile, NULL,
|
||||||
CMD_PLANT_TREE | CMD_AUTO | CMD_MSG(STR_2805_CAN_T_PLANT_TREE_HERE));
|
CMD_PLANT_TREE | CMD_AUTO | CMD_MSG(STR_2805_CAN_T_PLANT_TREE_HERE));
|
||||||
}
|
}
|
||||||
|
@ -464,7 +464,7 @@ static void BuildRailToolbWndProc(Window *w, WindowEvent *e)
|
|||||||
}
|
}
|
||||||
|
|
||||||
case WE_PLACE_MOUSEUP:
|
case WE_PLACE_MOUSEUP:
|
||||||
if (e->we.click.pt.x != -1) {
|
if (e->we.place.pt.x != -1) {
|
||||||
TileIndex start_tile = e->we.place.starttile;
|
TileIndex start_tile = e->we.place.starttile;
|
||||||
TileIndex end_tile = e->we.place.tile;
|
TileIndex end_tile = e->we.place.tile;
|
||||||
|
|
||||||
|
@ -235,7 +235,7 @@ static void TerraformToolbWndProc(Window *w, WindowEvent *e)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case WE_PLACE_MOUSEUP:
|
case WE_PLACE_MOUSEUP:
|
||||||
if (e->we.click.pt.x != -1 &&
|
if (e->we.place.pt.x != -1 &&
|
||||||
(e->we.place.userdata & 0xF) == VPM_X_AND_Y) { // dragged actions
|
(e->we.place.userdata & 0xF) == VPM_X_AND_Y) { // dragged actions
|
||||||
GUIPlaceProcDragXY(e);
|
GUIPlaceProcDragXY(e);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user