From aa9e2899bd31be69ffc3d5e8fbaeff74a72c3da9 Mon Sep 17 00:00:00 2001 From: Simon Date: Sat, 19 Mar 2022 16:51:32 +0000 Subject: [PATCH] Adjustment to controller weapon wheel - Make proximity of selection bigger - Copy pakQ3Q to baseoa if it exists --- android/app/src/main/AndroidManifest.xml | 4 ++-- .../app/src/main/cpp/code/cgame/cg_weapons.c | 20 +++++-------------- .../com/drbeef/ioq3quest/MainActivity.java | 6 ++++++ 3 files changed, 13 insertions(+), 17 deletions(-) diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml index a812938a..bd02dc80 100644 --- a/android/app/src/main/AndroidManifest.xml +++ b/android/app/src/main/AndroidManifest.xml @@ -2,8 +2,8 @@ + android:versionCode="39" + android:versionName="0.26.2"> diff --git a/android/app/src/main/cpp/code/cgame/cg_weapons.c b/android/app/src/main/cpp/code/cgame/cg_weapons.c index c1a4cee1..463c56d7 100644 --- a/android/app/src/main/cpp/code/cgame/cg_weapons.c +++ b/android/app/src/main/cpp/code/cgame/cg_weapons.c @@ -2195,7 +2195,7 @@ void CG_DrawWeaponSelector( void ) vec3_t diff; VectorSubtract(selectorOrigin, iconOrigin, diff); float length = VectorLength(diff); - if (length <= 1.2f && + if (length <= 1.5f && frac == 1.0f && selectable) { @@ -2255,20 +2255,10 @@ void CG_DrawWeaponSelector( void ) memset(&ent, 0, sizeof(ent)); VectorCopy(iconOrigin, ent.origin); - //Shift the weapon model a bit to be in the sphere - if (weaponId == WP_GAUNTLET) - { - SCALE = 0.065f; - VectorMA(ent.origin, 0.3f, wheelUp, ent.origin); - VectorMA(ent.origin, 0.15f, wheelRight, ent.origin); - VectorMA(ent.origin, -0.15f, wheelForward, ent.origin); - } - else - { - VectorMA(ent.origin, 0.3f, wheelForward, ent.origin); - VectorMA(ent.origin, -0.2f, wheelRight, ent.origin); - VectorMA(ent.origin, 0.5f, wheelUp, ent.origin); - } + //Shift model a bit + VectorMA(ent.origin, 0.3f, wheelForward, ent.origin); + VectorMA(ent.origin, -0.2f, wheelRight, ent.origin); + VectorMA(ent.origin, 0.1f, wheelUp, ent.origin); vec3_t iconAngles; VectorCopy(wheelAngles, iconAngles); diff --git a/android/app/src/main/java/com/drbeef/ioq3quest/MainActivity.java b/android/app/src/main/java/com/drbeef/ioq3quest/MainActivity.java index 902e5def..cfe89302 100644 --- a/android/app/src/main/java/com/drbeef/ioq3quest/MainActivity.java +++ b/android/app/src/main/java/com/drbeef/ioq3quest/MainActivity.java @@ -99,6 +99,12 @@ public class MainActivity extends SDLActivity // implements KeyEvent.Callback copy_asset("/sdcard/ioquake3Quest/baseq3", "pakQ3Q.pk3", true); copy_asset("/sdcard/ioquake3Quest/missionpack", "pakQ3Q.pk3", true); + //If open arena is installed then copy necessary stuff + if (new File("/sdcard/ioquake3Quest/baseoa").exists()) { + copy_asset("/sdcard/ioquake3Quest/baseoa", "autoexec.cfg", false); + copy_asset("/sdcard/ioquake3Quest/baseoa", "pakQ3Q.pk3", true); + } + //Read these from a file and pass through commandLineParams = new String();