summaryrefslogtreecommitdiff
path: root/play.js
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2022-09-08 00:42:07 +0200
committerTor Andersson <tor@ccxvii.net>2022-11-17 13:11:27 +0100
commit14446ca1064f9527d92fcc2bac7320c67e5ddb53 (patch)
tree79afb903bf3c4921926aefbed21cee8efcbb08ff /play.js
parentb9ecf1b7125c080d228852320f6f6b0a06ba0b3e (diff)
downloadrommel-in-the-desert-14446ca1064f9527d92fcc2bac7320c67e5ddb53.tar.gz
Fix z-order fighting of adjacent axis and allied stacks.
Diffstat (limited to 'play.js')
-rw-r--r--play.js7
1 files changed, 3 insertions, 4 deletions
diff --git a/play.js b/play.js
index 64cdc30..8eb6983 100644
--- a/play.js
+++ b/play.js
@@ -708,10 +708,10 @@ function layout_stack(stack, hex, start_x, start_y, wrap, xdir) {
x = start_x - 35 + i * 3
y = start_y - 35 + i * 3
}
- if (is_unit_revealed(u))
- z = 1 + i
+ if (is_axis_unit(u))
+ z = 100 + i
else
- z = 1 + i
+ z = i
}
e.style.top = y + "px"
@@ -827,7 +827,6 @@ function update_map() {
let this_y = start_y
if (stack_list[hex][aa] === ui.focus) {
let height = Math.min(wrap, stack_list[hex][aa].length) * 56
- console.log("stack", hex, aa, wrap, stack_list[hex][aa].length, height, this_y + height + 25)
if (this_y + height + 25 > 960)
this_y = 960 - height - 25
}