変愚蛮怒のメインリポジトリです
Revision | 572592ca525948731babe07d26ad628d335539b1 (tree) |
---|---|
Time | 2003-07-04 02:11:18 |
Author | nothere <nothere@0568...> |
Commiter | nothere |
ifハク、ホ・゚・ケス、タオ. ・ウ・皈ネトノイテ.
@@ -3210,9 +3210,13 @@ static void mon_lite_hack(int y, int x) | ||
3210 | 3210 | if (mon_invis) return; |
3211 | 3211 | |
3212 | 3212 | /* Hack -- Prevent monster lite leakage in walls */ |
3213 | + | |
3214 | + /* Horizontal walls between player and a monster */ | |
3213 | 3215 | if (((y < py) && (y > mon_fy)) || ((y > py) && (y < mon_fy))) |
3214 | 3216 | { |
3215 | 3217 | midpoint = (px + mon_fx) >> 1; |
3218 | + | |
3219 | + /* Only first wall viewed from mid-x is lit */ | |
3216 | 3220 | if (x < midpoint) |
3217 | 3221 | { |
3218 | 3222 | if (!cave_floor_bold(y, x + 1)) return; |
@@ -3222,9 +3226,13 @@ static void mon_lite_hack(int y, int x) | ||
3222 | 3226 | if (!cave_floor_bold(y, x - 1)) return; |
3223 | 3227 | } |
3224 | 3228 | } |
3225 | - else if (((x < px) && (x > mon_fx)) || ((x > px) && (x < mon_fx))) | |
3229 | + | |
3230 | + /* Vertical walls between player and a monster */ | |
3231 | + if (((x < px) && (x > mon_fx)) || ((x > px) && (x < mon_fx))) | |
3226 | 3232 | { |
3227 | 3233 | midpoint = (py + mon_fy) >> 1; |
3234 | + | |
3235 | + /* Only first wall viewed from mid-y is lit */ | |
3228 | 3236 | if (y < midpoint) |
3229 | 3237 | { |
3230 | 3238 | if (!cave_floor_bold(y + 1, x)) return; |
@@ -3281,9 +3289,13 @@ static void mon_dark_hack(int y, int x) | ||
3281 | 3289 | if (mon_invis) return; |
3282 | 3290 | |
3283 | 3291 | /* Hack -- Prevent monster dark lite leakage in walls */ |
3292 | + | |
3293 | + /* Horizontal walls between player and a monster */ | |
3284 | 3294 | if (((y < py) && (y > mon_fy)) || ((y > py) && (y < mon_fy))) |
3285 | 3295 | { |
3286 | 3296 | midpoint = (px + mon_fx) >> 1; |
3297 | + | |
3298 | + /* Only first wall viewed from mid-x is darkened */ | |
3287 | 3299 | if (x < midpoint) |
3288 | 3300 | { |
3289 | 3301 | if (!cave_floor_bold(y, x + 1)) return; |
@@ -3293,9 +3305,13 @@ static void mon_dark_hack(int y, int x) | ||
3293 | 3305 | if (!cave_floor_bold(y, x - 1)) return; |
3294 | 3306 | } |
3295 | 3307 | } |
3296 | - else if (((x < px) && (x > mon_fx)) || ((x > px) && (x < mon_fx))) | |
3308 | + | |
3309 | + /* Vertical walls between player and a monster */ | |
3310 | + if (((x < px) && (x > mon_fx)) || ((x > px) && (x < mon_fx))) | |
3297 | 3311 | { |
3298 | 3312 | midpoint = (py + mon_fy) >> 1; |
3313 | + | |
3314 | + /* Only first wall viewed from mid-y is darkened */ | |
3299 | 3315 | if (y < midpoint) |
3300 | 3316 | { |
3301 | 3317 | if (!cave_floor_bold(y + 1, x)) return; |