hedgewars/uTeams.pas
changeset 3774 af0e68ca273e
parent 3773 f552c7b439fa
child 3798 7dcfdd595b30
equal deleted inserted replaced
3773:f552c7b439fa 3774:af0e68ca273e
   135 if (AliveCount > 1)
   135 if (AliveCount > 1)
   136 or ((AliveCount = 1) and ((GameFlags and gfOneClanMode) <> 0)) then exit(false);
   136 or ((AliveCount = 1) and ((GameFlags and gfOneClanMode) <> 0)) then exit(false);
   137 CheckForWin:= true;
   137 CheckForWin:= true;
   138 
   138 
   139 TurnTimeLeft:= 0;
   139 TurnTimeLeft:= 0;
       
   140 ReadyTimeLeft:= 0;
   140 if AliveCount = 0 then
   141 if AliveCount = 0 then
   141     begin // draw
   142     begin // draw
   142     AddCaption(trmsg[sidDraw], cWhiteColor, capgrpGameState);
   143     AddCaption(trmsg[sidDraw], cWhiteColor, capgrpGameState);
   143     SendStat(siGameResult, trmsg[sidDraw]);
   144     SendStat(siGameResult, trmsg[sidDraw]);
   144     AddGear(0, 0, gtATFinishGame, 0, _0, _0, 3000)
   145     AddGear(0, 0, gtATFinishGame, 0, _0, _0, 3000)
   272 
   273 
   273 if not CurrentTeam^.ExtDriven then SetBinds(CurrentTeam^.Binds);
   274 if not CurrentTeam^.ExtDriven then SetBinds(CurrentTeam^.Binds);
   274 
   275 
   275 bShowFinger:= true;
   276 bShowFinger:= true;
   276 
   277 
   277 if (CurrentTeam^.ExtDriven or (CurrentHedgehog^.BotLevel > 0)) then
       
   278     PlaySound(sndIllGetYou, CurrentTeam^.voicepack)
       
   279 else
       
   280     PlaySound(sndYesSir, CurrentTeam^.voicepack);
       
   281 
       
   282 if PlacingHogs then
   278 if PlacingHogs then
   283    begin
   279    begin
   284    if CurrentHedgehog^.Unplaced then TurnTimeLeft:= 15000
   280    if CurrentHedgehog^.Unplaced then TurnTimeLeft:= 15000
   285    else TurnTimeLeft:= 0
   281    else TurnTimeLeft:= 0
   286    end
   282    end
   287 else TurnTimeLeft:= cHedgehogTurnTime
   283 else TurnTimeLeft:= cHedgehogTurnTime;
       
   284 if (TurnTimeLeft > 0) and (CurrentHedgehog^.BotLevel = 0) then
       
   285     begin
       
   286     PlaySound(sndComeonthen, CurrentTeam^.voicepack);
       
   287     ReadyTimeLeft:= cReadyDelay
       
   288     end
       
   289 else
       
   290     ReadyTimeLeft:= 0;
   288 end;
   291 end;
   289 
   292 
   290 function AddTeam(TeamColor: Longword): PTeam;
   293 function AddTeam(TeamColor: Longword): PTeam;
   291 var team: PTeam;
   294 var team: PTeam;
   292     c: LongInt;
   295     c: LongInt;