aboutsummaryrefslogtreecommitdiff
path: root/hud/hud.c
diff options
context:
space:
mode:
Diffstat (limited to 'hud/hud.c')
-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;
+ }
}
}
}