hedgewars/uTeams.pas
branchflibqtfrontend
changeset 8363 0b4ac686fc44
parent 8351 f895be37b607
child 8370 0c79946e96f8
equal deleted inserted replaced
8306:50fe80adbfcb 8363:0b4ac686fc44
   319              AddVoice(sndIllGetYou, CurrentTeam^.voicepack)
   319              AddVoice(sndIllGetYou, CurrentTeam^.voicepack)
   320         else AddVoice(sndJustYouWait, CurrentTeam^.voicepack)
   320         else AddVoice(sndJustYouWait, CurrentTeam^.voicepack)
   321         end;
   321         end;
   322     ReadyTimeLeft:= 0
   322     ReadyTimeLeft:= 0
   323     end;
   323     end;
   324 
       
   325 {$IFDEF SDL13}
       
   326 uTouch.NewTurnBeginning();
       
   327 {$ENDIF}
       
   328 ScriptCall('onNewTurn');
       
   329 end;
   324 end;
   330 
   325 
   331 function AddTeam(TeamColor: Longword): PTeam;
   326 function AddTeam(TeamColor: Longword): PTeam;
   332 var team: PTeam;
   327 var team: PTeam;
   333     c: LongInt;
   328     c, t: LongInt;
   334 begin
   329 begin
   335 TryDo(TeamsCount < cMaxTeams, 'Too many teams', true);
   330 TryDo(TeamsCount < cMaxTeams, 'Too many teams', true);
   336 New(team);
   331 New(team);
   337 TryDo(team <> nil, 'AddTeam: team = nil', true);
   332 TryDo(team <> nil, 'AddTeam: team = nil', true);
   338 FillChar(team^, sizeof(TTeam), 0);
   333 FillChar(team^, sizeof(TTeam), 0);
   340 team^.CurrHedgehog:= 0;
   335 team^.CurrHedgehog:= 0;
   341 team^.Flag:= 'hedgewars';
   336 team^.Flag:= 'hedgewars';
   342 
   337 
   343 TeamsArray[TeamsCount]:= team;
   338 TeamsArray[TeamsCount]:= team;
   344 inc(TeamsCount);
   339 inc(TeamsCount);
       
   340 
       
   341 for t:= 0 to cKbdMaxIndex do
       
   342     team^.Binds[t]:= '';
   345 
   343 
   346 c:= Pred(ClansCount);
   344 c:= Pred(ClansCount);
   347 while (c >= 0) and (ClansArray[c]^.Color <> TeamColor) do dec(c);
   345 while (c >= 0) and (ClansArray[c]^.Color <> TeamColor) do dec(c);
   348 if c < 0 then
   346 if c < 0 then
   349     begin
   347     begin