gameServer/EngineInteraction.hs
changeset 8503 e60c84b42f4d
parent 8499 da5394a3eb0e
child 8506 3889dab021b8
--- a/gameServer/EngineInteraction.hs	Wed Feb 13 21:13:15 2013 +0400
+++ b/gameServer/EngineInteraction.hs	Wed Feb 13 22:59:41 2013 +0400
@@ -93,7 +93,13 @@
                 eml ["eaddteam <hash> ", showB $ (1 + (readInt_ $ teamcolor t) :: Int) * 1234, " ", teamname t]
                 : em "erdriven"
                 : eml ["efort ", teamfort t]
-                : replicate (hhnum t) (eml ["eaddhh 0 ", initHealth, " hedgehog"])
+                : take (hhnum t) (
+                    concatMap (\(HedgehogInfo hname hhat) -> [
+                            eml ["eaddhh ", showB $ difficulty t, " ", initHealth, " ", hname]
+                            , eml ["ehat ", hhat]
+                            ])
+                        $ hedgehogs t
+                        )
 
 drawnMapData :: B.ByteString -> [B.ByteString]
 drawnMapData = error "drawnMapData"