mirror of
https://github.com/DrBeef/RTCWQuest.git
synced 2025-02-28 22:31:29 +00:00
Mde using the MG42 far more comfortable
This commit is contained in:
parent
a417cd0206
commit
0bb213b1e3
4 changed files with 16 additions and 12 deletions
|
@ -2243,9 +2243,11 @@ static void CG_DrawCrosshair( void ) {
|
||||||
// CG_FillRect (319, 242, 2, 16, hcolor); // vertical
|
// CG_FillRect (319, 242, 2, 16, hcolor); // vertical
|
||||||
|
|
||||||
// option 2
|
// option 2
|
||||||
|
hudflags |= HUD_FLAGS_MG42_CROSSHAIR;
|
||||||
CG_FillRect( 305, 240, 30, 2, hcolor ); // horizontal
|
CG_FillRect( 305, 240, 30, 2, hcolor ); // horizontal
|
||||||
CG_FillRect( 314, 256, 12, 2, hcolor ); // horizontal2
|
CG_FillRect( 314, 256, 12, 2, hcolor ); // horizontal2
|
||||||
CG_FillRect( 319, 242, 2, 32, hcolor ); // vertical
|
CG_FillRect( 319, 242, 2, 32, hcolor ); // vertical
|
||||||
|
hudflags &= ~HUD_FLAGS_MG42_CROSSHAIR;
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -3416,7 +3418,7 @@ static void CG_Draw2D( void ) {
|
||||||
// don't draw any status if dead
|
// don't draw any status if dead
|
||||||
if ( cg.snap->ps.stats[STAT_HEALTH] > 0 ) {
|
if ( cg.snap->ps.stats[STAT_HEALTH] > 0 ) {
|
||||||
|
|
||||||
if (cg.zoomedScope || cg.zoomedBinoc) {
|
if (cg.zoomedScope || cg.zoomedBinoc || ( cg.snap->ps.eFlags & EF_MG42_ACTIVE )) {
|
||||||
CG_DrawCrosshair();
|
CG_DrawCrosshair();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -84,7 +84,7 @@ void CG_AdjustFrom640( float *x, float *y, float *w, float *h ) {
|
||||||
float screenXScale = cgs.screenXScale / 2.75f;
|
float screenXScale = cgs.screenXScale / 2.75f;
|
||||||
float screenYScale = cgs.screenYScale / 2.75f;
|
float screenYScale = cgs.screenYScale / 2.75f;
|
||||||
|
|
||||||
int xoffset = -24;
|
int xoffset = (hudflags & HUD_FLAGS_MG42_CROSSHAIR) ? -12 : -24;
|
||||||
if (cg.refdef.stereoView == 1) {
|
if (cg.refdef.stereoView == 1) {
|
||||||
xoffset *= -1;
|
xoffset *= -1;
|
||||||
}
|
}
|
||||||
|
|
|
@ -109,8 +109,9 @@ If you have questions concerning this license or the applicable additional terms
|
||||||
// -NERVE - SMF
|
// -NERVE - SMF
|
||||||
|
|
||||||
//VR HUD
|
//VR HUD
|
||||||
#define HUD_FLAGS_FULLSCREEN 1
|
#define HUD_FLAGS_FULLSCREEN 1
|
||||||
#define HUD_FLAGS_STEREO 2
|
#define HUD_FLAGS_STEREO 2
|
||||||
|
#define HUD_FLAGS_MG42_CROSSHAIR 4
|
||||||
|
|
||||||
//=================================================
|
//=================================================
|
||||||
|
|
||||||
|
|
|
@ -720,7 +720,7 @@ float zoomTable[ZOOM_MAX_ZOOMS][2] = {
|
||||||
{20, 4}, // sniper
|
{20, 4}, // sniper
|
||||||
{60, 20}, // snooper
|
{60, 20}, // snooper
|
||||||
{55, 55}, // fg42
|
{55, 55}, // fg42
|
||||||
{55, 55} // mg42
|
{104, 104} // mg42 - don't zoom much for VR
|
||||||
};
|
};
|
||||||
|
|
||||||
void CG_AdjustZoomVal( float val, int type ) {
|
void CG_AdjustZoomVal( float val, int type ) {
|
||||||
|
@ -891,10 +891,10 @@ static int CG_CalcFov( void ) {
|
||||||
cg.refdef.rdflags &= ~RDF_SNOOPERVIEW;
|
cg.refdef.rdflags &= ~RDF_SNOOPERVIEW;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//Don't do this for the MG42 in VR
|
||||||
if ( cg.snap->ps.persistant[PERS_HWEAPON_USE] ) {
|
// if ( cg.snap->ps.persistant[PERS_HWEAPON_USE] ) {
|
||||||
fov_x = 55;
|
// fov_x = 55;
|
||||||
}
|
// }
|
||||||
|
|
||||||
x = cg.refdef.width / tan( fov_x / 360 * M_PI );
|
x = cg.refdef.width / tan( fov_x / 360 * M_PI );
|
||||||
fov_y = atan2( cg.refdef.height, x );
|
fov_y = atan2( cg.refdef.height, x );
|
||||||
|
@ -1396,9 +1396,10 @@ void CG_DrawSkyBoxPortal( void ) {
|
||||||
cg.refdef.rdflags &= ~RDF_SNOOPERVIEW;
|
cg.refdef.rdflags &= ~RDF_SNOOPERVIEW;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( cg.snap->ps.persistant[PERS_HWEAPON_USE] ) {
|
//MG42?
|
||||||
fov_x = 55;
|
//if ( cg.snap->ps.persistant[PERS_HWEAPON_USE] ) {
|
||||||
}
|
// fov_x = 55;
|
||||||
|
//}
|
||||||
|
|
||||||
x = cg.refdef.width / tan( fov_x / 360 * M_PI );
|
x = cg.refdef.width / tan( fov_x / 360 * M_PI );
|
||||||
fov_y = atan2( cg.refdef.height, x );
|
fov_y = atan2( cg.refdef.height, x );
|
||||||
|
|
Loading…
Reference in a new issue