Remove creature records

This commit is contained in:
2025-06-06 13:36:18 +01:00
parent 73c79f2f4d
commit 0f55257bff
48 changed files with 621 additions and 610 deletions
+5 -4
View File
@@ -1,5 +1,6 @@
module Dodge.Creature.Boid where
import Dodge.Creature.Radius
import Control.Lens
import Control.Monad.Reader
import Dodge.Base
@@ -297,7 +298,7 @@ meleeHeadingMove ::
meleeHeadingMove maxta minta tacutoff speed tp cr tcr
| dist tpos cpos < combinedRad + 5
&& abs (_crDir cr - argV (tpos -.- cpos)) < tacutoff
&& _crMeleeCooldown cr == 0 =
&& _meleeCooldown (_crType cr) == 0 =
[Melee (_crID tcr), Turn pi]
| dist tpos cpos < combinedRad + 5
&& abs (_crDir cr - argV (tpos -.- cpos)) < tacutoff =
@@ -308,13 +309,13 @@ meleeHeadingMove maxta minta tacutoff speed tp cr tcr
where
cpos = _crPos cr
tpos = _crPos tcr
combinedRad = _crRad cr + _crRad tcr
combinedRad = crRad (cr ^. crType) + crRad (tcr ^. crType)
mvPointMeleeTarg :: Point2 -> Creature -> Creature -> [Impulse]
mvPointMeleeTarg p cr crT
| dist tpos cpos < combinedRad + 5
&& abs (_crDir cr - argV (tpos -.- cpos)) < pi / 4
&& _crMeleeCooldown cr == 0 =
&& _meleeCooldown (_crType cr) == 0 =
[Melee (_crID crT)]
| dist tpos cpos < combinedRad + 5
&& abs (_crDir cr - argV (tpos -.- cpos)) < pi / 4 =
@@ -325,4 +326,4 @@ mvPointMeleeTarg p cr crT
where
cpos = _crPos cr
tpos = _crPos crT
combinedRad = _crRad cr + _crRad crT
combinedRad = crRad (cr ^. crType) + crRad (crT ^. crType)