Cleanup, move bullet spawn random offset to muzzle
This commit is contained in:
@@ -7,8 +7,7 @@ module Dodge.Item.HeldOffset (
|
||||
heldItemRelativeOrient,
|
||||
heldItemOrient2D,
|
||||
heldItemOrient2D',
|
||||
-- itemRelativeOrient,
|
||||
locOrientation,
|
||||
locOrient,
|
||||
handHandleOrient,
|
||||
) where
|
||||
|
||||
@@ -18,9 +17,7 @@ import Dodge.Data.ComposedItem
|
||||
import Dodge.Data.Creature
|
||||
import Dodge.Data.DoubleTree
|
||||
import Dodge.Data.Machine
|
||||
import Dodge.DoubleTree
|
||||
import Dodge.Item.AimStance
|
||||
import Dodge.Item.Orientation
|
||||
import Geometry
|
||||
import LensHelp
|
||||
import qualified Quaternion as Q
|
||||
@@ -95,8 +92,8 @@ handOrient cr = case cr ^. crStance . posture of
|
||||
f i = 0.1 * fromIntegral (sLen - i) / fromIntegral sLen
|
||||
sLen = _strideLength $ _crStance cr
|
||||
|
||||
locOrientation :: LocationLDT ItemLink OItem -> Creature -> Point3Q
|
||||
locOrientation loc cr = handHandleOrient (fmap (\(x,y,_) -> (x,y)) loc) cr `Q.comp`
|
||||
locOrient :: LocationLDT ItemLink OItem -> Creature -> Point3Q
|
||||
locOrient loc cr = handHandleOrient (fmap (\(x,y,_) -> (x,y)) loc) cr `Q.comp`
|
||||
(loc ^. locLDT . ldtValue . _3)
|
||||
-- heldItemRelativeOrient
|
||||
-- (locToTop loc ^. locLDT . ldtValue . _1)
|
||||
@@ -187,12 +184,3 @@ heldHandlePos = \case
|
||||
KEYCARD{} -> V2 3 0
|
||||
BLINKER -> V2 3 0
|
||||
BLINKERUNSAFE -> V2 3 0
|
||||
|
||||
itemRelativeOrient ::
|
||||
LocationLDT ItemLink Item ->
|
||||
Creature ->
|
||||
(Point3, Q.Quaternion Float) ->
|
||||
(Point3, Q.Quaternion Float)
|
||||
itemRelativeOrient loc cr =
|
||||
heldItemRelativeOrient (locToTop loc ^. locLDT . ldtValue) cr
|
||||
. orientLocation (V3 0 0 0, Q.qID) loc
|
||||
|
||||
Reference in New Issue
Block a user