mirror of
https://github.com/DrBeef/JKXR.git
synced 2024-11-25 05:21:00 +00:00
Ensure hand drawn when throwing one of the dual sabers
This commit is contained in:
parent
1a6a99e2a7
commit
1477f452a8
1 changed files with 26 additions and 24 deletions
|
@ -2371,7 +2371,6 @@ void CG_DrawActiveFrame( int serverTime, stereoFrame_t stereoView ) {
|
|||
&& cg.predicted_player_state.stats[STAT_HEALTH] > 0
|
||||
&& cg.snap->ps.viewEntity < ENTITYNUM_WORLD
|
||||
&& g_entities[cg.snap->ps.viewEntity].client
|
||||
&& !(g_entities[cg.snap->ps.viewEntity].client->ps.dualSabers && cg.snap->ps.weapon == WP_SABER)
|
||||
&& !vr->weapon_stabilised
|
||||
&& !vr->in_vehicle
|
||||
&& !cg_pano.integer
|
||||
|
@ -2379,6 +2378,7 @@ void CG_DrawActiveFrame( int serverTime, stereoFrame_t stereoView ) {
|
|||
{
|
||||
vec3_t end, forward;
|
||||
refEntity_t handEnt;
|
||||
centity_t *cent = &cg_entities[0];
|
||||
memset( &handEnt, 0, sizeof(refEntity_t) );
|
||||
BG_CalculateVRDefaultPosition(1, handEnt.origin, handEnt.angles);
|
||||
|
||||
|
@ -2389,6 +2389,8 @@ void CG_DrawActiveFrame( int serverTime, stereoFrame_t stereoView ) {
|
|||
|
||||
handEnt.renderfx = RF_DEPTHHACK | RF_VRVIEWMODEL;
|
||||
|
||||
if (!g_entities[cg.snap->ps.viewEntity].client->ps.dualSabers)
|
||||
{
|
||||
if (cg.snap->ps.powerups[PW_FORCE_PUSH] > cg.time ||
|
||||
(cg.snap->ps.forcePowersActive & (1<<FP_GRIP)) ||
|
||||
(cg.snap->ps.forcePowersActive & (1<<FP_LIGHTNING)) ||
|
||||
|
@ -2413,8 +2415,8 @@ void CG_DrawActiveFrame( int serverTime, stereoFrame_t stereoView ) {
|
|||
VectorScale( handEnt.axis[i], (vr->right_handed || i != 1) ? 1.0f : -1.0f, handEnt.axis[i] );
|
||||
}
|
||||
|
||||
centity_t *cent = &cg_entities[0];
|
||||
CG_AddRefEntityWithPowerups(&handEnt, cent->currentState.powerups, cent, true);
|
||||
}
|
||||
|
||||
if (cg.snap->ps.weapon == WP_NONE ||
|
||||
cg.snap->ps.weapon == WP_MELEE ||
|
||||
|
|
Loading…
Reference in a new issue