Cleanup rocket movement code
This commit is contained in:
@@ -788,16 +788,8 @@ moveShell time i cid rot accel w
|
|||||||
Just cr -> min 0.1 $ max (-0.1)
|
Just cr -> min 0.1 $ max (-0.1)
|
||||||
$ (normalizeAnglePi (dir - _crDir cr)) / 20
|
$ (normalizeAnglePi (dir - _crDir cr)) / 20
|
||||||
_ -> 0
|
_ -> 0
|
||||||
(v1:v2:v3:_) = fst $ runState ((sequence . repeat . randInCirc) 0.1) $ _randGen w
|
r1 = _randGen w & evalState (randInCirc 10)
|
||||||
(r1:r2:r3:_) = map ((*.*) 100) (v2:v3:v1:[])
|
|
||||||
-- ((r1:r2:r3:_),_) = runState ((sequence . repeat . randInCirc) 10) $ _randGen w
|
|
||||||
-- v1 = fst $ runState (randInCirc 0.5) $ _randGen w
|
|
||||||
smokeGen = makeSmokeCloud (oldPos +.+ r1 +.+ 30 *.* (normalizeV (oldPos -.- newPos)))
|
smokeGen = makeSmokeCloud (oldPos +.+ r1 +.+ 30 *.* (normalizeV (oldPos -.- newPos)))
|
||||||
-- (t1:t2:t3:_) = randomRs ( 15,20) $ _randGen w
|
|
||||||
-- (s1:s2:s3:_) = map (\s -> fromIntegral s * 0.1 - 1) (t3:t2:t1:[])
|
|
||||||
-- smokeGen = makeSmokeAt'' v1 s1 t1 (newPos +.+ r1)
|
|
||||||
-- . makeSmokeAt'' v2 s2 t2 (newPos +.+ r2)
|
|
||||||
-- -- . makeSmokeAt'' v3 s3 t3 (newPos +.+ r3)
|
|
||||||
|
|
||||||
|
|
||||||
normalizeAnglePi angle | normalizeAngle angle > pi = normalizeAngle angle - 2*pi
|
normalizeAnglePi angle | normalizeAngle angle > pi = normalizeAngle angle - 2*pi
|
||||||
@@ -1540,16 +1532,8 @@ moveRemoteShell time i cid itid dir w
|
|||||||
hitWl = fmap fst $ collideCircWalls' oldPos newPos 2 $ wallsNearPoint newPos w
|
hitWl = fmap fst $ collideCircWalls' oldPos newPos 2 $ wallsNearPoint newPos w
|
||||||
thingHit = hitCr <|> hitWl
|
thingHit = hitCr <|> hitWl
|
||||||
|
|
||||||
(v1:v2:v3:_) = fst $ runState ((sequence . repeat . randInCirc) 0.1) $ _randGen w
|
r1 = _randGen w & evalState (randInCirc 10)
|
||||||
(r1:r2:r3:_) = map ((*.*) 100) (v2:v3:v1:[])
|
smokeGen = makeSmokeCloud (oldPos +.+ r1 +.+ 30 *.* (normalizeV (oldPos -.- newPos)))
|
||||||
(t1:t2:t3:_) = randomRs ( 15,20) $ _randGen w
|
|
||||||
(s1:s2:s3:_) = map (\s -> fromIntegral s * 0.1 - 1) (t3:t2:t1:[])
|
|
||||||
-- ((r1:r2:r3:_),_) = runState ((sequence . repeat . randInCirc) 10) $ _randGen w
|
|
||||||
-- v1 = fst $ runState (randInCirc 0.5) $ _randGen w
|
|
||||||
smokeGen = makeSmokeAt'' v2 s2 t2 (newPos +.+ r2)
|
|
||||||
. makeSmokeAt'' v1 s1 t1 (newPos +.+ r1)
|
|
||||||
|
|
||||||
-- . makeSmokeAt'' v3 s3 t3 (newPos +.+ r3)
|
|
||||||
doExplosion = explodeRemoteRocket itid i cid
|
doExplosion = explodeRemoteRocket itid i cid
|
||||||
setScope w' = case _itemPositions w' IM.! itid of
|
setScope w' = case _itemPositions w' IM.! itid of
|
||||||
InInv cid invid
|
InInv cid invid
|
||||||
|
|||||||
Reference in New Issue
Block a user