Get tiles in an unsafe manner
This commit is contained in:
parent
7f1de2ae15
commit
f61bc52ca6
1 changed files with 4 additions and 3 deletions
|
@ -763,6 +763,7 @@ updateMap dt = do
|
||||||
xyv2 <- queryMaybe xyvel
|
xyv2 <- queryMaybe xyvel
|
||||||
stat <- query anim
|
stat <- query anim
|
||||||
let an = assetAnimations ud Map.! asId stat
|
let an = assetAnimations ud Map.! asId stat
|
||||||
|
mat = mapMat (stateData ud)
|
||||||
ntime = asElapsedTime stat + dt
|
ntime = asElapsedTime stat + dt
|
||||||
npos = pos' + fmap (* (dt * fact')) (fromMaybe (V2 0 0) vel')
|
npos = pos' + fmap (* (dt * fact')) (fromMaybe (V2 0 0) vel')
|
||||||
dpos@(V2 dpr dpc) = npos - pos'
|
dpos@(V2 dpr dpc) = npos - pos'
|
||||||
|
@ -782,12 +783,12 @@ updateMap dt = do
|
||||||
in A.log A.Verbose (fromString $ show ret) ret)
|
in A.log A.Verbose (fromString $ show ret) ret)
|
||||||
(V2 1 1)
|
(V2 1 1)
|
||||||
(
|
(
|
||||||
concatMap
|
nub $ concatMap
|
||||||
(\(dr, dc) ->
|
(\(dr, dc) ->
|
||||||
let bs = (++)
|
let bs = (++)
|
||||||
(fromMaybe [] $ collisionObstacle <$> M.unsafeGet
|
(fromMaybe [] $ collisionObstacle <$> M.unsafeGet
|
||||||
(fromIntegral $ floor pr + dr)
|
(min (nrows mat) $ max 1 $ fromIntegral $ floor pr + dr)
|
||||||
(fromIntegral $ floor pc + dc)
|
(min (ncols mat) $ max 1 $ fromIntegral $ floor pc + dc)
|
||||||
(imgMat (stateData ud)))
|
(imgMat (stateData ud)))
|
||||||
(Prelude.map snd $ Prelude.filter
|
(Prelude.map snd $ Prelude.filter
|
||||||
(\((V2 br bc), _) ->
|
(\((V2 br bc), _) ->
|
||||||
|
|
Loading…
Reference in a new issue