Door destruction happens during door update, updates pathing
This commit is contained in:
@@ -20,7 +20,7 @@ damageWall dt wl w = case _wlStructure wl of
|
||||
& maybeDestroyBlock blid
|
||||
DoorPart drid ->
|
||||
w' & cWorld . lWorld . doors . ix drid . drHP -~ x
|
||||
& maybeDestroyDoor drid
|
||||
-- & maybeDestroyDoor drid
|
||||
_ -> w'
|
||||
where
|
||||
x = case dt of
|
||||
@@ -34,7 +34,7 @@ maybeDestroyBlock blid w = case w ^? cWorld . lWorld . blocks . ix blid of
|
||||
Just bl | _blHP bl < 1 -> destroyBlock bl w
|
||||
_ -> w
|
||||
|
||||
maybeDestroyDoor :: Int -> World -> World
|
||||
maybeDestroyDoor drid w = case w ^? cWorld . lWorld . doors . ix drid of
|
||||
Just dr | _drHP dr < 1 -> destroyDoor dr w
|
||||
_ -> w
|
||||
--maybeDestroyDoor :: Int -> World -> World
|
||||
--maybeDestroyDoor drid w = case w ^? cWorld . lWorld . doors . ix drid of
|
||||
-- Just dr | _drHP dr < 1 -> destroyDoor dr w
|
||||
-- _ -> w
|
||||
|
||||
Reference in New Issue
Block a user