X-Git-Url: https://deadsoftware.ru/gitweb?a=blobdiff_plain;f=src%2Fgame%2Fg_console.pas;h=31bce9a1aa2ef7f026ce71cd57e55637a6373b19;hb=d1e9c820c486228a7f80ac8c1e2928abea10f0bd;hp=fc78ef05502bd56ac0e99bd60fe7ffde303befc0;hpb=dfd3e97bffa213f5b21206b8a292b80180bab948;p=d2df-sdl.git diff --git a/src/game/g_console.pas b/src/game/g_console.pas index fc78ef0..31bce9a 100644 --- a/src/game/g_console.pas +++ b/src/game/g_console.pas @@ -27,8 +27,8 @@ implementation uses g_textures, g_main, e_graphics, e_input, g_game, - SysUtils, g_basic, g_options, WADEDITOR, Math, - g_menu, g_language, g_net, g_netmsg; + SysUtils, g_basic, g_options, wadreader, Math, + g_menu, g_language, g_net, g_netmsg, e_log; type TCmdProc = procedure (P: SArray); @@ -442,6 +442,18 @@ begin AddCommand('clientlist', GameCommands); AddCommand('event', GameCommands); + AddCommand('god', GameCheats); + AddCommand('notarget', GameCheats); + AddCommand('give', GameCheats); // "exit" too ;-) + AddCommand('open', GameCheats); + AddCommand('fly', GameCheats); + AddCommand('noclip', GameCheats); + AddCommand('speedy', GameCheats); + AddCommand('jumpy', GameCheats); + AddCommand('noreload', GameCheats); + AddCommand('aimline', GameCheats); + AddCommand('automap', GameCheats); + WhitelistCommand('say'); WhitelistCommand('tell'); WhitelistCommand('overtime'); @@ -666,13 +678,13 @@ begin IK_DELETE: if (Length(Line) > 0) and (CPos <= Length(Line)) then Delete(Line, CPos, 1); - IK_LEFT: + IK_LEFT, IK_KPLEFT: if CPos > 1 then CPos := CPos - 1; - IK_RIGHT: + IK_RIGHT, IK_KPRIGHT: if CPos <= Length(Line) then CPos := CPos + 1; - IK_RETURN: + IK_RETURN, IK_KPRETURN: begin if Cons_Shown then g_Console_Process(Line) @@ -708,7 +720,7 @@ begin IK_TAB: if not gChatShow then Complete(); - IK_DOWN: + IK_DOWN, IK_KPDOWN: if not gChatShow then if (CommandHistory <> nil) and (CmdIndex < Length(CommandHistory)) then @@ -718,7 +730,7 @@ begin Line := CommandHistory[CmdIndex]; CPos := Length(Line) + 1; end; - IK_UP: + IK_UP, IK_KPUP: if not gChatShow then if (CommandHistory <> nil) and (CmdIndex <= Length(CommandHistory)) then @@ -728,15 +740,15 @@ begin Line := CommandHistory[CmdIndex]; Cpos := Length(Line) + 1; end; - IK_PAGEUP: // PgUp + IK_PAGEUP, IK_KPPAGEUP: // PgUp if not gChatShow then IncMax(OffSet, Length(ConsoleHistory)-1); - IK_PAGEDN: // PgDown + IK_PAGEDN, IK_KPPAGEDN: // PgDown if not gChatShow then DecMin(OffSet, 0); - IK_HOME: + IK_HOME, IK_KPHOME: CPos := 1; - IK_END: + IK_END, IK_KPEND: CPos := Length(Line) + 1; end; end; @@ -820,6 +832,10 @@ begin Time := MsgTime; end; end; + +{$IFDEF HEADLESS} + e_WriteLog('CON: ' + L, MSG_NOTIFY); +{$ENDIF} end; procedure g_Console_Clear();