Cleanup
This commit is contained in:
@@ -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