mirror of
https://github.com/DrBeef/JKXR.git
synced 2024-11-21 19:51:33 +00:00
Fix issue with muzzle flash only causing dlight in the left eye
This commit is contained in:
parent
f5390bd8b4
commit
a8a402288b
11 changed files with 20 additions and 8 deletions
|
@ -4368,7 +4368,6 @@ void CG_DrawActive( stereoFrame_t stereoView ) {
|
|||
VectorNormalize( vright_n );
|
||||
VectorNormalize( vup_n );
|
||||
|
||||
cg.refdef.stereoView = stereoView;
|
||||
switch ( stereoView ) {
|
||||
case STEREO_CENTER:
|
||||
separation = 0;
|
||||
|
|
|
@ -34,7 +34,7 @@ void CG_AdjustFrom640( float *x, float *y, float *w, float *h ) {
|
|||
float screenYScale = 1.0f / (cg.drawingHUD == CG_HUD_SCALED ? 2.5f : 1.0f);
|
||||
|
||||
float xoffset = cg.drawingHUD == CG_HUD_SCALED ? -20 : 0;
|
||||
if (cg.refdef.stereoView == STEREO_LEFT) {
|
||||
if (cg.stereoView == STEREO_LEFT) {
|
||||
xoffset *= -1;
|
||||
}
|
||||
|
||||
|
|
|
@ -341,6 +341,8 @@ typedef struct {
|
|||
|
||||
int timelimitWarnings; // 5 min, 1 min, overtime
|
||||
|
||||
stereoFrame_t stereoView;
|
||||
|
||||
qboolean renderingThirdPerson; // during deaths, chasecams, etc
|
||||
|
||||
// prediction state
|
||||
|
|
|
@ -2007,7 +2007,11 @@ static qboolean cg_rangedFogging = qfalse; //so we know if we should go back to
|
|||
void CG_DrawActiveFrame( int serverTime, stereoFrame_t stereoView ) {
|
||||
qboolean inwater = qfalse;
|
||||
|
||||
cg.time = serverTime;
|
||||
if ( stereoView == STEREO_LEFT ) {
|
||||
cg.time = serverTime;
|
||||
}
|
||||
|
||||
cg.stereoView = stereoView;
|
||||
|
||||
// update cvars
|
||||
CG_UpdateCvars();
|
||||
|
|
|
@ -1000,7 +1000,9 @@ static void CG_DoMuzzleFlash( centity_t *cent, vec3_t org, vec3_t dir, weaponDat
|
|||
// Handle muzzle flashes, really this could just be a qboolean instead of a time.......
|
||||
if ( cent->muzzleFlashTime > 0 )
|
||||
{
|
||||
cent->muzzleFlashTime = 0;
|
||||
if (cg.stereoView == STEREO_RIGHT) {
|
||||
cent->muzzleFlashTime = 0;
|
||||
}
|
||||
const char *effect = NULL;
|
||||
|
||||
// CG_PositionEntityOnTag( &flash, &gun, gun.hModel, "tag_flash");
|
||||
|
|
|
@ -211,7 +211,6 @@ typedef struct {
|
|||
|
||||
// text messages for deform text shaders
|
||||
// char text[MAX_RENDER_STRINGS][MAX_RENDER_STRING_LENGTH];
|
||||
stereoFrame_t stereoView;
|
||||
float worldscale;
|
||||
} refdef_t;
|
||||
|
||||
|
|
|
@ -2916,7 +2916,6 @@ void CG_DrawActive( stereoFrame_t stereoView ) {
|
|||
|
||||
vr->cgzoommode = cg.zoomMode;
|
||||
|
||||
cg.refdef.stereoView = stereoView;
|
||||
switch ( stereoView ) {
|
||||
case STEREO_CENTER:
|
||||
separation = 0;
|
||||
|
|
|
@ -33,7 +33,7 @@ void CG_AdjustFrom640( float *x, float *y, float *w, float *h ) {
|
|||
float screenYScale = 1.0f / (cg.drawingHUD == CG_HUD_SCALED ? 2.5f : 1.25f);
|
||||
|
||||
float xoffset = cg.drawingHUD == CG_HUD_SCALED ? -20 : 0;
|
||||
if (cg.refdef.stereoView == STEREO_LEFT) {
|
||||
if (cg.stereoView == STEREO_LEFT) {
|
||||
xoffset *= -1;
|
||||
}
|
||||
|
||||
|
|
|
@ -334,6 +334,8 @@ typedef struct {
|
|||
|
||||
int timelimitWarnings; // 5 min, 1 min, overtime
|
||||
|
||||
stereoFrame_t stereoView;
|
||||
|
||||
qboolean renderingThirdPerson; // during deaths, chasecams, etc
|
||||
|
||||
// prediction state
|
||||
|
|
|
@ -1839,6 +1839,8 @@ void CG_DrawActiveFrame( int serverTime, stereoFrame_t stereoView ) {
|
|||
cg.time = serverTime;
|
||||
}
|
||||
|
||||
cg.stereoView = stereoView;
|
||||
|
||||
// update cvars
|
||||
CG_UpdateCvars();
|
||||
|
||||
|
|
|
@ -917,7 +917,10 @@ static void CG_DoMuzzleFlash( centity_t *cent, vec3_t org, vec3_t dir, weaponDat
|
|||
// Handle muzzle flashes, really this could just be a qboolean instead of a time.......
|
||||
if ( cent->muzzleFlashTime > 0 )
|
||||
{
|
||||
cent->muzzleFlashTime = 0;
|
||||
if (cg.stereoView == STEREO_RIGHT) {
|
||||
cent->muzzleFlashTime = 0;
|
||||
}
|
||||
|
||||
const char *effect = NULL;
|
||||
|
||||
// CG_PositionEntityOnTag( &flash, &gun, gun.hModel, "tag_flash");
|
||||
|
|
Loading…
Reference in a new issue