DEADSOFTWARE

Cosmetic: Replace "goal" with "score" everywhere in game code
[d2df-sdl.git] / src / game / g_console.pas
index 7ae8166192d7c16994c1855083076335fbf88d3a..f297cb1403a622d270d7bc42468dfb35854416f4 100644 (file)
@@ -1084,6 +1084,7 @@ begin
   AddCommand('g_throw_flag', GameCVars);
   AddCommand('g_bot_vsmonsters', GameCVars);
   AddCommand('g_bot_vsplayers', GameCVars);
+  AddCommand('g_max_bots', GameCVars); // intentionally not whitelisted
   AddCommand('g_scorelimit', GameCVars);
   AddCommand('g_timelimit', GameCVars);
   AddCommand('g_maxlives', GameCVars);
@@ -1942,10 +1943,13 @@ begin
   i := 0;
   while (n >= 1) and (i < e_MaxInputKeys) do
   begin
-    if g_Console_MatchBind(i, down, up) then
+    if (i < VK_FIRSTKEY) or (i > VK_LASTKEY) then (* never show virtual keys in gui *)
     begin
-      result := i;
-      dec(n)
+      if g_Console_MatchBind(i, down, up) then
+      begin
+        result := i;
+        dec(n)
+      end;
     end;
     inc(i)
   end;
@@ -2186,7 +2190,7 @@ begin
 
   // gameplay settings
   WriteLn(f, 'g_gamemode ', gsGameMode);
-  WriteLn(f, 'g_scorelimit ', gsGoalLimit);
+  WriteLn(f, 'g_scorelimit ', gsScoreLimit);
   WriteLn(f, 'g_timelimit ', gsTimeLimit);
   WriteLn(f, 'g_maxlives ', gsMaxLives);
   WriteLn(f, 'g_item_respawn_time ', gsItemRespawnTime);