more checking rooms
This commit is contained in:
@ -78,7 +78,7 @@ Pre-Computed Visiblity Trees on RogueBasin
|
||||
Adam Milazzo's FOV Method Roundup where a similar method described as 'permissive' is detailed
|
||||
*/
|
||||
|
||||
const MIN_LIT_TO_BE_VISIBLE = 1
|
||||
const MIN_LIT_TO_BE_VISIBLE = 0
|
||||
const MIN_WALL_LIT_TO_BE_VISIBLE = 4
|
||||
|
||||
var errNotFoundCell = errors.New("Cell not found")
|
||||
@ -240,7 +240,8 @@ func (ps *precomputedShade) recalc(level *gamemap.Level, initCoords types.Coords
|
||||
for _, angle := range cell.occludedAngles {
|
||||
|
||||
if level.GetTile(lc).BlocksSight && ps.LightWalls {
|
||||
if (nextShade[angle] == 0 && currentShade[angle] == 0) {
|
||||
//if (nextShade[angle] == 0 && currentShade[angle] == 0) {
|
||||
if (nextShade[angle] == 0) {
|
||||
level.GetTile(lc).Visible = true
|
||||
level.GetTile(lc).Explored = true
|
||||
}
|
||||
@ -263,7 +264,8 @@ func (ps *precomputedShade) ComputeFov(level *gamemap.Level, initCoords types.Co
|
||||
for _, cell := range ps.CellList {
|
||||
//fmt.Printf("\n coords: %v, distance: %f, lit: %d", cell.Coords, cell.distance, cell.lit)
|
||||
cs, err := ps.toLevelCoords(level, initCoords, cell.Coords)
|
||||
if cell.lit > MIN_LIT_TO_BE_VISIBLE {
|
||||
//if cell.lit > 0 && cell.lit > MIN_LIT_TO_BE_VISIBLE {
|
||||
if cell.lit > 0 && cell.lit / (ps.MaxTorchRadius - int(cell.distance -1)) > MIN_LIT_TO_BE_VISIBLE {
|
||||
if err != nil {
|
||||
continue
|
||||
}
|
||||
|
Reference in New Issue
Block a user