From 644617df7e8d9946d0c68334b6f07d5fa1d0489b Mon Sep 17 00:00:00 2001 From: oakes Date: Sun, 20 Apr 2014 22:34:20 -0400 Subject: [PATCH] Remove unnecessary nil check --- src/play_clj/g2d_physics.clj | 15 +++++++-------- src/play_clj/g3d_physics.clj | 17 ++++++++--------- 2 files changed, 15 insertions(+), 17 deletions(-) diff --git a/src/play_clj/g2d_physics.clj b/src/play_clj/g2d_physics.clj index 1d3e7e6..ccb0d37 100644 --- a/src/play_clj/g2d_physics.clj +++ b/src/play_clj/g2d_physics.clj @@ -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))) diff --git a/src/play_clj/g3d_physics.clj b/src/play_clj/g3d_physics.clj index e6bf763..6afe0a8 100644 --- a/src/play_clj/g3d_physics.clj +++ b/src/play_clj/g3d_physics.clj @@ -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)))