Remove unnecessary nil check

This commit is contained in:
oakes
2014-04-20 22:34:20 -04:00
parent 6131b99776
commit 644617df7e
2 changed files with 15 additions and 17 deletions

View File

@@ -260,11 +260,10 @@ such as :on-begin-contact."
(.step world time-step velocity-iterations position-iterations))
([screen entities]
(step! screen)
(when entities
(map (fn [e]
(if (u/get-obj e :body)
(assoc e
:x (body-x e)
:y (body-y e))
e))
entities))))
(map (fn [e]
(if (u/get-obj e :body)
(assoc e
:x (body-x e)
:y (body-y e))
e))
entities)))

View File

@@ -317,12 +317,11 @@ such as :on-begin-contact."
(bullet-3d! screen :step-simulation delta-time max-sub-steps time-step))
([screen entities]
(step! screen)
(when entities
(map (fn [e]
(if (u/get-obj e :body)
(assoc e
:x (body-x e)
:y (body-y e)
:z (body-z e))
e))
entities))))
(map (fn [e]
(if (u/get-obj e :body)
(assoc e
:x (body-x e)
:y (body-y e)
:z (body-z e))
e))
entities)))