mirror of
https://github.com/yquake2/yquake2remaster.git
synced 2024-11-25 05:51:01 +00:00
Add gl_farsee (by Richard Allen)
This commit is contained in:
parent
3dbd925c34
commit
1f3ce73a75
5 changed files with 26 additions and 4 deletions
|
@ -1,6 +1,10 @@
|
|||
Quake II 4.03 to 4.04
|
||||
- Change the behavior of hotkey menus to fix some
|
||||
strange bugs and memory leaks in the menu system.
|
||||
- Add the "gl_farsee" cvar. When set to "1" Quake II
|
||||
renders maps up to 4096x4096 units instead of being
|
||||
limited to 2300x2300. The default is "0". (by Richard
|
||||
Allen)
|
||||
|
||||
Quake II 4.02 to 4.03
|
||||
- Fix wrong function call in the Quake II file system.
|
||||
|
|
4
README
4
README
|
@ -472,4 +472,8 @@ My mod craches at startup.
|
|||
the working directory by hand:
|
||||
mkdir -p ~/.yq2/$moddir
|
||||
|
||||
Only parts of the maps are rendered!
|
||||
- By default the maximum view distance is 2300 units. You can widen it
|
||||
up to 4096 units by setting "gl_farsee" to "1",
|
||||
|
||||
==============================================================================
|
||||
|
|
|
@ -165,6 +165,7 @@ extern int r_viewcluster, r_viewcluster2, r_oldviewcluster, r_oldviewcluster2;
|
|||
|
||||
extern cvar_t *gl_norefresh;
|
||||
extern cvar_t *r_lefthand;
|
||||
extern cvar_t *gl_farsee;
|
||||
extern cvar_t *gl_drawentities;
|
||||
extern cvar_t *gl_drawworld;
|
||||
extern cvar_t *gl_speeds;
|
||||
|
|
|
@ -98,6 +98,7 @@ cvar_t *gl_novis;
|
|||
cvar_t *gl_nocull;
|
||||
cvar_t *gl_lerpmodels;
|
||||
cvar_t *r_lefthand;
|
||||
cvar_t *gl_farsee;
|
||||
|
||||
cvar_t *gl_lightlevel;
|
||||
cvar_t *gl_overbrightbits;
|
||||
|
@ -714,7 +715,11 @@ R_SetupGL ( void )
|
|||
screenaspect = (float) r_newrefdef.width / r_newrefdef.height;
|
||||
qglMatrixMode( GL_PROJECTION );
|
||||
qglLoadIdentity();
|
||||
R_MYgluPerspective( r_newrefdef.fov_y, screenaspect, 4, 4096 );
|
||||
if (gl_farsee->value == 0) {
|
||||
R_MYgluPerspective( r_newrefdef.fov_y, screenaspect, 4, 4096 );
|
||||
} else {
|
||||
R_MYgluPerspective( r_newrefdef.fov_y, screenaspect, 4, 8192 );
|
||||
}
|
||||
|
||||
qglCullFace( GL_FRONT );
|
||||
|
||||
|
@ -933,6 +938,7 @@ void
|
|||
R_Register ( void )
|
||||
{
|
||||
r_lefthand = ri.Cvar_Get( "hand", "0", CVAR_USERINFO | CVAR_ARCHIVE );
|
||||
gl_farsee = ri.Cvar_Get( "gl_farsee", "0", CVAR_LATCH | CVAR_ARCHIVE );
|
||||
gl_norefresh = ri.Cvar_Get( "gl_norefresh", "0", 0 );
|
||||
gl_fullbright = ri.Cvar_Get( "gl_fullbright", "0", 0 );
|
||||
gl_drawentities = ri.Cvar_Get( "gl_drawentities", "1", 0 );
|
||||
|
|
|
@ -582,9 +582,16 @@ R_MakeSkyVec ( float s, float t, int axis )
|
|||
vec3_t v, b;
|
||||
int j, k;
|
||||
|
||||
b [ 0 ] = s * 2300;
|
||||
b [ 1 ] = t * 2300;
|
||||
b [ 2 ] = 2300;
|
||||
if ( gl_farsee->value == 0 ) {
|
||||
b [ 0 ] = s * 2300;
|
||||
b [ 1 ] = t * 2300;
|
||||
b [ 2 ] = 2300;
|
||||
} else {
|
||||
b [ 0 ] = s * 4096;
|
||||
b [ 1 ] = t * 4096;
|
||||
b [ 2 ] = 4096;
|
||||
}
|
||||
|
||||
|
||||
for ( j = 0; j < 3; j++ )
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue