Improve debris
This commit is contained in:
+1
-1
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user