# HG changeset patch # User koda # Date 1370376497 -7200 # Node ID c542f6e3a1336714498c6843ac0beb5ecd003a7d # Parent 18ebb59c89fe5fc92cc17631bd74be7e6ba0c60a# Parent 19c57656460fce0c14966d00da948a813b5de2f5 merge 0.9.19 in default diff -r 19c57656460f -r c542f6e3a133 gameServer/HWProtoCore.hs --- 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 diff -r 19c57656460f -r c542f6e3a133 hedgewars/uGears.pas --- 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