some polish

This commit is contained in:
nek0 2024-04-07 19:15:57 +02:00
parent ff3fd6415f
commit 96b6db4755
5 changed files with 9 additions and 14 deletions

View file

@ -4,4 +4,4 @@ setMapColumns : 40
setSpawnerProbability : 0.01
setFPS : 60
setClientMaxTimeout : 5
setFramesPerPing : 5
setFramesPerPing : 30

View file

@ -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": {

View file

@ -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

View file

@ -32,7 +32,6 @@ runGame = do
(not . clientStop <$> (liftIO . STM.atomically . STM.readTMVar =<< gets scClientState))
(do
handleMessages
pure ()
-- draw
)
liftIO $ killThread recvThread

View file

@ -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