Cleanup, improve auto wall rotate

This commit is contained in:
2026-03-24 11:28:11 +00:00
parent be2f7160ba
commit 32f1740577
25 changed files with 226 additions and 252 deletions
+2 -2
View File
@@ -25,7 +25,6 @@ noclipCheck cfig w c
| debugOn Noclip cfig && _crID c == 0 = c -- for noclip
| otherwise = colCrWall w c
-- no noclip check, so no need for a configuration file
colCrWall :: World -> Creature -> Creature
colCrWall w c
| p1 == p2 = pushOrCrush ls c
@@ -47,7 +46,8 @@ colCrWall w c
p2 = c ^. crPos . _xy
ls = _wlLine <$> wls
ls' = filter (uncurry $ isLHS p1) ls
wls = filter notff $ wlsNearRect (p2 +.+ V2 r r) (p2 -.- V2 r r) w
--wls = filter notff $ wlsNearRect (p2 + V2 r r) (p2 - V2 r r) w
wls = filter notff $ wlsNearCirc p2 r w
notff x = x ^. wlMaterial /= ForceField
-- the amount to push creatures out from walls, extra to their radius