Implement (partially) updating pathing grid when opening doors
This commit is contained in:
@@ -75,8 +75,8 @@ performPathTo cr w p
|
||||
Just q -> ([MvTurnToward q
|
||||
,MvForward
|
||||
,RandomTurn jit
|
||||
,ArbitraryImpulseEffect . const
|
||||
$ debugPicture .~ drawPathList cpos p w
|
||||
-- ,ArbitraryImpulseEffect . const
|
||||
-- $ debugPicture .~ drawPathList cpos p w
|
||||
]
|
||||
, Just (PathTo p))
|
||||
_ -> ([],Nothing)
|
||||
@@ -84,13 +84,6 @@ performPathTo cr w p
|
||||
cpos = _crPos cr
|
||||
jit = _mvTurnJit $ _crMvType cr
|
||||
|
||||
drawPathList :: Point2 -> Point2 -> World -> Picture
|
||||
drawPathList x y w = case makePathBetweenPs x y w of
|
||||
Nothing -> setLayer DebugLayer $ color red $ line [x,y]
|
||||
Just [] -> setLayer DebugLayer $ color green $ line [x,y]
|
||||
Just as -> setLayer DebugLayer $ color orange (line as)
|
||||
<> color blue (line [head as,x]) <> color yellow (line [last as, y])
|
||||
|
||||
performTurnToA :: Creature -> Point2 -> OutAction
|
||||
performTurnToA cr p
|
||||
| angleVV cdirv dirv < 0.1 = ([], Nothing)
|
||||
|
||||
Reference in New Issue
Block a user