Camera position refactor
This commit is contained in:
@@ -579,7 +579,7 @@ torqueBefore torque feff item cr w
|
||||
w
|
||||
& randGen .~ g
|
||||
& cWorld . lWorld . creatures . ix cid . crDir +~ rot
|
||||
& cWorld . lWorld . cwCam . cwcRot +~ rot
|
||||
& cWorld . lWorld . camPos . camRot +~ rot
|
||||
| otherwise = feff item cr $ set randGen g $ over (cWorld . lWorld . creatures . ix cid . crDir) (+ rot) w
|
||||
where
|
||||
cid = _crID cr
|
||||
@@ -600,7 +600,7 @@ torqueBeforeAtLeast minTorque exTorque feff item cr w
|
||||
w
|
||||
& randGen .~ g
|
||||
& cWorld . lWorld . creatures . ix cid . crDir +~ rot'
|
||||
& cWorld . lWorld . cwCam . cwcRot +~ rot'
|
||||
& cWorld . lWorld . camPos . camRot +~ rot'
|
||||
| otherwise = feff item cr $ set randGen g $ over (cWorld . lWorld . creatures . ix cid . crDir) (+ rot') w
|
||||
where
|
||||
cid = _crID cr
|
||||
@@ -613,7 +613,7 @@ torqueBeforeAtLeast minTorque exTorque feff item cr w
|
||||
withTorqueAfter :: ChainEffect
|
||||
withTorqueAfter feff item cr w
|
||||
-- | cid == 0 = rotateScope $ set randGen g $ over cameraRot (+rot) $ feff item cr w
|
||||
| cid == 0 = set randGen g $ over (cWorld . lWorld . cwCam . cwcRot) (+ rot) $ feff item cr w
|
||||
| cid == 0 = set randGen g $ over (cWorld . lWorld . camPos . camRot) (+ rot) $ feff item cr w
|
||||
| otherwise = set randGen g $ over (cWorld . lWorld . creatures . ix cid . crDir) (+ rot) $ feff item cr w
|
||||
where
|
||||
cid = _crID cr
|
||||
@@ -651,7 +651,7 @@ sideEffectOnFrame i sf f it cr w =
|
||||
|
||||
torqueSideEffect :: Float -> Item -> Creature -> World -> World
|
||||
torqueSideEffect torque _ cr w
|
||||
| cid == 0 = set randGen g $ over (cWorld . lWorld . cwCam . cwcRot) (+ rot) w
|
||||
| cid == 0 = set randGen g $ over (cWorld . lWorld . camPos . camRot) (+ rot) w
|
||||
| otherwise = set randGen g $ over (cWorld . lWorld . creatures . ix cid . crDir) (+ rot) w
|
||||
where
|
||||
cid = _crID cr
|
||||
|
||||
Reference in New Issue
Block a user