This commit is contained in:
2022-06-26 02:30:17 +01:00
parent 7532c4cafb
commit ee9523dabb
8 changed files with 83 additions and 172 deletions
+2 -2
View File
@@ -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