Command markers only with the debug setting; removing a marker clears them at once

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Richard ZinkandClaude Opus 5.5 committed 2026-11-06 13:12:41 +01:00
1 parent be4459e19e
commit 5a2ac32071
4 files changed
+14 -7

No files matched your search

+2
View File
@@ -109,6 +109,8 @@ impl Game {
// a right click with an order tool: the marker there goes (its creatures are free again);
// without a marker there the guards stand down
pub fn unmark(&mut self, wx: f32, wy: f32) {
// the command markers there go with it
self.marks.retain(|m| (m.x - wx).powi(2) + (m.y - wy).powi(2) >= 2.0 * 2.0);
let near = |m: &usize| {
let (mx, my) = xy(*m);
(mx as f32 + 0.5 - wx).powi(2) + (my as f32 + 0.5 - wy).powi(2) < 1.6 * 1.6