Record aim position in LWorld
This commit is contained in:
@@ -384,7 +384,7 @@ updateItemTargeting tt cr itm w = case tt of
|
||||
TargetRBPress
|
||||
| rbpressed ->
|
||||
w
|
||||
& pointittarg . itTgPos %~ maybe (Just $ mouseWorldPos (w ^. input) (w ^. wCam)) Just
|
||||
& pointittarg . itTgPos %~ maybe (Just $ w ^. cWorld . lWorld . lAimPos) Just
|
||||
& pointittarg . itTgActive .~ True
|
||||
TargetRBPress ->
|
||||
w
|
||||
@@ -395,7 +395,7 @@ updateItemTargeting tt cr itm w = case tt of
|
||||
w
|
||||
& pointittarg
|
||||
.~ ItTargeting
|
||||
(Just (mouseWorldPos (w ^. input) (w ^. wCam)))
|
||||
(Just (w ^. cWorld . lWorld . lAimPos))
|
||||
Nothing
|
||||
True
|
||||
where
|
||||
@@ -417,7 +417,7 @@ setRBCreatureTargeting cr w ituse
|
||||
. filter (canseepos . _crPos)
|
||||
$ crsNearCirc mwp 40 w
|
||||
canseepos p = hasLOS (_crPos cr) p w
|
||||
mwp = mouseWorldPos (w ^. input) (w ^. wCam)
|
||||
mwp = w ^. cWorld . lWorld . lAimPos
|
||||
updatePos t' = t' & itTgPos .~ posFromMaybeID (_itTgID t')
|
||||
posFromMaybeID Nothing = Nothing
|
||||
posFromMaybeID (Just i) = w ^? cWorld . lWorld . creatures . ix i . crPos
|
||||
|
||||
Reference in New Issue
Block a user