Improve debris

This commit is contained in:
2022-06-16 12:24:09 +01:00
parent fa762c7687
commit aa29e5ddf2
14 changed files with 75 additions and 50 deletions
+1 -1
View File
@@ -17,7 +17,6 @@ import Control.Lens
splinterBlock :: Block -> World -> World
splinterBlock bl w = foldr unshadowBlock w (_blShadows bl) -- foldr shiftTowardCen w (_blWallIDs bl)
& blocks . ix (_blID bl) . blHPs %~ tail
& matSplintSound (_blMaterial bl) cen
where
cen = centroid $ fst . _wlLine <$> IM.restrictKeys (_walls w) (_blWallIDs bl)
@@ -41,6 +40,7 @@ matSplintSound mat = case mat of
destroyBlock :: Block -> World -> World
destroyBlock bl w = w
& flip (foldr unshadowBlock) (_blShadows bl)
& deleteWallIDs wlids
& blocks %~ IM.delete (_blID bl)
& matDesSound (_blMaterial bl) pos