Move towards using item structural function when using items
This commit is contained in:
@@ -121,7 +121,7 @@ pjRemoteSetDirection ph pj w = case ph of
|
||||
in w & cWorld . lWorld . projectiles . ix (_prjID pj) . prjAcc
|
||||
.~ magV (_prjAcc pj) *.* unitVectorAtAngle newdir
|
||||
HomeUsingTargeting itid -> fromMaybe w $ do
|
||||
tp <- w ^? pointerToItemID itid . itUse . tgPos . _Just
|
||||
tp <- w ^? pointerToItemID itid . itTargeting . itTgPos . _Just
|
||||
return $ w & cWorld . lWorld . projectiles . ix (_prjID pj) . prjAcc
|
||||
%~ vecTurnTo 0.2 (_prjPos pj) tp
|
||||
|
||||
|
||||
Reference in New Issue
Block a user