mirror of
https://github.com/DrBeef/ioq3quest.git
synced 2024-11-10 06:41:58 +00:00
Fix weapon selector not being accessible on multiplayer servers
This commit is contained in:
parent
992e98a51d
commit
930fb2c49f
2 changed files with 22 additions and 5 deletions
|
@ -2,8 +2,8 @@
|
||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
package="com.drbeef.ioq3quest"
|
package="com.drbeef.ioq3quest"
|
||||||
android:installLocation="preferExternal"
|
android:installLocation="preferExternal"
|
||||||
android:versionCode="26"
|
android:versionCode="27"
|
||||||
android:versionName="0.19.0">
|
android:versionName="0.19.1">
|
||||||
<uses-feature android:name="android.hardware.vr.headtracking" android:version="1" android:required="true" />
|
<uses-feature android:name="android.hardware.vr.headtracking" android:version="1" android:required="true" />
|
||||||
<uses-feature android:glEsVersion="0x00030001" />
|
<uses-feature android:glEsVersion="0x00030001" />
|
||||||
<!-- <uses-feature android:name="oculus.software.overlay_keyboard" android:required="false"/>-->
|
<!-- <uses-feature android:name="oculus.software.overlay_keyboard" android:required="false"/>-->
|
||||||
|
|
|
@ -2060,7 +2060,24 @@ void CG_DrawHolsteredWeapons( void )
|
||||||
trap_R_AddRefEntityToScene( &blob );
|
trap_R_AddRefEntityToScene( &blob );
|
||||||
}
|
}
|
||||||
|
|
||||||
float startingPositionYaw = cg.refdefViewAngles[YAW] + (((j - (j&1 ? 0 : 1)) / 2.0f) * SEP);
|
vec3_t viewangles, vieworg;
|
||||||
|
VectorCopy(cg.refdefViewAngles, viewangles);
|
||||||
|
VectorCopy(cg.refdef.vieworg, vieworg);
|
||||||
|
if (!cgs.localServer)
|
||||||
|
{
|
||||||
|
VectorCopy(vr->hmdorientation, viewangles);
|
||||||
|
viewangles[YAW] = SHORT2ANGLE(cg.predictedPlayerState.delta_angles[YAW]) + vr->clientviewangles[YAW];
|
||||||
|
|
||||||
|
vec3_t pos, hmdposition;
|
||||||
|
VectorClear(pos);
|
||||||
|
VectorSubtract(vr->hmdposition, vr->hmdorigin, hmdposition);
|
||||||
|
rotateAboutOrigin(hmdposition[2], hmdposition[0],
|
||||||
|
cg.refdefViewAngles[YAW] - vr->calculated_weaponangles[YAW], pos);
|
||||||
|
VectorScale(pos, trap_Cvar_VariableValue("vr_worldscale"), pos);
|
||||||
|
VectorSubtract(cg.refdef.vieworg, pos, vieworg);
|
||||||
|
}
|
||||||
|
|
||||||
|
float startingPositionYaw = viewangles[YAW] + (((j - (j&1 ? 0 : 1)) / 2.0f) * SEP);
|
||||||
startingPositionYaw = AngleNormalize360(startingPositionYaw);
|
startingPositionYaw = AngleNormalize360(startingPositionYaw);
|
||||||
for (int w = j-1; w >= 0; --w)
|
for (int w = j-1; w >= 0; --w)
|
||||||
{
|
{
|
||||||
|
@ -2074,7 +2091,7 @@ void CG_DrawHolsteredWeapons( void )
|
||||||
|
|
||||||
int dist = (cg.time - cg.weaponHolsterTime) / 10;
|
int dist = (cg.time - cg.weaponHolsterTime) / 10;
|
||||||
if (dist > DIST) dist = DIST;
|
if (dist > DIST) dist = DIST;
|
||||||
VectorMA(cg.refdef.vieworg, dist, forward, iconOrigin);
|
VectorMA(vieworg, dist, forward, iconOrigin);
|
||||||
|
|
||||||
float worldscale = trap_Cvar_VariableValue("vr_worldscale");
|
float worldscale = trap_Cvar_VariableValue("vr_worldscale");
|
||||||
iconOrigin[2] -= PLAYER_HEIGHT;
|
iconOrigin[2] -= PLAYER_HEIGHT;
|
||||||
|
@ -2110,7 +2127,7 @@ void CG_DrawHolsteredWeapons( void )
|
||||||
VectorCopy(iconOrigin, ent.origin);
|
VectorCopy(iconOrigin, ent.origin);
|
||||||
|
|
||||||
vec3_t iconAngles;
|
vec3_t iconAngles;
|
||||||
VectorCopy(cg.refdefViewAngles, iconAngles);
|
VectorCopy(viewangles, iconAngles);
|
||||||
iconAngles[YAW] -= 145.0f;
|
iconAngles[YAW] -= 145.0f;
|
||||||
if (weapons[w] == WP_GAUNTLET)
|
if (weapons[w] == WP_GAUNTLET)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue