Add check to cylinder segment collision, break rocket projectiles
This commit is contained in:
+12
-1
@@ -732,7 +732,8 @@ useLoadedAmmo loc cr mz m w =
|
||||
MuzzleRLauncher -> createProjectileR loc magtree mz cr w
|
||||
MuzzleGLauncher ->
|
||||
createProjectile
|
||||
(itmtree ^. dtValue . _3)
|
||||
pq
|
||||
-- (itmtree ^. dtValue . _3)
|
||||
(Grenade (getGrenadeHitEffect itmtree))
|
||||
magtree
|
||||
(getPJStabiliser itmtree)
|
||||
@@ -754,11 +755,21 @@ useLoadedAmmo loc cr mz m w =
|
||||
MuzzleStopper -> useStopWatch itm cr w
|
||||
MuzzleScroller -> useTimeScrollGun itm cr w
|
||||
where
|
||||
pq = muzzlePos loc cr mz
|
||||
itmtree = loc ^. locDT
|
||||
mitid = magtree ^. dtValue . _1 . itID
|
||||
itm = itmtree ^. dtValue . _1
|
||||
(x, magtree) = fromJust m
|
||||
|
||||
muzzlePos :: LocationDT OItem -> Creature -> Muzzle -> Point3Q
|
||||
muzzlePos m cr muz = (p1,q1) `Q.comp` pq `Q.comp` (p3,q3)
|
||||
where
|
||||
pq = locOrient m cr
|
||||
p1 = cr ^. crPos
|
||||
q1 = Q.qz $ cr ^. crDir
|
||||
p3 = addZ 0 $ muz ^. mzPos
|
||||
q3 = Q.qz $ muz ^. mzRot
|
||||
|
||||
getAttachedSFLink :: ItemSF -> DTree OItem -> Maybe (NewInt ItmInt)
|
||||
getAttachedSFLink sf = (^? dtRight . folding (find f) . dtValue . _1 . itID)
|
||||
where
|
||||
|
||||
Reference in New Issue
Block a user