Refactor launcherCrit ai

This commit is contained in:
2021-05-13 14:23:58 +02:00
parent 9b3fbba393
commit 2402e1e868
10 changed files with 133 additions and 233 deletions
+1 -1
View File
@@ -711,7 +711,7 @@ moveShell time i cid rot accel w
hitWl = fst <$> collideCircWalls' oldPos newPos 2 (wallsNearPoint newPos w)
thingHit = hitCr <|> hitWl
spin = case w ^? creatures . ix cid of
Just cr -> min 0.2 $ max (-0.2) $ normalizeAnglePi (dir - _crDir cr) / 20
Just cr -> negate $ min 0.2 $ max (-0.2) $ normalizeAnglePi (dir - _crDir cr) / 20
_ -> 0
r1 = randInCirc 10 & evalState $ _randGen w
smokeGen = makeSmokeCloudAt (oldPos +.+ r1 +.+ 30 *.* normalizeV (oldPos -.- newPos))