From: Ian Jackson Date: Sun, 7 Mar 2021 22:44:34 +0000 (+0000) Subject: hidden: do not occult pieces which aren't can_occultable X-Git-Tag: otter-0.4.0~202 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=09f92b59b8263e2b656cbcfbed24eee2bb36b10b;p=otter.git hidden: do not occult pieces which aren't can_occultable Signed-off-by: Ian Jackson --- diff --git a/src/hidden.rs b/src/hidden.rs index 037c3580..98563547 100644 --- a/src/hidden.rs +++ b/src/hidden.rs @@ -583,6 +583,10 @@ fn recalculate_occultation_general< // prevent occulting pieces being occulted // (also prevents reflexive occultation) return None + } else if ipc.occultable().is_none() { + // if we cannot make it look identical to the others, we + // cannot occult it beause we can't hide its identity + return None } else if occ.in_region(gpc.pos) { Some(Occulted { occid, occ }) } else {