mirror of
https://github.com/Q3Rally-Team/q3rally.git
synced 2025-02-16 17:21:04 +00:00
Replace fs_pure cvar with fs_unpure
Getting value of non-existant cvars in menu in ioquake3 will be 0. Flipping the logic for fs_pure allows changing sv_pure in the menu when running on unmodified ioquake3 engine (which lacks fs_pure/fs_unpure so they are treated as 0). This breaks compatiblity with older Q3RallySA UI VM. Though I recently broke compatibility with older Q3RallySA CGame/Game VMs to restore ioq3 compatibility anyway (removed asin/cos system calls).
This commit is contained in:
parent
14ae23ec80
commit
f746431813
5 changed files with 8 additions and 8 deletions
|
@ -2266,7 +2266,7 @@ static void ServerOptions_MenuInit( qboolean multiplayer ) {
|
||||||
s_serveroptions.pure.generic.y = y;
|
s_serveroptions.pure.generic.y = y;
|
||||||
s_serveroptions.pure.generic.name = "Pure Server:";
|
s_serveroptions.pure.generic.name = "Pure Server:";
|
||||||
|
|
||||||
if (!trap_Cvar_VariableValue( "fs_pure" )) {
|
if ( trap_Cvar_VariableValue( "fs_unpure" ) ) {
|
||||||
// ZTM: Don't let users think they can modify sv_pure, it won't work.
|
// ZTM: Don't let users think they can modify sv_pure, it won't work.
|
||||||
s_serveroptions.pure.generic.flags |= QMF_GRAYED;
|
s_serveroptions.pure.generic.flags |= QMF_GRAYED;
|
||||||
}
|
}
|
||||||
|
|
|
@ -55,7 +55,7 @@ static fileHandle_t logfile;
|
||||||
fileHandle_t com_journalFile; // events are written here
|
fileHandle_t com_journalFile; // events are written here
|
||||||
fileHandle_t com_journalDataFile; // config files are written here
|
fileHandle_t com_journalDataFile; // config files are written here
|
||||||
|
|
||||||
cvar_t *com_fs_pure;
|
cvar_t *com_fs_unpure;
|
||||||
cvar_t *com_speeds;
|
cvar_t *com_speeds;
|
||||||
cvar_t *com_developer;
|
cvar_t *com_developer;
|
||||||
cvar_t *com_dedicated;
|
cvar_t *com_dedicated;
|
||||||
|
@ -2715,7 +2715,7 @@ void Com_Init( char *commandLine ) {
|
||||||
if(!com_basegame->string[0])
|
if(!com_basegame->string[0])
|
||||||
Cvar_ForceReset("com_basegame");
|
Cvar_ForceReset("com_basegame");
|
||||||
|
|
||||||
com_fs_pure = Cvar_Get ("fs_pure", "1", CVAR_ROM);
|
com_fs_unpure = Cvar_Get ("fs_unpure", "0", CVAR_ROM);
|
||||||
|
|
||||||
FS_InitFilesystem ();
|
FS_InitFilesystem ();
|
||||||
|
|
||||||
|
|
|
@ -3702,7 +3702,7 @@ static void FS_CheckPaks( void )
|
||||||
int pak, total = 0;
|
int pak, total = 0;
|
||||||
|
|
||||||
// If we're not pure don't check
|
// If we're not pure don't check
|
||||||
if (com_fs_pure && !com_fs_pure->integer)
|
if (com_fs_unpure && com_fs_unpure->integer)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// Add up total value of foundPak
|
// Add up total value of foundPak
|
||||||
|
@ -3759,7 +3759,7 @@ static void FS_CheckPaks( void )
|
||||||
const char *line2 = "You need to reinstall " PRODUCT_NAME " in order to play on pure servers.";
|
const char *line2 = "You need to reinstall " PRODUCT_NAME " in order to play on pure servers.";
|
||||||
|
|
||||||
// server can't ever be pure (sv_pure), as we're missing the pure files.
|
// server can't ever be pure (sv_pure), as we're missing the pure files.
|
||||||
Cvar_Set("fs_pure", "0");
|
Cvar_Set("fs_unpure", "1");
|
||||||
|
|
||||||
if (invalidPak)
|
if (invalidPak)
|
||||||
line1 = "Default Pk3 file(s) are missing, corrupt, or modified.";
|
line1 = "Default Pk3 file(s) are missing, corrupt, or modified.";
|
||||||
|
|
|
@ -849,7 +849,7 @@ qboolean Com_FieldStringToPlayerName( char *name, int length, const char *rawna
|
||||||
int QDECL Com_strCompare( const void *a, const void *b );
|
int QDECL Com_strCompare( const void *a, const void *b );
|
||||||
|
|
||||||
|
|
||||||
extern cvar_t *com_fs_pure;
|
extern cvar_t *com_fs_unpure;
|
||||||
extern cvar_t *com_developer;
|
extern cvar_t *com_developer;
|
||||||
extern cvar_t *com_dedicated;
|
extern cvar_t *com_dedicated;
|
||||||
extern cvar_t *com_speeds;
|
extern cvar_t *com_speeds;
|
||||||
|
|
|
@ -564,7 +564,7 @@ void SV_SpawnServer( char *server, qboolean killBots ) {
|
||||||
svs.time += 100;
|
svs.time += 100;
|
||||||
|
|
||||||
// Force sv_pure to off.
|
// Force sv_pure to off.
|
||||||
if (sv_pure->integer && !com_fs_pure->integer) {
|
if (sv_pure->integer && com_fs_unpure->integer) {
|
||||||
Cvar_Set( "sv_pure", "0" );
|
Cvar_Set( "sv_pure", "0" );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -659,7 +659,7 @@ void SV_Init (void)
|
||||||
// systeminfo
|
// systeminfo
|
||||||
Cvar_Get ("sv_cheats", "1", CVAR_SYSTEMINFO | CVAR_ROM );
|
Cvar_Get ("sv_cheats", "1", CVAR_SYSTEMINFO | CVAR_ROM );
|
||||||
sv_serverid = Cvar_Get ("sv_serverid", "0", CVAR_SYSTEMINFO | CVAR_ROM );
|
sv_serverid = Cvar_Get ("sv_serverid", "0", CVAR_SYSTEMINFO | CVAR_ROM );
|
||||||
if (com_fs_pure && !com_fs_pure->integer) {
|
if (com_fs_unpure && com_fs_unpure->integer) {
|
||||||
sv_pure = Cvar_Get ("sv_pure", "0", CVAR_SYSTEMINFO | CVAR_ROM );
|
sv_pure = Cvar_Get ("sv_pure", "0", CVAR_SYSTEMINFO | CVAR_ROM );
|
||||||
} else {
|
} else {
|
||||||
sv_pure = Cvar_Get ("sv_pure", "1", CVAR_SYSTEMINFO );
|
sv_pure = Cvar_Get ("sv_pure", "1", CVAR_SYSTEMINFO );
|
||||||
|
|
Loading…
Reference in a new issue