This commit is contained in:
2026-04-03 15:45:43 +01:00
parent d15fbc902c
commit 1d8594dff4
-6
View File
@@ -108,12 +108,6 @@ chaseUpperBody w cr = colorSH (_skinUpper cskin)
tcxy <- w ^? cWorld . lWorld . creatures . ix i . crPos . _xy
guard $ hasLOSIndirect cxy tcxy w
return . (0.5*) . nearZeroAngle $ argV (tcxy - cxy) - cr ^. crDir
headrot = fromMaybe pi $ do
i <- cr ^. crIntention . targetCr
tcxy <- w ^? cWorld . lWorld . creatures . ix i . crPos . _xy
guard $ hasLOSIndirect cxy tcxy w
return . min (pi/2) . max (-pi/2) . nearZeroAngle $ argV (tcxy - cxy) - cr ^. crDir
oneSmooth :: Float -> Float
oneSmooth x = sin (pi * x * 0.5)