hedgewars/uTeams.pas
changeset 12322 9aa483762025
parent 12276 12f28d866c76
child 12332 657a8d63c99d
equal deleted inserted replaced
12321:1be56fa243c8 12322:9aa483762025
    47 implementation
    47 implementation
    48 uses uLocale, uAmmos, uChat, uVariables, uUtils, uIO, uCaptions, uCommands, uDebug,
    48 uses uLocale, uAmmos, uChat, uVariables, uUtils, uIO, uCaptions, uCommands, uDebug,
    49     uGearsUtils, uGearsList, uVisualGearsList, uTextures
    49     uGearsUtils, uGearsList, uVisualGearsList, uTextures
    50     {$IFDEF USE_TOUCH_INTERFACE}, uTouch{$ENDIF};
    50     {$IFDEF USE_TOUCH_INTERFACE}, uTouch{$ENDIF};
    51 
    51 
    52 var GameOver: boolean;
    52 var TeamsGameOver: boolean;
    53     NextClan: boolean;
    53     NextClan: boolean;
    54 
    54 
    55 function CheckForWin: boolean;
    55 function CheckForWin: boolean;
    56 var AliveClan: PClan;
    56 var AliveClan: PClan;
    57     s, ts, cap: ansistring;
    57     s, ts, cap: ansistring;
    75 
    75 
    76 // if the game ends during a multishot, do last TurnReaction
    76 // if the game ends during a multishot, do last TurnReaction
    77 if (not bBetweenTurns) and isInMultiShoot then
    77 if (not bBetweenTurns) and isInMultiShoot then
    78     TurnReaction();
    78     TurnReaction();
    79 
    79 
    80 if not GameOver then
    80 if not TeamsGameOver then
    81     begin
    81     begin
    82     if AliveCount = 0 then
    82     if AliveCount = 0 then
    83         begin // draw
    83         begin // draw
    84         AddCaption(GetEventString(eidRoundDraw), cWhiteColor, capgrpGameState);
    84         AddCaption(GetEventString(eidRoundDraw), cWhiteColor, capgrpGameState);
    85         SendStat(siGameResult, shortstring(trmsg[sidDraw]));
    85         SendStat(siGameResult, shortstring(trmsg[sidDraw]));
   116             SendStat(siGameResult, shortstring(s));
   116             SendStat(siGameResult, shortstring(s));
   117             AddGear(0, 0, gtATFinishGame, 0, _0, _0, 3000)
   117             AddGear(0, 0, gtATFinishGame, 0, _0, _0, 3000)
   118             end;
   118             end;
   119     SendStats;
   119     SendStats;
   120     end;
   120     end;
       
   121 TeamsGameOver:= true;
   121 GameOver:= true
   122 GameOver:= true
   122 end;
   123 end;
   123 
   124 
   124 procedure SwitchHedgehog;
   125 procedure SwitchHedgehog;
   125 var c, i, t: LongWord;
   126 var c, i, t: LongWord;