Swap order of actions
authorunc0rr
Fri, 22 Jun 2012 08:13:51 +0400
changeset 7266 74ad631a72bf
parent 7265 3f96073156e1
child 7268 3a61c53346a8
Swap order of actions
gameServer/HWProtoInRoomState.hs
--- a/gameServer/HWProtoInRoomState.hs	Tue Jun 19 01:20:19 2012 +0400
+++ b/gameServer/HWProtoInRoomState.hs	Fri Jun 22 08:13:51 2012 +0400
@@ -158,8 +158,8 @@
     cl <- thisClient
     chans <- roomClientsChans
     return [
+        ModifyRoom (\r -> r{readyPlayers = readyPlayers r + (if isReady cl then -1 else 1)}),
         ModifyClient (\c -> c{isReady = not $ isReady cl}),
-        ModifyRoom (\r -> r{readyPlayers = readyPlayers r + (if isReady cl then -1 else 1)}),
         AnswerClients chans $ if clientProto cl < 38 then
                 [if isReady cl then "NOT_READY" else "READY", nick cl]
                 else