Cleanup and various bugfixes
This commit is contained in:
@@ -176,9 +176,12 @@ farWallPoints :: Point2 -> World -> [Point2]
|
||||
farWallPoints p w = concatMap _grViewpoints grs ++ linkvps
|
||||
where
|
||||
grs = filter (pointInOrOnPolygon p . _grBound) (_gameRooms w)
|
||||
linkvps = map extend (concatMap _grViewpointsEx grs)
|
||||
linkvps = map extend (concatMap _grViewpointsEx grs
|
||||
++ map addDir (concatMap _grLinkDirs grs)
|
||||
)
|
||||
extend :: Point2 -> Point2
|
||||
extend outp = p +.+ maxViewDistance *.* safeNormalizeV (outp -.- p)
|
||||
addDir a = p +.+ unitVectorAtAngle a
|
||||
|
||||
maxViewDistance :: Float
|
||||
maxViewDistance = 800
|
||||
|
||||
Reference in New Issue
Block a user