aboutsummaryrefslogtreecommitdiff
path: root/hud
diff options
context:
space:
mode:
authorjacopo grandi <jak.sk8@hotmail.it>2021-03-06 13:06:09 +0100
committerjacopo grandi <jak.sk8@hotmail.it>2021-03-06 13:06:09 +0100
commitb08d3b7b1b06fd2e9dd09eef248a10d33b8d1742 (patch)
tree2ccf6805d2048a5e88f4a941a5a35e19be26eaf9 /hud
parente3350de3a2d90922c2b16e5b5e819f259adb3588 (diff)
gst interpolations, particle systems, timing and gui fix
Diffstat (limited to 'hud')
-rw-r--r--hud/hud.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/hud/hud.c b/hud/hud.c
index 4a7f5a8..3376287 100644
--- a/hud/hud.c
+++ b/hud/hud.c
@@ -715,13 +715,15 @@ void hud_process_overlay_game (graphic_settings *gs, hud *h, MKb *mkb,
h->og.start_battle_flag = 1;
}
- // edit unit
- int x = (int)((mkb->mx+gst->cam[0])/32);
- int y = (int)((mkb->my+gst->cam[1])/32);
- if (x >= 0 && y >= 0 && x < m->sx && y < m->sy) {
- if (ar->grid[xytoi(m,x,y)] != NULL) {
- hud_open_fnu(h, info, &ar->grid[xytoi(m,x,y)]->info, -2);
- h->og.temp_place = -1;
+ if (SDL_GetModState() & KMOD_SHIFT) {
+ // edit unit
+ int x = (int)((mkb->mx+gst->cam[0])/32);
+ int y = (int)((mkb->my+gst->cam[1])/32);
+ if (x >= 0 && y >= 0 && x < m->sx && y < m->sy) {
+ if (ar->grid[xytoi(m,x,y)] != NULL) {
+ hud_open_fnu(h, info, &ar->grid[xytoi(m,x,y)]->info, -2);
+ h->og.temp_place = -1;
+ }
}
}
}