equal
deleted
inserted
replaced
1 (* |
1 (* |
2 * Hedgewars, a free turn based strategy game |
2 * Hedgewars, a free turn based strategy game |
3 * Copyright (c) 2004-2014 Andrey Korotaev <unC0Rr@gmail.com> |
3 * Copyright (c) 2004-2015 Andrey Korotaev <unC0Rr@gmail.com> |
4 * |
4 * |
5 * This program is free software; you can redistribute it and/or modify |
5 * This program is free software; you can redistribute it and/or modify |
6 * it under the terms of the GNU General Public License as published by |
6 * it under the terms of the GNU General Public License as published by |
7 * the Free Software Foundation; version 2 of the License |
7 * the Free Software Foundation; version 2 of the License |
8 * |
8 * |
663 for i:= 0 to Pred(TeamsCount) do |
663 for i:= 0 to Pred(TeamsCount) do |
664 with TeamsArray[i]^ do |
664 with TeamsArray[i]^ do |
665 begin |
665 begin |
666 if (not hasGone) and isGoneFlagPendingToBeSet then |
666 if (not hasGone) and isGoneFlagPendingToBeSet then |
667 begin |
667 begin |
668 AddChatString('** '+ TeamName + ' is gone'); // TODO: localize |
668 AddChatString(#7 + '* '+ TeamName + ' is gone'); // TODO: localize |
669 if not CurrentTeam^.ExtDriven then SendIPC(_S'f' + s); |
669 if not CurrentTeam^.ExtDriven then SendIPC(_S'f' + s); |
670 hasGone:= true; |
670 hasGone:= true; |
671 skippedTurns:= 0; |
671 skippedTurns:= 0; |
672 isGoneFlagPendingToBeSet:= false; |
672 isGoneFlagPendingToBeSet:= false; |
673 RecountTeamHealth(TeamsArray[i]) |
673 RecountTeamHealth(TeamsArray[i]) |
702 if isSynced then |
702 if isSynced then |
703 begin |
703 begin |
704 with TeamsArray[t]^ do |
704 with TeamsArray[t]^ do |
705 if hasGone then |
705 if hasGone then |
706 begin |
706 begin |
707 AddChatString('** '+ TeamName + ' is back'); |
707 AddChatString(#8 + '* '+ TeamName + ' is back'); |
708 if not CurrentTeam^.ExtDriven then SendIPC(_S'g' + s); |
708 if not CurrentTeam^.ExtDriven then SendIPC(_S'g' + s); |
709 hasGone:= false; |
709 hasGone:= false; |
710 |
710 |
711 RecountTeamHealth(TeamsArray[t]); |
711 RecountTeamHealth(TeamsArray[t]); |
712 |
712 |
730 var t: LongInt; |
730 var t: LongInt; |
731 begin |
731 begin |
732 // avoid compiler hint |
732 // avoid compiler hint |
733 s:= s; |
733 s:= s; |
734 |
734 |
|
735 isPaused:= false; |
|
736 |
735 t:= 0; |
737 t:= 0; |
736 while t < TeamsCount do |
738 while t < TeamsCount do |
737 begin |
739 begin |
738 TeamsArray[t]^.hasGone:= true; |
740 TeamsArray[t]^.hasGone:= true; |
739 inc(t) |
741 inc(t) |
740 end; |
742 end; |
741 |
743 |
742 AddChatString('** Good-bye!'); |
744 AddChatString(#7 + '* Good-bye!'); |
743 RecountAllTeamsHealth(); |
745 RecountAllTeamsHealth(); |
744 end; |
746 end; |
745 |
747 |
746 procedure SwitchCurrentHedgehog(newHog: PHedgehog); |
748 procedure SwitchCurrentHedgehog(newHog: PHedgehog); |
747 var oldCI, newCI: boolean; |
749 var oldCI, newCI: boolean; |