Allow grenades to stick to creatures
This commit is contained in:
@@ -61,11 +61,9 @@ destroyBlock bl w =
|
||||
& deleteWallIDs wlids
|
||||
& maybeClearPaths (_blObstructs bl) -- must happen after the walls are deleted
|
||||
& cWorld . lWorld . blocks %~ IM.delete (_blID bl)
|
||||
-- & matDesSound (_blMaterial bl) pos
|
||||
& flip (foldl' $ flip (wlDustAt awl)) (map (pos +.+) ps)
|
||||
where
|
||||
wlids = _blWallIDs bl
|
||||
--awl = _walls (_cWorld w) IM.! IS.findMin wlids
|
||||
awl = w ^?! cWorld . lWorld . walls . ix (IS.findMin wlids)
|
||||
pos = fst . _wlLine $ awl
|
||||
ps = replicateM 25 (randInCirc 20) & evalState $ _randGen w
|
||||
|
||||
Reference in New Issue
Block a user