Refactor projectiles
This commit is contained in:
@@ -40,9 +40,9 @@ setRemoteBombScope itid pj w' = case _itemPositions w' IM.! itid of
|
||||
.~ (defaultItZoom {_itZoomMax = 0.5, _itZoomMin = 0.5})
|
||||
_ -> w'
|
||||
|
||||
setRemoteScope :: Int -> Prop -> World -> World
|
||||
setRemoteScope itid pj w' = case w' ^? itemPositions . ix itid of
|
||||
setRemoteScope :: Int -> Point2 -> World -> World
|
||||
setRemoteScope itid pos w' = case w' ^? itemPositions . ix itid of
|
||||
Just (InInv cid' invid )
|
||||
-> w' & creatures . ix cid' . crInv . ix invid . itScope
|
||||
. scopePos .~ (_prPos pj -.- _crPos (_creatures w' IM.! cid'))
|
||||
. scopePos .~ (pos -.- _crPos (_creatures w' IM.! cid'))
|
||||
_ -> w'
|
||||
|
||||
Reference in New Issue
Block a user