Beef up minigun
This commit is contained in:
@@ -219,9 +219,14 @@ wallsAndWindows w
|
||||
wallsToList :: [((Point2,Point2),Point4)] -> [Float]
|
||||
wallsToList = concatMap (\((V2 a b,V2 c d),V4 e f g h) -> [a,b,c,d,e,f,g,h])
|
||||
|
||||
|
||||
lightsForGloom :: World -> [(Point3,Float,Point3)]
|
||||
lightsForGloom w = map getLS (IM.elems $ _lightSources w) ++ map getTLS (_tempLightSources w)
|
||||
lightsForGloom w = mapMaybe getLS (IM.elems $ _lightSources w) ++ mapMaybe getTLS (_tempLightSources w)
|
||||
where
|
||||
getLS ls = ( _lsPos ls, _lsRad ls , _lsIntensity ls)
|
||||
getTLS ls = ( _tlsPos ls, _tlsRad ls, _tlsIntensity ls)
|
||||
getLS ls
|
||||
| dist campos (fst2 $ _lsPos ls) > 1000 = Nothing
|
||||
| otherwise = Just ( _lsPos ls, _lsRad ls , _lsIntensity ls)
|
||||
getTLS ls
|
||||
| dist campos (fst2 $ _tlsPos ls) > 1000 = Nothing
|
||||
| otherwise = Just ( _tlsPos ls, _tlsRad ls, _tlsIntensity ls)
|
||||
campos = _cameraCenter w
|
||||
fst2 (V3 a b _) = V2 a b
|
||||
|
||||
Reference in New Issue
Block a user