Add basic prompt
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
module Dodge.WallCreatureCollisions where
|
||||
import Dodge.Data
|
||||
import Dodge.Creature.State.Data
|
||||
import Dodge.Debug.Flag.Data
|
||||
import Dodge.Base
|
||||
import Geometry
|
||||
|
||||
@@ -16,7 +17,7 @@ colCrsWalls w = over creatures (fmap (colCrWall w)) w
|
||||
|
||||
colCrWall :: World -> Creature -> Creature
|
||||
colCrWall w c
|
||||
| _crID c == 0 = c -- for noclip
|
||||
| noclipIsOn && _crID c == 0 = c -- for noclip
|
||||
| p1 == p2 = pushOrCrush ls c
|
||||
| otherwise = c & crPos %~
|
||||
collideCorners rad wallPoints
|
||||
@@ -28,6 +29,7 @@ colCrWall w c
|
||||
p2 = _crPos c
|
||||
ls = IM.elems $ _wlLine <$> wallsNearPoint p2 w
|
||||
wallPoints = nub $ concatMap (\(x,y) -> [x,y]) ls
|
||||
noclipIsOn = _noClip $ _debugFlags w
|
||||
|
||||
-- colCrPushThrough :: World -> Creature -> Creature
|
||||
-- colCrPushThrough w cr = set crPos (checkPushThroughs rad p1 p2 ls) cr
|
||||
|
||||
Reference in New Issue
Block a user