Improve door crushing
This commit is contained in:
@@ -5,6 +5,7 @@ module Dodge.Creature.Action.Blink (
|
||||
unsafeBlinkAction,
|
||||
) where
|
||||
|
||||
import qualified Data.IntMap.Strict as IM
|
||||
import Linear
|
||||
import Dodge.Creature.Radius
|
||||
import Dodge.Zoning.Wall
|
||||
@@ -34,7 +35,7 @@ blinkActionMousePos cr w =
|
||||
p1 = w ^. cWorld . lWorld . lAimPos
|
||||
cpos = cr ^. crPos . _xy
|
||||
--p2 = bouncePoint (const True) 1 cpos p1 w
|
||||
p2 = pushIntoMaybe $ collideCircWalls cpos p1 r (wlsNearSeg cpos p1 w)
|
||||
p2 = pushIntoMaybe $ collideCircWalls cpos p1 r (IM.elems $ wlsNearSeg cpos p1 w)
|
||||
r = crRad $ cr ^. crType
|
||||
p3 = maybe p1 ((+.+ squashNormalizeV (cpos -.- p1)) . fst) p2
|
||||
--p3 = maybe p1 (const 0) p2
|
||||
|
||||
Reference in New Issue
Block a user