Tweak slime wall collisions, all creatures cliff collisions (min 10)

This commit is contained in:
2026-05-02 19:46:12 +01:00
parent b7aea0eb1f
commit b827827951
6 changed files with 29 additions and 12 deletions
+9
View File
@@ -2,6 +2,7 @@
module Dodge.Debug (debugEvents, drawDebug) where
import Dodge.Creature.Radius
import Geometry.Data
import Dodge.Render.Label
import Dodge.HeldUse
@@ -81,6 +82,7 @@ debugEvent' = \case
Debug_get -> id
Debug_put -> id
Muzzle_positions -> id
Show_cr_hitboxes -> id
debugItem :: DebugBool -> Universe -> Maybe [DebugItem]
debugItem = \case
@@ -117,6 +119,7 @@ debugItem = \case
Debug_get -> doDebugGet
Debug_put -> debugPutItems
Muzzle_positions -> mempty
Show_cr_hitboxes -> mempty
debugGet :: Universe -> [String]
debugGet u = foldMap getPretty $ u ^. uvWorld . cWorld . lWorld . shockwaves
@@ -287,7 +290,13 @@ drawDebug u = \case
Show_writable_values -> mempty
Show_mouse_click_pos -> mempty
Muzzle_positions -> showMuzzlePositions u
Show_cr_hitboxes -> foldMap drawCreatureRad (u ^. uvWorld . cWorld . lWorld . creatures)
drawCreatureRad :: Creature -> Picture
drawCreatureRad cr = setLayer DebugLayer
. translate3 (cr ^. crPos)
. color orange
$ circle (crRad (cr ^. crType))
showMuzzlePositions :: Universe -> Picture
showMuzzlePositions u = fold $ do