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
|
||||
stat <- query anim
|
||||
let an = assetAnimations ud Map.! asId stat
|
||||
mat = mapMat (stateData ud)
|
||||
ntime = asElapsedTime stat + dt
|
||||
npos = pos' + fmap (* (dt * fact')) (fromMaybe (V2 0 0) vel')
|
||||
dpos@(V2 dpr dpc) = npos - pos'
|
||||
|
@ -782,12 +783,12 @@ updateMap dt = do
|
|||
in A.log A.Verbose (fromString $ show ret) ret)
|
||||
(V2 1 1)
|
||||
(
|
||||
concatMap
|
||||
nub $ concatMap
|
||||
(\(dr, dc) ->
|
||||
let bs = (++)
|
||||
(fromMaybe [] $ collisionObstacle <$> M.unsafeGet
|
||||
(fromIntegral $ floor pr + dr)
|
||||
(fromIntegral $ floor pc + dc)
|
||||
(min (nrows mat) $ max 1 $ fromIntegral $ floor pr + dr)
|
||||
(min (ncols mat) $ max 1 $ fromIntegral $ floor pc + dc)
|
||||
(imgMat (stateData ud)))
|
||||
(Prelude.map snd $ Prelude.filter
|
||||
(\((V2 br bc), _) ->
|
||||
|
|
Loading…
Reference in a new issue