mirror of
https://github.com/yquake2/yquake2remaster.git
synced 2024-11-10 07:12:07 +00:00
Remove the portable cvar, use is_portable instead.
Having a command line option and a cvar is confusing, especially since the cvar doesn't make the game really portable.
This commit is contained in:
parent
383f667c46
commit
f311308713
4 changed files with 3 additions and 14 deletions
|
@ -785,7 +785,7 @@ Key_WriteConsoleHistory()
|
|||
int i;
|
||||
char path[MAX_OSPATH];
|
||||
|
||||
if (portable->value)
|
||||
if (is_portable)
|
||||
{
|
||||
Com_sprintf(path, sizeof(path), "%sconsole_history.txt", Sys_GetBinaryDir());
|
||||
}
|
||||
|
@ -832,7 +832,7 @@ Key_ReadConsoleHistory()
|
|||
|
||||
char path[MAX_OSPATH];
|
||||
|
||||
if (portable->value)
|
||||
if (is_portable)
|
||||
{
|
||||
Com_sprintf(path, sizeof(path), "%sconsole_history.txt", Sys_GetBinaryDir());
|
||||
}
|
||||
|
|
|
@ -1533,7 +1533,7 @@ void FS_AddDirToRawPath (const char *dir, qboolean create, qboolean screenshot)
|
|||
void FS_BuildRawPath(void) {
|
||||
// Add $HOME/.yq2/baseq2
|
||||
// (MUST be the last dir!)
|
||||
if (!portable->value) {
|
||||
if (!is_portable) {
|
||||
const char *homedir = Sys_GetHomeDir();
|
||||
|
||||
if (homedir != NULL) {
|
||||
|
|
|
@ -726,7 +726,6 @@ extern cvar_t *modder;
|
|||
extern cvar_t *dedicated;
|
||||
extern cvar_t *host_speeds;
|
||||
extern cvar_t *log_stats;
|
||||
extern cvar_t *portable;
|
||||
|
||||
/* Hack for portable client */
|
||||
extern qboolean is_portable;
|
||||
|
|
|
@ -213,16 +213,6 @@ Qcommon_Init(int argc, char **argv)
|
|||
Cbuf_AddEarlyCommands(false);
|
||||
Cbuf_Execute();
|
||||
|
||||
/* Be portable, don't add HOME to the search path.
|
||||
Doing it here is a hack. We need a working cvar
|
||||
subsystem to create the cvar. But it must be
|
||||
created before the file system is initialized. */
|
||||
if (is_portable) {
|
||||
portable = Cvar_Get("portable", "1", CVAR_NOSET);
|
||||
} else {
|
||||
portable = Cvar_Get("portable", "0", CVAR_NOSET);
|
||||
}
|
||||
|
||||
FS_InitFilesystem();
|
||||
|
||||
Cbuf_AddText("exec default.cfg\n");
|
||||
|
|
Loading…
Reference in a new issue