hedgewars/uFLTeams.pas
branchqmlfrontend
changeset 10450 bf9e30b4ef9b
parent 10448 4cb727e029fa
child 10517 844bd43db47a
equal deleted inserted replaced
10448:4cb727e029fa 10450:bf9e30b4ef9b
     9 procedure freeTeamsList;
     9 procedure freeTeamsList;
    10 
    10 
    11 function teamByName(s: shortstring): PTeam;
    11 function teamByName(s: shortstring): PTeam;
    12 
    12 
    13 implementation
    13 implementation
    14 uses uFLUtils, uFLIPC, uPhysFSLayer;
    14 uses uFLUtils, uFLIPC, uPhysFSLayer, uFLData;
    15 
    15 
    16 const MAX_TEAM_NAMES = 128;
    16 const MAX_TEAM_NAMES = 128;
    17 var
    17 var
    18     teamsList: PTeam;
    18     teamsList: PTeam;
    19     teamsNumber: Longword;
    19     teamsNumber: Longword;
    45 procedure sendTeamConfig(var team: TTeam);
    45 procedure sendTeamConfig(var team: TTeam);
    46 var i: Longword;
    46 var i: Longword;
    47 begin
    47 begin
    48     with team do
    48     with team do
    49     begin
    49     begin
    50         ipcToEngine('eaddteam <hash> ' + color + ' ' + teamName);
    50         ipcToEngine('eaddteam <hash> ' + colorsSet[color] + ' ' + teamName);
    51         for i:= 0 to Pred(hogsNumber) do
    51         for i:= 0 to Pred(hogsNumber) do
    52         begin
    52         begin
    53             ipcToEngine('eaddhh ' + inttostr(botLevel) + ' 100 ' + hedgehogs[i].name);
    53             ipcToEngine('eaddhh ' + inttostr(botLevel) + ' 100 ' + hedgehogs[i].name);
    54             ipcToEngine('ehat ' + hedgehogs[i].hat);
    54             ipcToEngine('ehat ' + hedgehogs[i].hat);
    55         end;
    55         end;