X-Git-Url: http://deadsoftware.ru/gitweb?a=blobdiff_plain;f=src%2Fgame%2Fg_console.pas;h=15497d913a59a0beb136e3909bd3a64e930d9d39;hb=1e0f0d41e9a104418c9dc17598859b23b02d1e9c;hp=8eaad1226f490e9620fcce2e42fed3a1029f9fc5;hpb=a9b641b6421fe1ab2ae3ffdf6a7fb41c56df1970;p=d2df-sdl.git diff --git a/src/game/g_console.pas b/src/game/g_console.pas index 8eaad12..15497d9 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); @@ -1041,6 +1043,7 @@ begin AddCommand('g_friendlyfire', GameCVars); AddCommand('g_friendly_hit_trace', GameCVars); AddCommand('g_friendly_hit_projectile', GameCVars); + AddCommand('g_friendly_absorb_damage', GameCVars); AddCommand('g_weaponstay', GameCVars); AddCommand('g_allow_exit', GameCVars); AddCommand('g_dm_keys', GameCVars); @@ -1158,6 +1161,7 @@ begin WhitelistCommand('g_friendlyfire'); WhitelistCommand('g_friendly_hit_trace'); WhitelistCommand('g_friendly_hit_projectile'); + WhitelistCommand('g_friendly_absorb_damage'); WhitelistCommand('g_weaponstay'); WhitelistCommand('g_allow_exit'); WhitelistCommand('g_dm_keys'); @@ -2086,6 +2090,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 +2163,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