diff options
-rw-r--r-- | Makefile | 2 | ||||
-rwxr-xr-x | configure | 14 | ||||
-rw-r--r-- | source/cl_draw.c | 2 | ||||
-rw-r--r-- | source/cvar.c | 7 | ||||
-rw-r--r-- | source/sv_ac.c | 4 | ||||
-rw-r--r-- | source/vid_sdl.c | 8 | ||||
-rw-r--r-- | wiki/doc/client.mdwn | 5 |
7 files changed, 29 insertions, 13 deletions
@@ -27,7 +27,7 @@ ifdef SINGLEUSER install: echo "Single user mode configured, can't install" && exit 1 -install: +uninstall: echo "Single user mode configured, can't uninstall" && exit 1 else # SINGLEUSER @@ -27,9 +27,16 @@ if [ "$sources" = "." ]; then sources=`pwd` fi if [ ! -f $sources/source/common.c ] ; then - echo "ERROR: $sources does not look like Q2PRO source tree" + echo "$sources does not look like Q2PRO source tree!" exit 1 fi +if [ ! -f $sources/REVISION ] ; then + echo "REVISION does not exist. Did you check Q2PRO out of SVN repository?" + echo "You can create it by running 'svnversion > REVISION' at the root of source tree." + exit 1 +fi +version=$(cat $sources/REVISION) +revision=$(cat $sources/REVISION | tr -d -c [:digit:]) outdir=`pwd` tmpc="/tmp/q2pro-${RANDOM}.c" tmpo="/tmp/q2pro-${RANDOM}.o" @@ -37,7 +44,6 @@ config_mk="config.mk" config_h="config.h" # defaults -revision="238" help="no" exesuffix="" libsuffix=".so" @@ -47,6 +53,7 @@ libraries="" cpu="" singleuser="no" asmflags="" +mingw="no" if [ -z "$CFLAGS" ]; then CFLAGS="-O2 -Wall -Wstrict-prototypes" fi @@ -57,7 +64,6 @@ cc="gcc" make="make" windres="windres" strip="strip" -mingw="no" pngconfig="libpng-config" sdlconfig="sdl-config" @@ -384,7 +390,7 @@ echo "LIBRARIES=$libraries" >> $config_mk echo "REVISION=$revision" >> $config_mk echo "#define REVISION $revision" >> $config_h -echo "#define VERSION \"r$revision\"" >> $config_h +echo "#define VERSION \"r$version\"" >> $config_h echo "#define PRIz \"zu\"" >> $config_h diff --git a/source/cl_draw.c b/source/cl_draw.c index 0d56a6a..008a19e 100644 --- a/source/cl_draw.c +++ b/source/cl_draw.c @@ -266,7 +266,7 @@ static void SCR_Draw_f( void ) { obj->cvar = NULL; obj->macro = macro; } else { - obj->cvar = Cvar_Get( s, NULL, CVAR_VOLATILE ); + obj->cvar = Cvar_Ref( s ); obj->macro = NULL; } diff --git a/source/cvar.c b/source/cvar.c index 0d18cf4..9926c4b 100644 --- a/source/cvar.c +++ b/source/cvar.c @@ -230,9 +230,9 @@ cvar_t *Cvar_Get( const char *var_name, const char *var_value, int flags ) { Com_Error( ERR_FATAL, "Cvar_Get: NULL var_name" ); } if( !var_value ) { - var_value = ""; + return Cvar_FindVar( var_name ); } - + if( flags & CVAR_INFOMASK ) { if( Info_SubValidate( var_name ) == -1 ) { Com_WPrintf( "Invalid info cvar name '%s'.\n", var_name ); @@ -252,6 +252,7 @@ cvar_t *Cvar_Get( const char *var_name, const char *var_value, int flags ) { return var; } + // create new variable length = strlen( var_name ) + 1; var = Cvar_Malloc( sizeof( *var ) + length ); @@ -289,7 +290,7 @@ Cvar_Ref ============ */ cvar_t *Cvar_Ref( const char *var_name ) { - return Cvar_Get( var_name, NULL, CVAR_VOLATILE ); + return Cvar_Get( var_name, "", CVAR_VOLATILE ); } /* diff --git a/source/sv_ac.c b/source/sv_ac.c index e550238..3e8e284 100644 --- a/source/sv_ac.c +++ b/source/sv_ac.c @@ -1264,7 +1264,7 @@ static qboolean AC_Reconnect( void ) { if( NET_Connect( &address, &ac.stream ) == NET_ERROR ) { Com_EPrintf( "ANTICHEAT: %s to %s.\n", - NET_ErrorString(), ac_server_address->string ); + NET_ErrorString(), NET_AdrToString( &address ) ); goto fail; } @@ -1357,7 +1357,7 @@ void AC_Connect( qboolean ismvd ) { return; } - // syncronize startup + // synchronize startup for( attempts = 0; attempts < 5000; attempts++ ) { Sys_RunConsole(); Sys_Sleep( 1 ); diff --git a/source/vid_sdl.c b/source/vid_sdl.c index 7615b82..f828e68 100644 --- a/source/vid_sdl.c +++ b/source/vid_sdl.c @@ -48,7 +48,7 @@ typedef struct { qboolean initialized; grab_t grabbed; } mouse; -#ifdef __unix__ +#if 0 // def __unix__ PFNGLXGETVIDEOSYNCSGIPROC glXGetVideoSyncSGI; PFNGLXSWAPINTERVALSGIPROC glXSwapIntervalSGI; #endif @@ -528,6 +528,7 @@ void VID_EndFrame( void ) { #else // SOFTWARE_RENDERER +/* static cvar_t *gl_swapinterval; static void gl_swapinterval_changed( cvar_t *self ) { @@ -535,6 +536,7 @@ static void gl_swapinterval_changed( cvar_t *self ) { sdl.glXSwapIntervalSGI( self->integer ); } } +*/ qboolean VID_Init( void ) { cvar_t *gl_driver; @@ -544,7 +546,7 @@ qboolean VID_Init( void ) { } gl_driver = Cvar_Get( "gl_driver", DEFAULT_OPENGL_DRIVER, CVAR_LATCH ); - gl_swapinterval = Cvar_Get( "gl_swapinterval", "1", CVAR_ARCHIVE ); +// gl_swapinterval = Cvar_Get( "gl_swapinterval", "1", CVAR_ARCHIVE ); if( SDL_GL_LoadLibrary( gl_driver->string ) == -1 ) { Com_EPrintf( "Couldn't load OpenGL library: %s\n", SDL_GetError() ); @@ -563,11 +565,13 @@ qboolean VID_Init( void ) { Com_EPrintf( "Couldn't set video mode: %s\n", SDL_GetError() ); goto fail; } +/* sdl.glXGetVideoSyncSGI = SDL_GL_GetProcAddress( "glXGetVideoSyncSGI" ); sdl.glXSwapIntervalSGI = SDL_GL_GetProcAddress( "glXSwapIntervalSGI" ); gl_swapinterval->changed = gl_swapinterval_changed; gl_swapinterval_changed( gl_swapinterval ); +*/ Activate(); return qtrue; diff --git a/wiki/doc/client.mdwn b/wiki/doc/client.mdwn index afcc2ec..44b82f1 100644 --- a/wiki/doc/client.mdwn +++ b/wiki/doc/client.mdwn @@ -264,6 +264,11 @@ Specifies additional brightness percentage added to world lightmaps. Default value of 0 means identity lightmaps, value of 1 means fullbright lightmaps. +- `set gl_modulate_mask 3` (bitmask) +Specifies where gl_modulate cvar applies: + - 1 - world lightmaps + - 2 - entity lighting + - `set gl_fragment_program 0` (boolean) Enables `GL_ARB_fragment_program` extension, if supported by video drivers. Currently this extension is used only for warping effect on liquid surfaces. |