merge 0.9.19 in default
authorkoda
Tue, 04 Jun 2013 22:08:17 +0200
changeset 9125 c542f6e3a133
parent 9105 18ebb59c89fe (diff)
parent 9123 19c57656460f (current diff)
child 9127 e350500c4edb
child 9128 19596777eb7a
merge 0.9.19 in default
QTfrontend/KB.h
hedgewars/GL.h
hedgewars/Math.h
hedgewars/SysUtils.h
hedgewars/Types.h
--- a/gameServer/HWProtoCore.hs	Tue Jun 04 21:59:01 2013 +0200
+++ b/gameServer/HWProtoCore.hs	Tue Jun 04 22:08:17 2013 +0200
@@ -4,7 +4,6 @@
 import Control.Monad.Reader
 import Data.Maybe
 import qualified Data.ByteString.Char8 as B
-import qualified Data.List as L
 --------------------------------------
 import CoreTypes
 import Actions
@@ -34,24 +33,24 @@
         else
         return [ModifyClient (\c -> c{pingsQueue = pingsQueue c - 1})]
 
-handleCmd ("CMD" : parameters) =
-    let c = concatMap B.words parameters in
-        if not $ null c then
-            h $ (upperCase . head $ c) : tail c
-            else
-            return []
+handleCmd ["CMD", parameters] = do
+        let (cmd, plist) = B.break (== ' ') parameters
+        let param = B.dropWhile (== ' ') plist
+        h (upperCase cmd) param
     where
-        h ["DELEGATE", n] = handleCmd ["DELEGATE", n]
-        h ["STATS"] = handleCmd ["STATS"]
-        h ("PART":m:ms) = handleCmd ["PART", B.unwords $ m:ms]
-        h ("QUIT":m:ms) = handleCmd ["QUIT", B.unwords $ m:ms]
-        h ("RND":rs) = handleCmd ("RND":rs)
-        h ("GLOBAL":m:ms) = do
+        h "DELEGATE" n | not $ B.null n = handleCmd ["DELEGATE", n]
+        h "STATS" _ = handleCmd ["STATS"]
+        h "PART" m | not $ B.null m = handleCmd ["PART", m]
+                   | otherwise = handleCmd ["PART"]
+        h "QUIT" m | not $ B.null m = handleCmd ["QUIT", m]
+                   | otherwise = handleCmd ["QUIT"]
+        h "RND" p = handleCmd ("RND" : B.words p)
+        h "GLOBAL" p = do
             cl <- thisClient
             rnc <- liftM snd ask
             let chans = map (sendChan . client rnc) $ allClients rnc
-            return [AnswerClients chans ["CHAT", "[global notice]", B.unwords $ m:ms] | isAdministrator cl]
-        h c = return [Warning . B.concat . L.intersperse " " $ "Unknown cmd" : c]
+            return [AnswerClients chans ["CHAT", "[global notice]", p] | isAdministrator cl]
+        h c p = return [Warning $ B.concat ["Unknown cmd: /", c, p]]
 
 handleCmd cmd = do
     (ci, irnc) <- ask
--- a/hedgewars/uGears.pas	Tue Jun 04 21:59:01 2013 +0200
+++ b/hedgewars/uGears.pas	Tue Jun 04 22:08:17 2013 +0200
@@ -774,7 +774,8 @@
     begin
     dec(i);
     Gear:= t^.ar[i];
-    if (Ammo^.Kind = gtFlame) and (Gear^.Kind = gtHedgehog) and (Gear^.Hedgehog^.Effects[heFrozen] > 255) then
+    if ((Ammo^.Kind = gtFlame) or (Ammo^.Kind = gtBlowTorch)) and 
+       (Gear^.Kind = gtHedgehog) and (Gear^.Hedgehog^.Effects[heFrozen] > 255) then
         Gear^.Hedgehog^.Effects[heFrozen]:= max(255,Gear^.Hedgehog^.Effects[heFrozen]-10000);
     tmpDmg:= ModifyDamage(Damage, Gear);
     if (Gear^.State and gstNoDamage) = 0 then