hedgewars/uFLTeams.pas
branchqmlfrontend
changeset 11444 91f8c6ff5bab
parent 11442 6b04a266feee
child 11445 465b4db35232
--- a/hedgewars/uFLTeams.pas	Sat Dec 05 16:14:59 2015 +0300
+++ b/hedgewars/uFLTeams.pas	Sun Dec 06 19:56:33 2015 +0300
@@ -10,8 +10,10 @@
 
 function teamByName(s: shortstring): PTeam;
 
+procedure sendTeam(var team: TTeam);
+
 implementation
-uses uFLUtils, uFLIPC, uPhysFSLayer, uFLData;
+uses uFLUtils, uFLIPC, uPhysFSLayer, uFLData, uFLNet;
 
 const MAX_TEAM_NAMES = 128;
 var
@@ -179,4 +181,26 @@
         FreeMem(teamsList, sizeof(teamsList^) * teamsNumber)
 end;
 
+procedure sendTeam(var team: TTeam);
+var i: Longword;
+begin
+    with team do
+    begin
+        sendNetLn('ADD_TEAM');
+        sendNetLn(teamName);
+        sendNetLn(IntToStr(color));
+        sendNetLn(grave);
+        sendNetLn(fort);
+        sendNetLn(voice);
+        sendNetLn(flag);
+        sendNetLn(IntToStr(botLevel));
+        for i := 0 to 7 do
+        begin
+            sendNetLn(hedgehogs[i].name);
+            sendNetLn(hedgehogs[i].hat);
+        end;
+        sendNetLn('')
+    end;
+end;
+
 end.