Some cleanup of rendering/poking, remove forcefield gun
This commit is contained in:
@@ -191,7 +191,6 @@ useLoadedAmmo itmtree cr (cme, w) (mzid, Just (mz, x, magtree)) = (,) (cme & cme
|
||||
MuzzleLauncher -> createProjectile magtree mz itmtree cr w
|
||||
MuzzleNozzle{} -> useGasParams mid mz itm cr $ walkNozzle mzid mz itm cr w
|
||||
MuzzleShatter -> shootShatter itm cr w
|
||||
MuzzleForceField -> useForceFieldGun itm cr w
|
||||
MuzzleDetector -> itemDetectorEffect itm cr w
|
||||
where
|
||||
mid = magtree ^? ldtValue . itLocation . ilInvID
|
||||
@@ -444,25 +443,6 @@ shootTeslaArc itm cr mz w =
|
||||
pos = _crPos cr + rotateV (_crDir cr) (_mzPos mz + aimingWeaponZeroPos cr itm)
|
||||
dir = _crDir cr + _mzRot mz
|
||||
|
||||
-- I believe because the targeting returns to nothing straight after you release
|
||||
-- the rmb, it is possible for this to do nothing
|
||||
-- TODO investigate more and fix
|
||||
useForceFieldGun :: Item -> Creature -> World -> World
|
||||
useForceFieldGun _ _ = id
|
||||
|
||||
--useForceFieldGun itm cr w = fromMaybe w $ do
|
||||
-- a <- cr ^? crTargeting . ctPos . _Just
|
||||
-- let mwp = mouseWorldPos (w ^. input) (w ^. wCam)
|
||||
-- b = if dist a mwp < 100 then mwp else a +.+ 100 *.* normalizeV (mwp -.- a)
|
||||
-- wlline = (a, b)
|
||||
-- return $
|
||||
-- w
|
||||
-- & cWorld . lWorld . walls %~ IM.insertWith (\_ x -> x) i forceField{_wlID = i}
|
||||
-- & cWorld . lWorld . creatures . ix (_crID cr) . crInv . ix (_ilInvID (_itLocation itm)) . itParams . paramMID ?~ i
|
||||
-- & moveWallIDUnsafe i wlline
|
||||
-- where
|
||||
-- i = fromMaybe (IM.newKey (_walls (_lWorld (_cWorld w)))) $ itm ^? itParams . paramMID . _Just
|
||||
|
||||
determineProjectileTracking ::
|
||||
LabelDoubleTree ComposeLinkType Item ->
|
||||
LabelDoubleTree ComposeLinkType Item ->
|
||||
|
||||
Reference in New Issue
Block a user