OSDN Git Service

壁が裏から照らされるかどうかの判定は元々その部屋が明るいかどうかだけ
authornothere <nothere@0568b783-4c39-0410-ac80-bf13821ea2a2>
Wed, 3 Dec 2003 00:14:32 +0000 (00:14 +0000)
committernothere <nothere@0568b783-4c39-0410-ac80-bf13821ea2a2>
Wed, 3 Dec 2003 00:14:32 +0000 (00:14 +0000)
を見ていたため, check_local_illumination()コードでは移動光源/暗黒光源
を判定に含めないように変更. これにより, 光源や暗黒光源のあるモンス
ターが召喚された直後に, 描画はそのままなのに判定上壁の中のモンスター
が見えなくなる場合があった問題を修正.

src/cave.c

index b9a50a2..c859092 100644 (file)
@@ -378,8 +378,7 @@ static bool check_local_illumination(int y, int x)
        int xx = (x < px) ? (x + 1) : (x > px) ? (x - 1) : x;
 
        /* Check for "local" illumination */
-       return (cave[yy][xx].info & (CAVE_LITE | CAVE_MNLT)) ||
-              ((cave[yy][xx].info & (CAVE_GLOW | CAVE_MNDK)) == CAVE_GLOW);
+       return (cave[yy][xx].info & CAVE_GLOW) ? TRUE : FALSE;
 }