diff --git a/src/Dodge/WallCreatureCollisions.hs b/src/Dodge/WallCreatureCollisions.hs index 01fc499ce..d8fabb532 100644 --- a/src/Dodge/WallCreatureCollisions.hs +++ b/src/Dodge/WallCreatureCollisions.hs @@ -23,11 +23,14 @@ colCrWall :: World -> Creature -> Creature colCrWall w c | noclipIsOn && _crID c == 0 = c -- for noclip | p1 == p2 = pushOrCrush ls c - | otherwise = c & crPos %~ + | _crPos c' == _crPos c'' = c' + | otherwise = c & crPos .~ _crOldPos c + where + c'' = c & crPos %~ pushOutFromWalls rad ls + c' = c & crPos %~ pushOutFromWalls rad (reverse ls) . pushOutFromWalls rad ls . flip (collidePointWalls p1) wls -- check push throughs - where rad = _crRad c + wallBuffer p1 = _crOldPos c p2 = _crPos c