Remove unnecessary nil check
This commit is contained in:
@@ -260,11 +260,10 @@ such as :on-begin-contact."
|
|||||||
(.step world time-step velocity-iterations position-iterations))
|
(.step world time-step velocity-iterations position-iterations))
|
||||||
([screen entities]
|
([screen entities]
|
||||||
(step! screen)
|
(step! screen)
|
||||||
(when entities
|
(map (fn [e]
|
||||||
(map (fn [e]
|
(if (u/get-obj e :body)
|
||||||
(if (u/get-obj e :body)
|
(assoc e
|
||||||
(assoc e
|
:x (body-x e)
|
||||||
:x (body-x e)
|
:y (body-y e))
|
||||||
:y (body-y e))
|
e))
|
||||||
e))
|
entities)))
|
||||||
entities))))
|
|
||||||
|
|||||||
@@ -317,12 +317,11 @@ such as :on-begin-contact."
|
|||||||
(bullet-3d! screen :step-simulation delta-time max-sub-steps time-step))
|
(bullet-3d! screen :step-simulation delta-time max-sub-steps time-step))
|
||||||
([screen entities]
|
([screen entities]
|
||||||
(step! screen)
|
(step! screen)
|
||||||
(when entities
|
(map (fn [e]
|
||||||
(map (fn [e]
|
(if (u/get-obj e :body)
|
||||||
(if (u/get-obj e :body)
|
(assoc e
|
||||||
(assoc e
|
:x (body-x e)
|
||||||
:x (body-x e)
|
:y (body-y e)
|
||||||
:y (body-y e)
|
:z (body-z e))
|
||||||
:z (body-z e))
|
e))
|
||||||
e))
|
entities)))
|
||||||
entities))))
|
|
||||||
|
|||||||
Reference in New Issue
Block a user