4a76ca7
Branches > main > 4a76ca7 > files / src / net / bowmap
Keep track of whether client is playing
Commit: 4a76ca798fdde8872085548a779f9feaf1803e49
Parent: 496b7c4
2 changed files:
src/net/bowmap/network/client.clj view file
@@ -26,10 +26,12 @@ client)) (defn leave! [client-ref]- (let [{:keys! [::socket] :keys [::entity/uuid]} @client-ref]+ (let [{:keys! [::socket] :keys [::playing? ::entity/uuid]} @client-ref] (try (dosync- (when uuid+ (when playing?+ ; What should really happen if this fails?+ ; Probably should come up with a better solution (commute server/players dissoc uuid))) (finally (Socket/.close socket)))))src/net/bowmap/network/handle.clj view file
@@ -128,7 +128,8 @@ uuid (req! client ::entity/uuid) client (assoc client ::state/connection-state ::state/play- ::entity/id entity-id)+ ::entity/id entity-id+ ::client/playing? true) player {::entity/id entity-id ::entity/uuid uuid}] ; Bad state here, yield a fact instead, but that's later ofc