Fix remote rocket scope
This commit is contained in:
@@ -17,6 +17,7 @@ import Dodge.GameRoom
|
||||
import Control.Lens
|
||||
--import Control.Applicative
|
||||
import Data.Maybe
|
||||
import Control.Monad
|
||||
import qualified Data.Set as S
|
||||
import qualified Data.IntMap.Strict as IM
|
||||
import qualified SDL
|
||||
@@ -39,7 +40,10 @@ moveZoomCamera cfig w = w
|
||||
& defaultZoom .~ newDefaultZoom
|
||||
& itemZoom .~ newItemZoom
|
||||
where
|
||||
newvf = _crPos (you w) +.+ fromMaybe (V2 0 0) (yourItem w ^? _Just . itScope . scopePos)
|
||||
newvf = _crPos (you w) +.+ fromMaybe (V2 0 0) mscopeoffset
|
||||
mscopeoffset = do
|
||||
guard (SDL.ButtonRight `S.member` _mouseButtons w)
|
||||
yourItem w ^? _Just . itScope . scopePos
|
||||
newcen = newvf +.+ offset
|
||||
offset = rotateV (_cameraRot w) $ ((newzoom - newDefaultZoom)/(newDefaultZoom*newzoom)) *.* _mousePos w
|
||||
--newzoom = changeZoom (_cameraZoom w) idealZoom'
|
||||
|
||||
Reference in New Issue
Block a user