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)) (.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))))

View File

@@ -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))))