Cleanup
This commit is contained in:
@@ -26,7 +26,7 @@ boostPoint x cr w = case mayp2 of
|
||||
cpos = _crPos cr
|
||||
r = 1.5 * _crRad cr
|
||||
p1 = cpos +.+ x *.* squashNormalizeV (mouseWorldPos w -.- cpos)
|
||||
mayp2 = reflectPointWallsDamp (const True) 1 cpos p1 w
|
||||
mayp2 = bouncePoint (const True) 1 cpos p1 w
|
||||
|
||||
boostSelfL
|
||||
:: Float -- ^ boost amount
|
||||
|
||||
@@ -55,7 +55,7 @@ moveGrenade pj w
|
||||
-- this should maybe
|
||||
-- be wallsAlongLine
|
||||
-- or something vvv
|
||||
| otherwise = case reflectCircWallsDamp 1 oldPos newPos 4 $ wallsNearPoint newPos w of
|
||||
| otherwise = case bounceBall 1 oldPos newPos 4 $ wallsNearPoint newPos w of
|
||||
Nothing -> w & props . ix pID %~ normalUpdate
|
||||
Just (p,v) -> w
|
||||
& soundStart (Tap 0) p tapQuietS Nothing
|
||||
@@ -186,7 +186,7 @@ moveRemoteBomb itid time pID w
|
||||
-- this is hacky, should use a version of collidePointWalls' that collides
|
||||
-- circles and walls
|
||||
invShift x = x -.- 5 *.* normalizeV (_pjVel pj)
|
||||
hitWl = reflectCircWallsDamp 1 oldPos newPos 4 $ wallsNearPoint newPos w
|
||||
hitWl = bounceBall 1 oldPos newPos 4 $ wallsNearPoint newPos w
|
||||
finalPos = maybe newPos (invShift . fst) hitWl
|
||||
setV v = set (props . ix pID . pjVel) v
|
||||
updateV = maybe id (setV . snd) hitWl
|
||||
|
||||
Reference in New Issue
Block a user