 
 ; -------------------------------------------------------------------
 
-(def curr-world (atom nil)) ; { :world => world-actx
-                            ;   :net-listen-ch => ch
-                            ;   :net-connect-ch => ch }
+(def curr-world (atom {})) ; { :world => world-actx
+                           ;   :net-listen-ch => ch
+                           ;   :net-connect-ch => ch }
 
 ; -------------------------------------------------------------------
 

                  :gen-id gen-id})]
        (reset! curr-world {:world world
                            :net-listen-ch (achan-buf world 10)
                            :net-connect-ch (achan-buf world 10)})
        (process-events vis event-delay event-ch step-ch render-ch)
        (make-net world
                  (:net-listen-ch @curr-world)

        done (atom false)]
    (act server-init world
         (doseq [port ports]
           (when-let [listen-result-ch (achan server-init)]
             (aput server-init (:net-listen-ch @curr-world) [name port listen-result-ch])
             (when-let [[accept-ch close-accept-ch] (atake server-init listen-result-ch)]
               (cbfg.world.net/server-accept-loop world accept-ch close-accept-ch)
               (swap! curr-world #(update-in % [:servers name] conj port)))))
         (reset! done true))
    (wait-done done)))

