Multiplayer Server changes

- Include demo pk3 in apk
- copy autoexec and demo pk3 on startup
- support running demo out of the box
- some cvars from VR_Bummser for smoother multiplayer client experience
- Ceno's multiplayer server IPs as favourites
This commit is contained in:
Simon 2022-02-12 23:39:56 +00:00
parent ba5b9f9ae4
commit dba25f1d52
10 changed files with 41 additions and 11 deletions

View file

@ -0,0 +1,20 @@
bind LEFTARROW +moveleft
bind RIGHTARROW +moveright
sensitivity 100
set in_joystick 1
set r_externalGLSL 1
set r_stereoEnabled 1
set r_mode -2
set cg_runpitch 0
set cg_runroll 0
set cg_bobup 0
set cg_bobpitch 0
set cg_bobroll 0
set cg_weaponbob 0
set sv_pure 0
seta server1 "13.38.149.128:27960"
seta server2 "13.38.149.128:27961"
seta server3 "13.38.149.128:27962"
seta server4 "54.161.107.61:27960"
seta server5 "54.161.107.61:27961"
seta server6 "54.161.107.61:27962"

View file

@ -0,0 +1 @@
+set fs_basepath /sdcard/ioquake3Quest/ +set fs_game baseq3 +set fs_basegame baseq3 +password drbeef

Binary file not shown.

Binary file not shown.

View file

@ -1,11 +1,13 @@
package com.drbeef.ioq3quest;
import android.Manifest;
import android.content.Context;
import android.content.pm.PackageManager;
import android.content.res.AssetManager;
import android.os.Bundle;
import android.os.Environment;
import android.util.Log;
import android.view.inputmethod.InputMethodManager;
import androidx.core.app.ActivityCompat;
import androidx.core.content.ContextCompat;
@ -43,6 +45,9 @@ public class MainActivity extends SDLActivity
checkPermissionsAndInitialize();
} catch (Exception e) {}
super.onCreate(savedInstanceState);
//InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);
//imm.toggleSoftInput(InputMethodManager.SHOW_FORCED, 0);
}
/** Initializes the Activity only if the permission has been granted. */
@ -105,11 +110,16 @@ public class MainActivity extends SDLActivity
//Copy the command line params file
copy_asset("/sdcard/ioquake3Quest", "commandline.txt", false);
copy_asset("/sdcard/ioquake3Quest/baseq3", "autoexec.cfg", false);
//copy demo
copy_asset("/sdcard/ioquake3Quest/baseq3", "pak0.pk3", false);
//glsl
copy_asset("/sdcard/ioquake3Quest", "glsl.zip", true);
new File("/sdcard/ioquake3Quest/baseq3/glsl").mkdirs();
unzip(new File("/sdcard/ioquake3Quest/glsl.zip"), new File("/sdcard/ioquake3Quest/baseq3/glsl"));
new File("/sdcard/ioquake3Quest/glsl.zip").delete();
//Read these from a file and pass through
commandLineParams = new String();

View file

@ -317,7 +317,7 @@ static cvarTable_t cvarTable[] = {
{ &cg_timescaleFadeSpeed, "cg_timescaleFadeSpeed", "0", 0},
{ &cg_timescale, "timescale", "1", 0},
{ &cg_scorePlum, "cg_scorePlums", "1", CVAR_USERINFO | CVAR_ARCHIVE},
{ &cg_smoothClients, "cg_smoothClients", "0", CVAR_USERINFO | CVAR_ARCHIVE},
{ &cg_smoothClients, "cg_smoothClients", "1", CVAR_USERINFO | CVAR_ARCHIVE},
{ &cg_cameraMode, "com_cameraMode", "0", CVAR_CHEAT},
{ &pmove_fixed, "pmove_fixed", "0", CVAR_SYSTEMINFO},

View file

@ -3523,7 +3523,7 @@ void CL_Init( void ) {
cl_timeout = Cvar_Get ("cl_timeout", "200", 0);
cl_timeNudge = Cvar_Get ("cl_timeNudge", "0", CVAR_TEMP );
cl_timeNudge = Cvar_Get ("cl_timeNudge", "5", CVAR_TEMP );
cl_shownet = Cvar_Get ("cl_shownet", "0", CVAR_TEMP );
cl_showSend = Cvar_Get ("cl_showSend", "0", CVAR_TEMP );
cl_showTimeDelta = Cvar_Get ("cl_showTimeDelta", "0", CVAR_TEMP );

View file

@ -811,5 +811,5 @@ void UI_InitGameinfo( void ) {
UI_LoadArenas();
UI_LoadBots();
uis.demoversion = qfalse;
uis.demoversion = trap_Cvar_VariableValue("demoversion") == 1.0f;
}

View file

@ -2770,9 +2770,9 @@ void Com_Init( char *commandLine ) {
com_busyWait = Cvar_Get("com_busyWait", "0", CVAR_ARCHIVE);
Cvar_Get("com_errorMessage", "", CVAR_ROM | CVAR_NORESTART);
#ifdef CINEMATICS_INTRO
com_introPlayed = Cvar_Get( "com_introplayed", "0", CVAR_ARCHIVE);
#endif
//#ifdef CINEMATICS_INTRO
com_introPlayed = Cvar_Get( "com_introplayed", "1", CVAR_ARCHIVE);
//#endif
s = va("%s %s %s", Q3_VERSION, PLATFORM_STRING, PRODUCT_DATE );
com_version = Cvar_Get ("version", s, CVAR_ROM | CVAR_SERVERINFO );

View file

@ -3482,13 +3482,12 @@ static void FS_CheckPak0( void )
curpack = path->pack;
pakBasename = curpack->pakBasename;
if(!Q_stricmpn( curpack->pakGamename, "demoq3", MAX_OSPATH )
&& !Q_stricmpn( pakBasename, "pak0", MAX_OSPATH ))
if(!Q_stricmpn( pakBasename, "pak0", MAX_OSPATH ) &&
curpack->checksum == DEMO_PAK0_CHECKSUM) // is this the demo?
{
if(curpack->checksum == DEMO_PAK0_CHECKSUM)
Cvar_Set("demoversion", "1.0");
founddemo = qtrue;
}
else if(!Q_stricmpn( curpack->pakGamename, BASEGAME, MAX_OSPATH )
&& strlen(pakBasename) == 4 && !Q_stricmpn( pakBasename, "pak", 3 )
&& pakBasename[3] >= '0' && pakBasename[3] <= '0' + NUM_ID_PAKS - 1)
@ -3603,7 +3602,7 @@ static void FS_CheckPak0( void )
}
if(!com_standalone->integer && (foundPak & 0x1ff) != 0x1ff)
if(!com_standalone->integer && (foundPak & 0x1ff) != 0x1ff && !founddemo)
{
char errorText[MAX_STRING_CHARS] = "";