This commit is contained in:
2022-05-23 15:50:49 +01:00
parent dcd3fdf563
commit c2770e6b5c
7 changed files with 20 additions and 9 deletions
+1 -1
View File
@@ -162,7 +162,7 @@ flameThrower = defaultAutoGun
{ _dimRad = 7
, _dimCenter = V3 9 0 0
, _dimPortage = HeldItem
{ _handlePos = 5
{ _handlePos = 0
, _muzPos = 18
}
, _dimSPic = flamerPic
+11 -3
View File
@@ -385,11 +385,19 @@ withMuzFlareI f it cr w = makeTlsTimeRadColPos 2 100 (V3 1 1 0.5) flashPos
. muzFlareAt (V4 5 5 0 2) flarePos cdir
$ f it cr w
where
flarePos = addZ 0 (_crPos cr) +.+.+ rotate3z cdir (muzzleOffset +.+.+ V3 0 0 20)
flashPos = addZ 0 (_crPos cr) +.+.+ rotate3z cdir (muzzleOffset +.+.+ V3 5 0 20)
muzzleOffset = V3 (_muzPos (_dimPortage (_itDimension it))) 0 0
flarePos = addZ 0 (_crPos cr) +.+.+ rotate3z cdir (muzzleOffset cr it +.+.+ V3 0 0 20)
flashPos = addZ 0 (_crPos cr) +.+.+ rotate3z cdir (muzzleOffset cr it +.+.+ V3 5 0 20)
-- muzzleOffset = V3 (_muzPos (_dimPortage (_itDimension it))) 0 0
cdir = _crDir cr
muzzleOffset :: Creature -> Item -> Point3
muzzleOffset cr it = V3 (holdOffset + 5 + _muzPos dimPort - _handlePos dimPort) 0 0
where
dimPort = _dimPortage $ _itDimension it
holdOffset
| crInStance OneHand cr = 10
| otherwise = 0
withMuzPos :: (Point3 -> World -> World) -> ChainEffect
withMuzPos = withMuzPosShift (V2 0 0)
withMuzPosShift :: Point2 -> (Point3 -> World -> World) -> ChainEffect
+2 -2
View File
@@ -27,7 +27,7 @@ rewindGun = defaultGun
, _wpCharge = 0
}
, _itEffect = ItRewindEffect rewindEffect []
, _itUse = defaultlUse {_lUse = \itm cr -> useRewindGun itm cr}
, _itUse = defaultlUse {_lUse = useRewindGun}
}
rewindEffect :: Item -> Creature -> World -> World
rewindEffect itm cr w
@@ -109,7 +109,7 @@ aSelf :: Creature -> World -> World
aSelf = blinkAction
aSelfL :: Item -> Creature -> World -> World
aSelfL _ cr = blinkAction cr
aSelfL _ = blinkAction
effectGun :: String -> (Creature -> World -> World) -> Item
effectGun name eff = defaultGun