Keep room till last player quits
authorunc0rr
Wed, 08 Aug 2012 22:08:23 +0400
changeset 7521 093ea41051c5
parent 7519 14261378d074
child 7523 0790527b4e00
child 7525 5c840e221993
Keep room till last player quits
gameServer/Actions.hs
--- a/gameServer/Actions.hs	Wed Aug 08 11:07:59 2012 -0400
+++ b/gameServer/Actions.hs	Wed Aug 08 22:08:23 2012 +0400
@@ -221,7 +221,7 @@
     chans <- othersChans
 
     if master then
-        if gameProgress && playersNum > 1 then
+        if playersNum > 1 then
             mapM_ processAction [ChangeMaster, NoticeMessage AdminLeft, RemoveClientTeams ci, AnswerClients chans ["LEFT", clNick, msg]]
             else
             processAction RemoveRoom
@@ -230,7 +230,7 @@
 
     -- when not removing room
     ready <- client's isReady
-    when (not master || (gameProgress && playersNum > 1)) . io $ do
+    when (not master || playersNum > 1) . io $ do
         modifyRoom rnc (\r -> r{
                 playersIn = playersIn r - 1,
                 readyPlayers = if ready then readyPlayers r - 1 else readyPlayers r