hedgewars/uTeams.pas
changeset 13867 086aa3ae097f
parent 13864 f68bb13f7bc7
child 13877 8c702a4839ec
equal deleted inserted replaced
13866:b15ad95320fe 13867:086aa3ae097f
   780 end;
   780 end;
   781 
   781 
   782 procedure chTeamGone(var s:shortstring);
   782 procedure chTeamGone(var s:shortstring);
   783 var t, i: LongInt;
   783 var t, i: LongInt;
   784     isSynced: boolean;
   784     isSynced: boolean;
   785     tmp: ansistring;
   785     tmp: shortstring;
   786 begin
   786 begin
   787     isSynced:= s[1] = 's';
   787     isSynced:= s[1] = 's';
   788 
   788 
   789     Delete(s, 1, 1);
   789     Delete(s, 1, 1);
   790 
   790 
   803                 begin
   803                 begin
   804                 if (not hasGone) and isGoneFlagPendingToBeSet then
   804                 if (not hasGone) and isGoneFlagPendingToBeSet then
   805                     begin
   805                     begin
   806                     tmp:= ' ' + trmsg[sidTeamGone];
   806                     tmp:= ' ' + trmsg[sidTeamGone];
   807                     tmp:= '*' + tmp;
   807                     tmp:= '*' + tmp;
   808                     AddChatString(#7 + FormatA(tmp, TeamName));
   808                     AddChatString(#7 + Format(tmp, TeamName));
   809                     if not CurrentTeam^.ExtDriven then SendIPC(_S'f' + s);
   809                     if not CurrentTeam^.ExtDriven then SendIPC(_S'f' + s);
   810                     hasGone:= true;
   810                     hasGone:= true;
   811                     skippedTurns:= 0;
   811                     skippedTurns:= 0;
   812                     isGoneFlagPendingToBeSet:= false;
   812                     isGoneFlagPendingToBeSet:= false;
   813                     RecountTeamHealth(TeamsArray[i])
   813                     RecountTeamHealth(TeamsArray[i])
   826 end;
   826 end;
   827 
   827 
   828 procedure chTeamBack(var s:shortstring);
   828 procedure chTeamBack(var s:shortstring);
   829 var t: LongInt;
   829 var t: LongInt;
   830     isSynced: boolean;
   830     isSynced: boolean;
   831     tmp: ansistring;
   831     tmp: shortstring;
   832 begin
   832 begin
   833     isSynced:= s[1] = 's';
   833     isSynced:= s[1] = 's';
   834 
   834 
   835     Delete(s, 1, 1);
   835     Delete(s, 1, 1);
   836 
   836 
   844         begin
   844         begin
   845         with TeamsArray[t]^ do
   845         with TeamsArray[t]^ do
   846             if hasGone then
   846             if hasGone then
   847                 begin
   847                 begin
   848                 tmp:= ' '+trmsg[sidTeamBack];
   848                 tmp:= ' '+trmsg[sidTeamBack];
   849                 tmp:= '*'+trmsg[sidTeamBack];
   849                 tmp:= '*'+tmp;
   850                 AddChatString(#8 + FormatA(tmp, TeamName));
   850                 AddChatString(#8 + Format(tmp, TeamName));
   851                 if not CurrentTeam^.ExtDriven then SendIPC(_S'g' + s);
   851                 if not CurrentTeam^.ExtDriven then SendIPC(_S'g' + s);
   852                 hasGone:= false;
   852                 hasGone:= false;
   853 
   853 
   854                 RecountTeamHealth(TeamsArray[t]);
   854                 RecountTeamHealth(TeamsArray[t]);
   855 
   855