diff --git a/configuration.yaml b/configuration.yaml index f0614a9..ad8b6a1 100644 --- a/configuration.yaml +++ b/configuration.yaml @@ -4,4 +4,4 @@ setMapColumns : 40 setSpawnerProbability : 0.01 setFPS : 60 setClientMaxTimeout : 5 -setFramesPerPing : 5 +setFramesPerPing : 30 diff --git a/flake.lock b/flake.lock index 00b6bbb..bae1496 100644 --- a/flake.lock +++ b/flake.lock @@ -5,11 +5,11 @@ "systems": "systems" }, "locked": { - "lastModified": 1701680307, - "narHash": "sha256-kAuep2h5ajznlPMD9rnQyffWG8EM/C73lejGofXvdM8=", + "lastModified": 1710146030, + "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=", "owner": "numtide", "repo": "flake-utils", - "rev": "4022d587cbbfd70fe950c1e2083a02621806a725", + "rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a", "type": "github" }, "original": { @@ -20,11 +20,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1701705699, - "narHash": "sha256-h2HPYzcD1j7aNmomrWB0mrHULSO0jUji1Aw6hRAygvU=", + "lastModified": 1712489342, + "narHash": "sha256-PbI6iD3TiXDRyqfdj5j1TyAIcCRLN7B7Umql33brfDs=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "4679e3657f53b39b7822eb7069abc13d6ffcdda1", + "rev": "dc8d832b21b6bd839c5d50bfe3b3846e4da9029a", "type": "github" }, "original": { diff --git a/src-client/Client/Communication.hs b/src-client/Client/Communication.hs index 1380953..c0f0f50 100644 --- a/src-client/Client/Communication.hs +++ b/src-client/Client/Communication.hs @@ -55,10 +55,6 @@ sendMessage st msg sock = do msgVector (\ptr -> do void $ sendBuf sock ptr (VS.length msgVector) - -- eResult <- try $ sendBuf sock ptr (VS.length msgVector) - -- case eResult of - -- Left (_ :: IOException) -> gracefulExit st "sendMessage: Quitting due to connection loss…" - -- Right _ -> pure () ) handleMessages @@ -68,7 +64,7 @@ handleMessages = do msgs <- liftIO $ STM.atomically $ STM.flushTQueue queue mapM_ (\msg -> do - -- liftIO $ putStrLn $ "Handling following: " <> show msg + liftIO $ putStrLn $ "Handling following: " <> show msg handleMessage msg ) msgs diff --git a/src-client/Client/Game.hs b/src-client/Client/Game.hs index ae1cfe5..4dc3ba3 100644 --- a/src-client/Client/Game.hs +++ b/src-client/Client/Game.hs @@ -32,7 +32,6 @@ runGame = do (not . clientStop <$> (liftIO . STM.atomically . STM.readTMVar =<< gets scClientState)) (do handleMessages - pure () -- draw ) liftIO $ killThread recvThread diff --git a/src-server/Server/Communication.hs b/src-server/Server/Communication.hs index 99c44ac..4190bc7 100644 --- a/src-server/Server/Communication.hs +++ b/src-server/Server/Communication.hs @@ -215,7 +215,7 @@ handleMessage handleMessage stateContainer readerContainer msg = do let clientList = scClientSockets stateContainer clients <- liftIO $ STM.atomically $ STM.readTMVar clientList - -- putStrLn $ "Handling: " <> show msg + putStrLn $ "Handling: " <> show msg case msg of IdRequest -> do clientId <- nextRandom