Cleanup code, speed up radar sweeps

This commit is contained in:
2024-12-18 15:57:37 +00:00
parent 86d884ba01
commit 9bc9dd2a08
5 changed files with 10 additions and 21 deletions
+2 -2
View File
@@ -16,7 +16,7 @@ aRadarPulse :: ObjectType -> Creature -> World -> World
aRadarPulse ob cr =
cWorld . lWorld . radarSweeps
.:~ RadarSweep
{ _rsTimer = 100
{ _rsTimer = 50
, _rsRad = 0
, _rsPos = _crPos cr
, _rsObject = ob
@@ -39,7 +39,7 @@ updateRadarSweep w pt
putBlips = cWorld . lWorld . radarBlips .++~ blips
blips = map bf circPoints
circPoints = blipsF p r w
r = fromIntegral (400 - x * 4)
r = fromIntegral (400 - x * 8)
findBlips :: ObjectType -> Point2 -> Float -> World -> [Point2]
findBlips ob = case ob of