Commit f7f45cb
committed
Fix some sight_blind() bugs
I really messed this up when implementing the optimizations from
ef32a06.
* Instead of `IS_OPAQUE_POS` it should be `!IS_OPAQUE_POS`; this causes
the code unfog the wrong neighbors.
* We still need to check whether the surrounding positions are valid
* When updating the `mobsightmap`, we still need to check
`IS_OPAQUE_POS` and use `sightskip`, or else monsters can see through
walls.
Not exactly sure how that would cause the bug in #5, though.1 parent a299993 commit f7f45cb
2 files changed
+20
-16
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
148 | 148 | | |
149 | 149 | | |
150 | 150 | | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
151 | 155 | | |
152 | 156 | | |
153 | 157 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
| 62 | + | |
62 | 63 | | |
63 | 64 | | |
64 | 65 | | |
| |||
92 | 93 | | |
93 | 94 | | |
94 | 95 | | |
| 96 | + | |
95 | 97 | | |
96 | 98 | | |
97 | 99 | | |
| |||
144 | 146 | | |
145 | 147 | | |
146 | 148 | | |
| 149 | + | |
147 | 150 | | |
148 | 151 | | |
149 | 152 | | |
| |||
714 | 717 | | |
715 | 718 | | |
716 | 719 | | |
| 720 | + | |
| 721 | + | |
| 722 | + | |
717 | 723 | | |
718 | | - | |
719 | | - | |
720 | | - | |
721 | | - | |
722 | | - | |
723 | | - | |
724 | | - | |
725 | | - | |
726 | | - | |
727 | | - | |
728 | | - | |
729 | | - | |
730 | | - | |
731 | | - | |
732 | | - | |
| 724 | + | |
| 725 | + | |
| 726 | + | |
| 727 | + | |
| 728 | + | |
733 | 729 | | |
734 | 730 | | |
735 | 731 | | |
736 | | - | |
| 732 | + | |
| 733 | + | |
| 734 | + | |
| 735 | + | |
737 | 736 | | |
| 737 | + | |
738 | 738 | | |
739 | 739 | | |
740 | 740 | | |
| |||
0 commit comments