diff --git a/src/game/g_console.pas b/src/game/g_console.pas
index 35f86b6ec63b27cdc9408d4e36bd84416cc111c2..2105faf013636025b9175cf27828dcc645462115 100644 (file)
--- a/src/game/g_console.pas
+++ b/src/game/g_console.pas
gChatTeam: Boolean = false;
gAllowConsoleMessages: Boolean = true;
gJustChatted: Boolean = false; // ÷òîáû àäìèí â èíòåðå ÷àòÿñü íå ïðîìàòûâàë ñòàòèñòèêó
- gParsingBinds: Boolean = false; // íå ïåðåñîõðàíÿòü êîíôèã âî âðåìÿ ïàðñèíãà
+ gParsingBinds: Boolean = true; // íå ïåðåñîõðàíÿòü êîíôèã âî âðåìÿ ïàðñèíãà
gPlayerAction: Array [0..1, 0..LAST_ACTION] of Boolean; // [player, action]
implementation
down, up: SSArray;
end;
menu_toggled: BOOLEAN; (* hack for menu controls *)
- gSkipFirstChar: Boolean; (* hack for console/chat input *)
procedure g_Console_Switch;
menu_toggled := True
end;
'toggleconsole':
- begin
- g_Console_Switch;
- gSkipFirstChar := g_Console_Interactive();
- end;
+ g_Console_Switch;
'togglechat':
- begin
- if not gConsoleShow and (g_ActiveWindow = nil) then
- g_Console_Chat_Switch;
- gSkipFirstChar := not g_Console_Interactive()
- end;
+ if not gConsoleShow and (g_ActiveWindow = nil) then
+ g_Console_Chat_Switch;
'toggleteamchat':
if gGameSettings.GameMode in [GM_TDM, GM_CTF] then
- begin
if not gConsoleShow and (g_ActiveWindow = nil) then
g_Console_Chat_Switch(True);
- gSkipFirstChar := not g_Console_Interactive()
- end;
end
end;
WhitelistCommand('g_scorelimit');
WhitelistCommand('g_timelimit');
- gParsingBinds := True;
g_Console_ResetBinds;
g_Console_ReadConfig(GameDir + '/dfconfig.cfg');
g_Console_ReadConfig(GameDir + '/autoexec.cfg');
procedure g_Console_Char(C: AnsiChar);
begin
- if not gSkipFirstChar then
- begin
- Insert(C, Line, CPos);
- CPos := CPos + 1;
- end;
- gSkipFirstChar := False
+ Insert(C, Line, CPos);
+ CPos := CPos + 1;
end;
IK_0, IK_1, IK_2, IK_3, IK_4, IK_5, IK_6, IK_7, IK_8, IK_9, IK_MINUS, IK_EQUALS:
(* see TEXTINPUT event *)
else
- if not gSkipFirstChar then
+ if gConsoleShow and not Cons_Shown and g_Console_MatchBind(K, 'toggleconsole') then
+ g_Console_Switch;
+ if g_Console_MatchBind(K, 'togglemenu') then
begin
- if gConsoleShow and g_Console_MatchBind(K, 'toggleconsole') then
- g_Console_Switch;
-
- if g_Console_MatchBind(K, 'togglemenu') then
- begin
- menu_toggled := True;
- if gChatShow then
- g_Console_Chat_Switch
- else if gConsoleShow then
- g_Console_Switch
- end
+ menu_toggled := True;
+ if gChatShow then
+ g_Console_Chat_Switch
+ else if gConsoleShow and not Cons_Shown then
+ g_Console_Switch
end
end
end;