Separate out input datatype

This commit is contained in:
2022-10-29 11:36:57 +01:00
parent 82e2a5a234
commit af6cdff063
19 changed files with 160 additions and 112 deletions
+2 -2
View File
@@ -94,10 +94,10 @@ setRemoteDir cid itid pj w = w & cWorld . lWorld . projectiles . ix (_prjID pj)
turntonewdir = magV (_prjAcc pj) *.* unitVectorAtAngle newdir
--i = _prjID pj
newdir
| SDL.ButtonRight `M.member` _mouseButtons w
| SDL.ButtonRight `M.member` _mouseButtons (_input w)
&& w ^? cWorld . lWorld . creatures . ix cid . crInvSel . iselPos
== w ^? cWorld . lWorld . itemLocations . ix itid . ipInvID
= (w ^. cWorld . lWorld . camPos . camRot) + argV (_mousePos w)
= (w ^. cWorld . lWorld . camPos . camRot) + argV (_mousePos (_input w))
| otherwise = _prjDir pj
doThrust :: Proj -> World -> World