X-Git-Url: http://deadsoftware.ru/gitweb?a=blobdiff_plain;f=src%2Fgame%2Fg_console.pas;h=94b65318a091c51e78dfa8f2fcfc268c489a8aa3;hb=0b34f8195a84d9aecc7cd9f17fd1902b7723e3b8;hp=6b8ddc82c2538e53156457e687d7e2a0fa1ae1c5;hpb=414f2873efa0cce84499f64774db7000e6268971;p=d2df-sdl.git diff --git a/src/game/g_console.pas b/src/game/g_console.pas index 6b8ddc8..94b6531 100644 --- a/src/game/g_console.pas +++ b/src/game/g_console.pas @@ -85,7 +85,7 @@ var implementation uses - g_textures, g_main, e_graphics, e_input, g_game, + g_textures, g_main, e_graphics, e_input, g_game, g_gfx, g_player, g_items, SysUtils, g_basic, g_options, Math, g_touch, e_res, g_menu, g_gui, g_language, g_net, g_netmsg, e_log, conbuf; @@ -594,7 +594,7 @@ begin // writeconfig if Length(p) = 2 then begin - s := e_GetDir(ConfigDirs); + s := e_GetWriteableDir(ConfigDirs); g_Console_WriteConfig(e_CatPath(s, p[1])) end else @@ -860,6 +860,14 @@ begin AddCommand('segfault', segfault, 'make segfault'); + AddCommand('r_reset', g_Options_Commands); + AddCommand('g_language', g_Options_Commands); + AddCommand('g_max_particles', g_Options_Commands); + AddCommand('g_max_shells', g_Options_Commands); + AddCommand('g_max_gibs', g_Options_Commands); + AddCommand('g_max_corpses', g_Options_Commands); + AddCommand('g_item_respawn_time', g_Options_Commands); + AddCommand('bind', BindCommands); AddCommand('bindlist', BindCommands); AddCommand('unbind', BindCommands); @@ -912,6 +920,7 @@ begin AddCommand('g_friendlyfire', GameCVars); AddCommand('g_weaponstay', GameCVars); AddCommand('g_allow_exit', GameCVars); + AddCommand('g_dm_keys', GameCVars); AddCommand('g_allow_monsters', GameCVars); AddCommand('g_bot_vsmonsters', GameCVars); AddCommand('g_bot_vsplayers', GameCVars); @@ -919,6 +928,7 @@ begin AddCommand('g_timelimit', GameCVars); AddCommand('g_maxlives', GameCVars); AddCommand('g_warmuptime', GameCVars); + AddCommand('g_spawn_invul', GameCVars); AddCommand('net_interp', GameCVars); AddCommand('net_forceplayerupdate', GameCVars); AddCommand('net_predictself', GameCVars); @@ -962,6 +972,7 @@ begin AddCommand('reconnect', GameCommands); AddCommand('say', GameCommands); AddCommand('tell', GameCommands); + AddCommand('centerprint', GameCommands); AddCommand('overtime', GameCommands); AddCommand('rcon_password', GameCommands); AddCommand('rcon', GameCommands); @@ -1008,6 +1019,7 @@ begin WhitelistCommand('restart'); WhitelistCommand('kick'); WhitelistCommand('ban'); + WhitelistCommand('centerprint'); WhitelistCommand('addbot'); WhitelistCommand('bot_add'); @@ -1022,6 +1034,9 @@ begin WhitelistCommand('g_allow_monsters'); WhitelistCommand('g_scorelimit'); WhitelistCommand('g_timelimit'); + WhitelistCommand('g_dm_keys'); + WhitelistCommand('g_spawn_invul'); + WhitelistCommand('g_warmuptime'); g_Console_ResetBinds; g_Console_ReadConfig(configScript); @@ -1931,6 +1946,25 @@ begin Write(f, ' ', QuoteStr(GetCommandString(gInputBinds[i].up))); WriteLn(f, ''); end; + if gAskLanguage then + WriteLn(f, 'g_language ask') + else + WriteLn(f, 'g_language ', gLanguage); + WriteLn(f, 'g_max_particles ', g_GFX_GetMax()); + WriteLn(f, 'g_max_shells ', g_Shells_GetMax()); + WriteLn(f, 'g_max_gibs ', g_Gibs_GetMax()); + WriteLn(f, 'g_max_corpses ', g_Corpses_GetMax()); + WriteLn(f, 'g_item_respawn_time ', ITEM_RESPAWNTIME div 36); + with gPlayer1Settings do + begin + WriteLn(f, 'p1_name ', QuoteStr(Name)); + WriteLn(f, 'p1_color ', Color.R, ' ', Color.G, ' ', Color.B); + end; + with gPlayer2Settings do + begin + WriteLn(f, 'p2_name ', QuoteStr(Name)); + WriteLn(f, 'p2_color ', Color.R, ' ', Color.G, ' ', Color.B); + end; for i := 0 to High(commands) do begin if not commands[i].cheat then @@ -1957,6 +1991,7 @@ begin end end end; + WriteLn(f, 'r_reset'); CloseFile(f) end; @@ -1965,12 +2000,14 @@ procedure g_Console_WriteGameConfig; begin if gParsingBinds = false then begin - s := e_GetDir(ConfigDirs); + s := e_GetWriteableDir(ConfigDirs); g_Console_WriteConfig(e_CatPath(s, configScript)) end end; -initialization +procedure Init; + var i: Integer; +begin conRegVar('chat_at_top', @ChatTop, 'draw chat at top border', 'draw chat at top border'); conRegVar('console_height', @ConsoleHeight, 0.0, 1.0, 'set console size', 'set console size'); conRegVar('console_trans', @ConsoleTrans, 0.0, 1.0, 'set console transparency', 'set console transparency'); @@ -1984,4 +2021,11 @@ initialization {$ENDIF} ConsoleTrans := 0.1; ConsoleStep := 0.07; + conRegVar('d_eres', @debug_e_res, '', ''); + for i := 1 to e_MaxJoys do + conRegVar('joy' + IntToStr(i) + '_deadzone', @e_JoystickDeadzones[i - 1], '', '') +end; + +initialization + Init end.