Add IntMapHelper, locate wall cutting bug

This commit is contained in:
jgk
2021-05-22 15:14:21 +02:00
parent 26f0ca4ab5
commit 9c2bcbec10
35 changed files with 221 additions and 139 deletions
+2 -3
View File
@@ -1,6 +1,4 @@
{- |
Deals with moving creature wall collisions.
-}
{- | Deals with moving creature wall collisions. -}
module Dodge.WallCreatureCollisions where
import Dodge.Data
import Dodge.Creature.State.Data
@@ -18,6 +16,7 @@ colCrsWalls w = over creatures (fmap (colCrWall w)) w
colCrWall :: World -> Creature -> Creature
colCrWall w c
| _crID c == 0 = c -- for noclip
| p1 == p2 = pushOrCrush ls c
| otherwise = c & crPos %~
collideCorners rad wallPoints