X-Git-Url: http://deadsoftware.ru/gitweb?p=d2df-sdl.git;a=blobdiff_plain;f=src%2Fgame%2Fg_console.pas;h=a6fa9c42e78673a7434f7cf500d22a601a5a5ee0;hp=8eaad1226f490e9620fcce2e42fed3a1029f9fc5;hb=886be406b752b92fc9ba2064a5cb5d1bcd981d61;hpb=a9b641b6421fe1ab2ae3ffdf6a7fb41c56df1970 diff --git a/src/game/g_console.pas b/src/game/g_console.pas index 8eaad12..a6fa9c4 100644 --- a/src/game/g_console.pas +++ b/src/game/g_console.pas @@ -1032,6 +1032,8 @@ begin AddCommand('p2_color', PlayerSettingsCVars); AddCommand('p1_model', PlayerSettingsCVars); AddCommand('p2_model', PlayerSettingsCVars); + AddCommand('p1_team', PlayerSettingsCVars); + AddCommand('p2_team', PlayerSettingsCVars); AddCommand('g_max_particles', GameCVars); AddCommand('g_max_shells', GameCVars); @@ -2086,6 +2088,14 @@ procedure g_Console_WriteConfig (filename: String); WriteLn(f, name, IfThen(LongBool(gsGameFlags and flag), 1, 0)); end; + function FormatTeam(team: Byte): string; + begin + if team = TEAM_BLUE then + result := 'blue' + else + result := 'red'; + end; + begin AssignFile(f, filename); Rewrite(f); @@ -2151,12 +2161,14 @@ begin WriteLn(f, 'p1_name ', QuoteStr(Name)); WriteLn(f, 'p1_color ', Color.R, ' ', Color.G, ' ', Color.B); WriteLn(f, 'p1_model ', QuoteStr(Model)); + WriteLn(f, 'p1_team ', FormatTeam(Team)); end; with gPlayer2Settings do begin WriteLn(f, 'p2_name ', QuoteStr(Name)); WriteLn(f, 'p2_color ', Color.R, ' ', Color.G, ' ', Color.B); WriteLn(f, 'p2_model ', QuoteStr(Model)); + WriteLn(f, 'p2_team ', FormatTeam(Team)); end; // all cvars