chiark
/
gitweb
/
~ianmdlvl
/
otter.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3577c4f
)
hidden: do not occult pieces which aren't can_occultable
author
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Sun, 7 Mar 2021 22:44:34 +0000
(22:44 +0000)
committer
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Wed, 10 Mar 2021 21:55:20 +0000
(21:55 +0000)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
src/hidden.rs
patch
|
blob
|
history
diff --git
a/src/hidden.rs
b/src/hidden.rs
index 037c358022b4542c7748872a2aacfea5e19ce974..9856354749a15062472e1600b4843adb215c512e 100644
(file)
--- 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 {