hedgewars/uTeams.pas
changeset 2905 f3c79f7193a9
parent 2874 3c7c2bf1ba38
child 2948 3f21a9dc93d0
equal deleted inserted replaced
2904:209a0c573917 2905:f3c79f7193a9
    49 			MultiShootAttacks: Longword;
    49 			MultiShootAttacks: Longword;
    50 			visStepPos: LongWord;
    50 			visStepPos: LongWord;
    51 			BotLevel  : LongWord; // 0 - Human player
    51 			BotLevel  : LongWord; // 0 - Human player
    52 			HatVisibility: GLfloat;
    52 			HatVisibility: GLfloat;
    53 			stats: TStatistics;
    53 			stats: TStatistics;
    54 			Hat: String;
    54 			Hat: shortstring;
    55             King: boolean;  // Flag for a bunch of hedgehog attributes
    55             King: boolean;  // Flag for a bunch of hedgehog attributes
    56             Unplaced: boolean;  // Flag for hog placing mode
    56             Unplaced: boolean;  // Flag for hog placing mode
    57 			end;
    57 			end;
    58 
    58 
    59 	TTeam = record
    59 	TTeam = record
    66 			NameTagTex: PTexture;
    66 			NameTagTex: PTexture;
    67 			CrosshairTex,
    67 			CrosshairTex,
    68 			GraveTex,
    68 			GraveTex,
    69 			HealthTex,
    69 			HealthTex,
    70 			FlagTex: PTexture;
    70 			FlagTex: PTexture;
    71 			Flag: string;
    71 			Flag: shortstring;
    72 			GraveName: string;
    72 			GraveName: shortstring;
    73 			FortName: string;
    73 			FortName: shortstring;
    74 			TeamHealth: LongInt;
    74 			TeamHealth: LongInt;
    75 			TeamHealthBarWidth,
    75 			TeamHealthBarWidth,
    76 			NewTeamHealthBarWidth: LongInt;
    76 			NewTeamHealthBarWidth: LongInt;
    77 			DrawHealthY: LongInt;
    77 			DrawHealthY: LongInt;
    78 			AttackBar: LongWord;
    78 			AttackBar: LongWord;
    79 			HedgehogsNumber: Longword;
    79 			HedgehogsNumber: Longword;
    80 			hasGone: boolean;
    80 			hasGone: boolean;
    81 			voicepack: PVoicepack;
    81 			voicepack: PVoicepack;
    82             PlayerHash: string;   // md5 hash of player name. For temporary enabling of hats as thank you. Hashed for privacy of players
    82             PlayerHash: shortstring;   // md5 hash of player name. For temporary enabling of hats as thank you. Hashed for privacy of players
    83 			end;
    83 			end;
    84 
    84 
    85 	TClan = record
    85 	TClan = record
    86 			Color: Longword;
    86 			Color: Longword;
    87 			Teams: array[0..Pred(cMaxTeams)] of PTeam;
    87 			Teams: array[0..Pred(cMaxTeams)] of PTeam;
   145 	AddGear(0, 0, gtATFinishGame, 0, _0, _0, 3000)
   145 	AddGear(0, 0, gtATFinishGame, 0, _0, _0, 3000)
   146 	end else // win
   146 	end else // win
   147 	with AliveClan^ do
   147 	with AliveClan^ do
   148 		begin
   148 		begin
   149 		if TeamsNumber = 1 then
   149 		if TeamsNumber = 1 then
   150 			s:= Format(trmsg[sidWinner], Teams[0]^.TeamName)  // team wins
   150 			s:= Format(shortstring(trmsg[sidWinner]), Teams[0]^.TeamName)  // team wins
   151 		else
   151 		else
   152 			s:= Format(trmsg[sidWinner], Teams[0]^.TeamName); // clan wins
   152 			s:= Format(shortstring(trmsg[sidWinner]), Teams[0]^.TeamName); // clan wins
   153 
   153 
   154 		for j:= 0 to Pred(TeamsNumber) do
   154 		for j:= 0 to Pred(TeamsNumber) do
   155 			with Teams[j]^ do
   155 			with Teams[j]^ do
   156 				for i:= 0 to cMaxHHIndex do
   156 				for i:= 0 to cMaxHHIndex do
   157 					with Hedgehogs[i] do
   157 					with Hedgehogs[i] do