Skip to content

Commit

Permalink
Removed CVAR autifastload replaced by autoload = 3, exposed as 'Load …
Browse files Browse the repository at this point in the history
…last save = Ultra-fast'
  • Loading branch information
vsonnier committed Jul 21, 2024
1 parent 4db17a5 commit a6d37c4
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 7 deletions.
2 changes: 0 additions & 2 deletions Quake/host.c
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ cvar_t coop = {"coop", "0", CVAR_NONE}; // 0 or 1
cvar_t pausable = {"pausable", "1", CVAR_NONE};

cvar_t autoload = {"autoload", "1", CVAR_ARCHIVE};
cvar_t autofastload = {"autofastload", "0", CVAR_ARCHIVE};

cvar_t developer = {"developer", "0", CVAR_NONE};

Expand Down Expand Up @@ -364,7 +363,6 @@ void Host_InitLocal (void)
Cvar_RegisterVariable (&pausable);

Cvar_RegisterVariable (&autoload);
Cvar_RegisterVariable (&autofastload);

Cvar_RegisterVariable (&temp1);

Expand Down
3 changes: 1 addition & 2 deletions Quake/host_cmd.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.

extern cvar_t pausable;
extern cvar_t autoload;
extern cvar_t autofastload;

int current_skill;

Expand Down Expand Up @@ -1311,7 +1310,7 @@ static void Host_Loadgame_f (void)
float spawn_parms[NUM_TOTAL_SPAWN_PARMS];
qboolean was_recording = cls.demorecording;
int old_skill = current_skill;
qboolean fastload = !!strstr (Cmd_Argv (0), "fast") || autofastload.value;
qboolean fastload = !!strstr (Cmd_Argv (0), "fast") || autoload.value >= 3;

if (cmd_source != src_command)
return;
Expand Down
14 changes: 11 additions & 3 deletions Quake/menu.c
Original file line number Diff line number Diff line change
Expand Up @@ -1443,8 +1443,8 @@ static void M_GameOptions_AdjustSliders (int dir, qboolean mouse)
case GAME_OPT_HUD_STYLE:
Cvar_SetValue ("scr_style", ((int)scr_style.value + 3 + dir) % 3);
break;
case GAME_OPT_AUTOLOAD: // load last save on death
Cvar_SetValue ("autoload", ((int)autoload.value + 3 + dir) % 3);
case GAME_OPT_AUTOLOAD: // load last save behaviour
Cvar_SetValue ("autoload", ((int)autoload.value + 4 + dir) % 4);
break;
case GAME_OPT_STARTUP_DEMOS:
Cvar_SetValue ("cl_startdemos", ((int)cl_startdemos.value + 2 + dir) % 2);
Expand Down Expand Up @@ -1585,7 +1585,15 @@ static void M_GameOptions_Draw (cb_context_t *cbx)

case GAME_OPT_AUTOLOAD:
M_Print (cbx, MENU_LABEL_X, y, "Load last save");
M_Print (cbx, MENU_VALUE_X, y, (autoload.value >= 2) ? "fast" : (autoload.value ? "on" : "off"));

if (autoload.value >= 2)
{
M_Print (cbx, MENU_VALUE_X, y, (autoload.value >= 3) ? "Ultra-fast" : "fast");
}
else
{
M_Print (cbx, MENU_VALUE_X, y, autoload.value ? "on" : "off");
}
break;

case GAME_OPT_STARTUP_DEMOS:
Expand Down

0 comments on commit a6d37c4

Please sign in to comment.