Tweak turret health

This commit is contained in:
2026-03-16 13:08:24 +00:00
parent 8d4efb1f8e
commit 0ca3bf33c9
6 changed files with 118 additions and 65 deletions
+4 -1
View File
@@ -52,6 +52,7 @@ terminalScreenGlow mc w = fromMaybe w $ do
. lights
.:~ LSParam (_mcPos mc `v2z` 20) 30 (V3 x y z)
-- aiming sweeps, probably don't want this for non-laser turrets
updateTurret :: Float -> Machine -> World -> World
updateTurret rotSpeed mc w =
w
@@ -73,7 +74,9 @@ updateTurret rotSpeed mc w =
mcid = _mcID mc
ypos = you w ^. crPos . _xy
aimpos = ypos + offset * vNormal (normalize (ypos - mcpos))
offset = 10 * sin (fromIntegral (w ^. cWorld . cClock) / (pi * 10))
-- note this is slightly less than your default radius, if changing check
-- with front shield
offset = 9 * sin (fromIntegral (w ^. cWorld . cClock) / (pi * 10))
mcpos = _mcPos mc
seesYou = hasLOSIndirect mcpos ypos w
mcdir = _mcDir mc