Zoning/streaming refactor
This commit is contained in:
@@ -142,10 +142,18 @@ ifConfigWallRotate cfig w
|
||||
| otherwise = w
|
||||
|
||||
rotateToOverlappingWall :: World -> World
|
||||
rotateToOverlappingWall w = maybe w dowallrotate
|
||||
$ overlapCircWallsReturnWall' p (_crRad cr + 5) (S.filter _wlRotateTo $ wallsNearPoint p w)
|
||||
rotateToOverlappingWall w = maybe
|
||||
id
|
||||
(doWallRotate . snd)
|
||||
(overlapCircWallsClosest p (_crRad cr + 5) (S.filter _wlRotateTo $ wallsNearPoint p w))
|
||||
w
|
||||
where
|
||||
cr = you w
|
||||
p = _crPos (you w)
|
||||
|
||||
doWallRotate :: Wall -> World -> World
|
||||
doWallRotate wl' w = rotateUsing $ (argV . uncurry (-.-) $ _wlLine wl') - _cameraRot w
|
||||
where
|
||||
dowallrotate wl' = rotateUsing $ (argV . uncurry (-.-) $ _wlLine wl') - _cameraRot w
|
||||
rotateUsing a
|
||||
| b - b' > 0.01 = w & cameraRot +~ 0.01
|
||||
| b - b' < negate 0.01 = w & cameraRot -~ 0.01
|
||||
@@ -154,8 +162,6 @@ rotateToOverlappingWall w = maybe w dowallrotate
|
||||
--b = a * (2 / pi)
|
||||
b = a * (4 / pi)
|
||||
b' = fromIntegral (round b :: Int)
|
||||
cr = you w
|
||||
p = _crPos cr
|
||||
|
||||
rotateCameraBy :: Float -> World -> World
|
||||
rotateCameraBy x w = w
|
||||
|
||||
Reference in New Issue
Block a user