diff --git a/Projects/Android/AndroidManifest.xml b/Projects/Android/AndroidManifest.xml index e5d8865..3abd1aa 100644 --- a/Projects/Android/AndroidManifest.xml +++ b/Projects/Android/AndroidManifest.xml @@ -1,8 +1,8 @@ + android:versionCode="11" + android:versionName="1.0.0" android:installLocation="auto" > diff --git a/Projects/Android/jni/quake2/src/client/cl_tempentities.c b/Projects/Android/jni/quake2/src/client/cl_tempentities.c index 158cdcc..d803d5a 100644 --- a/Projects/Android/jni/quake2/src/client/cl_tempentities.c +++ b/Projects/Android/jni/quake2/src/client/cl_tempentities.c @@ -523,7 +523,8 @@ void CL_ParseLaserSight () cl_lasersight.endtime = cl.time+250; } -void SetWeapon6DOF(int weapmodel, vec3_t origin, vec3_t gunorigin, vec3_t gunangles); +//void SetWeapon6DOF(int weapmodel, vec3_t origin, vec3_t gunorigin, vec3_t gunangles); +void convertFromVRtoQ2(vec3_t in, vec3_t offset, vec3_t out); trace_t CL_Trace (vec3_t start, vec3_t end, float size, int contentmask) { @@ -535,18 +536,24 @@ trace_t CL_Trace (vec3_t start, vec3_t end, float size, int contentmask) return CM_BoxTrace (start, end, mins, maxs, 0, contentmask); } +extern vec3_t weaponangles; +extern vec3_t weaponoffset; + void CL_UpdateLaserSightOrigins () { if (cl_lasersight.endtime > cl.time) { vec3_t forward, right; vec3_t end; vec3_t gunorigin; - vec3_t gunangles; + //At the point of calling this, the vieworg should already have the player height included - SetWeapon6DOF(0, cl.refdef.vieworg, gunorigin, gunangles); + convertFromVRtoQ2(weaponoffset, cl.refdef.vieworg, gunorigin); gunorigin[2] += 1; // just add a little bit - AngleVectors(gunangles, forward, right, NULL); - VectorMA(gunorigin, (float)(cl_lasersight.ent.frame != 6 ? 4096.0 : 6.0), forward, end); + AngleVectors(weaponangles, forward, right, NULL); + + qboolean useTrajectoryIndicator = cl_lasersight.ent.frame == 6 || cl_lasersight.ent.frame == 7; + + VectorMA(gunorigin, (float)(useTrajectoryIndicator ? 16.0 : 4096.0), forward, end); trace_t tr = CL_Trace(gunorigin, end, 1, CONTENTS_SOLID | CONTENTS_MONSTER | CONTENTS_DEADMONSTER); VectorCopy(gunorigin, cl_lasersight.ent.origin); diff --git a/Projects/Android/jni/quake2/src/common/header/common.h b/Projects/Android/jni/quake2/src/common/header/common.h index 5eb9556..d3ad25f 100644 --- a/Projects/Android/jni/quake2/src/common/header/common.h +++ b/Projects/Android/jni/quake2/src/common/header/common.h @@ -32,7 +32,7 @@ #include "shared.h" #include "crc.h" -#define Q2QVERSION "0.9.2" +#define Q2QVERSION "1.0.0" #define YQ2VERSION "7.41" #define BASEDIRNAME "Quake2Quest" diff --git a/Projects/Android/local.properties b/Projects/Android/local.properties index e13eb4a..8e88db3 100644 --- a/Projects/Android/local.properties +++ b/Projects/Android/local.properties @@ -4,6 +4,6 @@ # Location of the SDK. This is only used by Gradle. # For customization when using a Version Control System, please read the # header note. -#Sun Dec 08 15:32:07 CET 2019 -ndk.dir=C\:\\Users\\baggyg\\AppData\\Local\\Android\\Sdk\\ndk-bundle -sdk.dir=C\:\\Users\\baggyg\\AppData\\Local\\Android\\Sdk +#Thu Dec 12 20:21:11 GMT 2019 +ndk.dir=C\:\\Users\\Simon\\AppData\\Local\\Android\\Sdk\\ndk-bundle +sdk.dir=C\:\\Users\\Simon\\AppData\\Local\\Android\\Sdk diff --git a/assets/config.cfg b/assets/config.cfg index c409ad7..5be790c 100644 --- a/assets/config.cfg +++ b/assets/config.cfg @@ -2,8 +2,8 @@ //set cheats "1" set gl_texturemode "GL_LINEAR_MIPMAP_Linear" set gl_shadows "1" +set gl1_stencilshadow "1" set s_loadas8bit "0" -set vid_gamma "0.900000" set cl_showfps "1" /////////////////////// key bindings