From cc17e483b31dc639b58d66ce810f28ef95c6cf36 Mon Sep 17 00:00:00 2001 From: oakes Date: Sun, 25 May 2014 19:27:21 -0400 Subject: [PATCH] Don't remove entities/world when disposing the world --- src/play_clj/core.clj | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/play_clj/core.clj b/src/play_clj/core.clj index cd58ca3..f43cc67 100644 --- a/src/play_clj/core.clj +++ b/src/play_clj/core.clj @@ -82,12 +82,9 @@ :entities entities :options options :show (fn [] - ; if using a physics engine in a REPL, we need to forcibly remove - ; the entities and world so they are cleaned up properly - (when (:world @screen) - (update-screen! @screen (reset! entities [])) - (some-> @screen :world :object .dispose) - (update-fn! dissoc [:world])) + ; if using a physics engine in a REPL, we need to forcibly dispose + ; the world so it is cleaned up properly + (some-> @screen :world :object .dispose) ; set the initial values in the screen map (update-fn! assoc [:total-time 0