--- a/gameServer/ServerCore.hs Thu Aug 09 15:32:49 2012 +0400
+++ b/gameServer/ServerCore.hs Thu Aug 09 19:35:52 2012 +0400
@@ -43,7 +43,7 @@
ClientMessage (ci, cmd) -> do
liftIO $ debugM "Clients" $ show ci ++ ": " ++ show cmd
-
+
removed <- gets removedClients
unless (ci `Set.member` removed) $ do
modify (\s -> s{clientIndex = Just ci})
@@ -75,8 +75,6 @@
(fromJust $ serverSocket si)
(coreChan si)
- return ()
-
_ <- forkIO $ timerLoop 0 $ coreChan si
startDBConnection si
--- a/tools/pas2c.hs Thu Aug 09 15:32:49 2012 +0400
+++ b/tools/pas2c.hs Thu Aug 09 19:35:52 2012 +0400
@@ -809,14 +809,15 @@
e2 <- expr2C e2'
let inc = if up then "inc" else "dec"
let add = if up then "+ 1" else "- 1"
+ let iEnd = i <> text "__end__"
ph <- phrase2C . appendPhrase (BuiltInFunctionCall [Reference $ SimpleReference i'] (SimpleReference (Identifier inc BTUnknown))) $ wrapPhrase p
return . braces $
i <+> text "=" <+> e1 <> semi
$$
- iType <+> i <> text "__end__" <+> text "=" <+> e2 <+> text add <> semi
+ iType <+> iEnd <+> text "=" <+> e2 <> semi
$$
- text "do" <+> ph <+>
- text "while" <> parens (i <+> text "!=" <+> i <> text "__end__") <> semi
+ text "if" <+> (parens $ i <+> text "<=" <+> iEnd) <+> text "do" <+> ph <+>
+ text "while" <> parens (i <+> text "!=" <+> iEnd <+> text add) <> semi
where
appendPhrase p (Phrases ps) = Phrases $ ps ++ [p]
phrase2C (RepeatCycle e' p') = do