mirror of
https://github.com/DrBeef/JKXR.git
synced 2024-11-24 21:11:03 +00:00
Hugely improved weapon selector
also added missed splash screen image
This commit is contained in:
parent
958d0da03e
commit
0edba3662d
4 changed files with 17 additions and 18 deletions
|
@ -447,7 +447,6 @@ typedef struct {
|
|||
int itemSelectorType; // 0 - weapons, 1 - gadgets, 2 - fighting-style, 3 - force powers
|
||||
int itemSelectorSelection;
|
||||
int itemSelectorTime;
|
||||
vec3_t itemSelectorAngles;
|
||||
vec3_t itemSelectorOrigin;
|
||||
vec3_t itemSelectorOffset;
|
||||
|
||||
|
|
|
@ -2753,13 +2753,11 @@ void CG_DrawItemSelector( void )
|
|||
if (vr->item_selector == 2)
|
||||
{
|
||||
cg.itemSelectorType = 3;
|
||||
VectorCopy(vr->offhandangles, cg.itemSelectorAngles);
|
||||
VectorCopy(vr->offhandposition, cg.itemSelectorOrigin);
|
||||
VectorCopy(vr->offhandoffset, cg.itemSelectorOffset);
|
||||
}
|
||||
else {
|
||||
cg.itemSelectorType = 0;
|
||||
VectorCopy(vr->weaponangles, cg.itemSelectorAngles);
|
||||
VectorCopy(vr->weaponposition, cg.itemSelectorOrigin);
|
||||
VectorCopy(vr->weaponoffset, cg.itemSelectorOffset);
|
||||
}
|
||||
|
@ -2789,8 +2787,10 @@ void CG_DrawItemSelector( void )
|
|||
}
|
||||
|
||||
vec3_t wheelAngles, wheelOrigin, beamOrigin, wheelForward, wheelRight, wheelUp;
|
||||
cg.itemSelectorAngles[YAW] = vr->hmdorientation[YAW];
|
||||
BG_CalculateVRPositionInWorld(cg.itemSelectorOrigin, cg.itemSelectorOffset, cg.itemSelectorAngles, wheelOrigin, wheelAngles);
|
||||
vec3_t angles;
|
||||
VectorClear(angles);
|
||||
angles[YAW] = vr->hmdorientation[YAW];
|
||||
BG_CalculateVRPositionInWorld(cg.itemSelectorOrigin, cg.itemSelectorOffset, angles, wheelOrigin, wheelAngles);
|
||||
|
||||
AngleVectors(wheelAngles, wheelForward, wheelRight, wheelUp);
|
||||
VectorCopy(controllerOrigin, wheelOrigin);
|
||||
|
@ -2818,12 +2818,15 @@ void CG_DrawItemSelector( void )
|
|||
|
||||
{
|
||||
vec3_t color = { 0, 0, 255 };
|
||||
FX_AddLine( beamOrigin, selectorOrigin, 0.1f, 1.0f, 0.0f,
|
||||
1.0f, 0.0f, 0.0f,
|
||||
color, color, 0.0f,
|
||||
60, cgi_R_RegisterShader( "gfx/misc/nav_line" ),
|
||||
FX_SIZE_LINEAR | FX_ALPHA_LINEAR );
|
||||
refEntity_t beam;
|
||||
VectorCopy(beamOrigin, beam.oldorigin);
|
||||
VectorCopy(selectorOrigin, beam.origin );
|
||||
beam.shaderRGBA[0] = beam.shaderRGBA[1] = beam.shaderRGBA[2] = beam.shaderRGBA[3] = 0xff;
|
||||
beam.customShader = cgs.media.blueSaberCoreShader;
|
||||
beam.reType = RT_LINE;
|
||||
beam.radius = 0.4f;
|
||||
|
||||
cgi_R_AddRefEntityToScene( &beam );
|
||||
}
|
||||
|
||||
centity_t *cent = &cg_entities[cg.snap->ps.clientNum];
|
||||
|
@ -2901,10 +2904,8 @@ void CG_DrawItemSelector( void )
|
|||
memset(&sprite, 0, sizeof(sprite));
|
||||
vec3_t right;
|
||||
AngleVectors(wheelAngles, NULL, right, NULL);
|
||||
float offset = ((float) s * 2.0f) + (((float) s * 0.3f) * sinf(DEG2RAD(
|
||||
AngleNormalize360(
|
||||
cg.time -
|
||||
cg.itemSelectorTime))));
|
||||
float offset = ((float) s * 2.0f) + (((float) s * 0.3f) *
|
||||
sinf(DEG2RAD(AngleNormalize360(cg.time - cg.itemSelectorTime))));
|
||||
VectorMA(wheelOrigin, offset, right, sprite.origin);
|
||||
sprite.reType = RT_SPRITE;
|
||||
sprite.customShader = cgs.media.binocularArrow;
|
||||
|
|
|
@ -5726,7 +5726,7 @@ void ForceThrow( gentity_t *self, qboolean pull )
|
|||
G_Sound( self, soundIndex );
|
||||
|
||||
vec3_t origin, angles;
|
||||
if (self->client->ps.clientNum == 0)
|
||||
if (self->client->ps.clientNum == 0 && !cg.renderingThirdPerson)
|
||||
{
|
||||
BG_CalculateVROffHandPosition(origin, fwdangles);
|
||||
|
||||
|
@ -6776,7 +6776,7 @@ void ForceTelepathy( gentity_t *self )
|
|||
}
|
||||
|
||||
vec3_t origin, angles;
|
||||
if (self->client->ps.clientNum == 0)
|
||||
if (self->client->ps.clientNum == 0 && !cg.renderingThirdPerson)
|
||||
{
|
||||
BG_CalculateVROffHandPosition(origin, angles);
|
||||
AngleVectors(angles, forward, NULL, NULL);
|
||||
|
@ -7013,14 +7013,13 @@ void ForceGrip( gentity_t *self )
|
|||
}
|
||||
|
||||
vec3_t origin, angles;
|
||||
if (self->client->ps.clientNum == 0)
|
||||
if (self->client->ps.clientNum == 0 && !cg.renderingThirdPerson)
|
||||
{
|
||||
BG_CalculateVROffHandPosition(origin, angles);
|
||||
AngleVectors(angles, forward, NULL, NULL);
|
||||
|
||||
if (cg_showForcePowerDirection.integer)
|
||||
{
|
||||
vec3_t origin, angles;
|
||||
vec3_t color = { 0, 255, 0 };
|
||||
AngleVectors( angles, forward, NULL, NULL );
|
||||
VectorMA( origin, FORCE_GRIP_DIST, forward, end );
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 158 KiB After Width: | Height: | Size: 275 KiB |
Loading…
Reference in a new issue