Move towards allowing equipable targeting items
This commit is contained in:
@@ -348,7 +348,7 @@ useMod hm = case hm of
|
||||
thegapDualBeam = _dbGap . _itParams
|
||||
directedTelPos it cr w = (p, a)
|
||||
where
|
||||
p = fromMaybe (_crPos cr) $ it ^? itUse . heldTargeting . tgPos . _Just
|
||||
p = fromMaybe (_crPos cr) $ cr ^? crTargeting . ctPos . _Just
|
||||
a = argV (mouseWorldPos (w ^. input) (w ^. cWorld . camPos) -.- p)
|
||||
moddelay x = itUse . heldConsumption . laAmmoType . amBullet . buDelayFraction .~ x
|
||||
modcrpos x cr =
|
||||
@@ -511,7 +511,7 @@ shootTeslaArc it cr w =
|
||||
-- TODO investigate more and fix
|
||||
useForceFieldGun :: Item -> Creature -> World -> World
|
||||
useForceFieldGun itm cr w = fromMaybe w $ do
|
||||
a <- _tgPos . _heldTargeting $ _itUse itm
|
||||
a <- cr ^? crTargeting . ctPos . _Just
|
||||
let mwp = mouseWorldPos (w ^. input) (w ^. cWorld . camPos)
|
||||
b = if dist a mwp < 100 then mwp else a +.+ 100 *.* normalizeV (mwp -.- a)
|
||||
wlline = (a, b)
|
||||
|
||||
Reference in New Issue
Block a user