Add tank furniture, stop autorotate when aiming
This commit is contained in:
+4
-2
@@ -25,6 +25,7 @@ import Dodge.Floor
|
||||
import Geometry
|
||||
import Geometry.Vector3D
|
||||
|
||||
import SDL (MouseButton (..))
|
||||
import Data.List
|
||||
import Data.Maybe
|
||||
import Data.Function
|
||||
@@ -251,7 +252,8 @@ crCrSpring c1 c2 w
|
||||
|
||||
ifConfigWallRotate :: World -> World
|
||||
ifConfigWallRotate w
|
||||
| _rotate_to_wall $ _config w = rotateToOverlappingWall w
|
||||
| (_rotate_to_wall $ _config w ) && not (ButtonRight `S.member` _mouseButtons w)
|
||||
= rotateToOverlappingWall w
|
||||
| otherwise = w
|
||||
|
||||
rotateToOverlappingWall :: World -> World
|
||||
@@ -269,7 +271,7 @@ rotateToOverlappingWall w = case theWall of
|
||||
b' = fromIntegral (round b :: Int)
|
||||
cr = you w
|
||||
p = _crPos cr
|
||||
theWall = overlapCircWallsReturnWall p (_crRad cr + 5) (wallsNearPoint p w)
|
||||
theWall = overlapCircWallsReturnWall p (_crRad cr + 5) (IM.filter _wlRotateTo $ wallsNearPoint p w)
|
||||
|
||||
{-
|
||||
Finds the IDs of visible walls from a point to another point. -}
|
||||
|
||||
Reference in New Issue
Block a user