From 94fcdfff9e7a073fc15e71b111c728cdb6106520 Mon Sep 17 00:00:00 2001 From: rodri Date: Sat, 7 Oct 2023 23:17:10 +0000 Subject: only send a shot if the target cell is clear/unknown. --- bts.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/bts.c b/bts.c index ca951dc..80aad06 100644 --- a/bts.c +++ b/bts.c @@ -643,8 +643,10 @@ lmb(Mousectl *mc) cell = toboard(&alienboard, mc->xy); /* TODO check if we already shot at that cell */ cell2coords(buf, sizeof buf, cell); - chanprint(egress, "shoot %s\n", buf); - lastshot = cell; + if(gettile(&alienboard, cell) == Twater){ + chanprint(egress, "shoot %s\n", buf); + lastshot = cell; + } break; } } -- cgit v1.2.3