mirror of
https://github.com/DrBeef/RTCWQuest.git
synced 2025-03-03 23:51:20 +00:00
Change to allow lase sight on scoped weapons when scope is detached
Co-Authored-By: Grant Bagwell <general@grantbagwell.co.uk>
This commit is contained in:
parent
6acbecac92
commit
94fb379a0d
4 changed files with 39 additions and 33 deletions
|
@ -1,8 +1,8 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.drbeef.rtcwquest"
|
||||
android:versionCode="30"
|
||||
android:versionName="0.25.0" android:installLocation="auto" >
|
||||
android:versionCode="31"
|
||||
android:versionName="0.25.1" android:installLocation="auto" >
|
||||
|
||||
<!-- Tell the system this app requires OpenGL ES 3.1. -->
|
||||
<uses-feature android:glEsVersion="0x00030001" android:required="true"/>
|
||||
|
|
|
@ -3390,26 +3390,33 @@ void CG_AddPlayerFoot( refEntity_t *parent, playerState_t *ps, centity_t *cent )
|
|||
}
|
||||
|
||||
void CG_LaserSight(const playerState_t *ps) {
|
||||
|
||||
if (trap_Cvar_VariableIntegerValue("vr_lasersight") != 0 &&
|
||||
cgVR->backpackitemactive == 0 &&
|
||||
cg.predictedPlayerState.stats[STAT_HEALTH] > 0 &&
|
||||
!cgVR->screen &&
|
||||
!cgVR->scopeengaged)
|
||||
{
|
||||
switch (ps->weapon)
|
||||
{
|
||||
qboolean drawLaserSight = qfalse;
|
||||
|
||||
switch (ps->weapon) {
|
||||
case WP_KNIFE:
|
||||
case WP_DYNAMITE:
|
||||
case WP_GRENADE_LAUNCHER:
|
||||
case WP_GRENADE_PINEAPPLE:
|
||||
case WP_TESLA:
|
||||
case WP_FLAMETHROWER:
|
||||
case WP_FG42:
|
||||
case WP_GARAND:
|
||||
break;
|
||||
case WP_FG42:
|
||||
case WP_MAUSER:
|
||||
drawLaserSight = cgVR->scopedetached; // Only user laser sight on scoped weapons if the scope isn't attached
|
||||
break;
|
||||
default:
|
||||
{
|
||||
drawLaserSight = qtrue;
|
||||
}
|
||||
|
||||
if (drawLaserSight) {
|
||||
vec3_t origin;
|
||||
vec3_t endForward;
|
||||
vec3_t angles;
|
||||
|
@ -3424,12 +3431,11 @@ void CG_LaserSight(const playerState_t *ps) {
|
|||
trap_CM_BoxTrace(&trace, origin, endForward, NULL, NULL, 0, MASK_SOLID);
|
||||
|
||||
ci.health = 1;
|
||||
ci.handicap = 128; // value out of 255 for alpha channel
|
||||
ci.handicap = 96; // value out of 255 for alpha channel
|
||||
VectorSet(ci.color, 1, 0, 0);
|
||||
CG_RailTrail2(&ci, origin, trace.endpos);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -42,7 +42,7 @@ If you have questions concerning this license or the applicable additional terms
|
|||
// q_shared.h -- included first by ALL program modules.
|
||||
// A user mod should never modify this file
|
||||
|
||||
#define Q3_VERSION "RTCWQuest 0.25.0 (Wolf 1.41)"
|
||||
#define Q3_VERSION "RTCWQuest 0.25.1 (Wolf 1.41)"
|
||||
// ver 1.0.0 - release
|
||||
// ver 1.0.1 - post-release work
|
||||
// ver 1.1.0 - patch 1 (12/12/01)
|
||||
|
|
BIN
assets/Controller_diagram_alt.jpg
Normal file
BIN
assets/Controller_diagram_alt.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 283 KiB |
Loading…
Reference in a new issue