mirror of
https://github.com/UberGames/lilium-voyager.git
synced 2024-11-10 06:31:47 +00:00
* qvm files no longer installed by "make copyfiles"
* Loopback clients only get snapshots at the server frame rate now (Anonymous <nkylqinhvgcbyl@mailinator.com>) * JPEG chroma subsampling disabled if the quality value is >= 85 (Anonymous <nkylqinhvgcbyl@mailinator.com>) * cl_lanForcePackets. When set to 0 (default is 1) the cl_maxpackets setting will be ignored if on a LAN. (Anonymous <nkylqinhvgcbyl@mailinator.com>)
This commit is contained in:
parent
acd2473fce
commit
e41d081710
7 changed files with 20 additions and 16 deletions
11
Makefile
11
Makefile
|
@ -1760,17 +1760,6 @@ ifneq ($(BUILD_GAME_SO),0)
|
|||
$(COPYDIR)/missionpack/.
|
||||
endif
|
||||
|
||||
ifneq ($(BUILD_GAME_QVM),0)
|
||||
-$(MKDIR) -p -m 0755 $(COPYDIR)/baseq3/vm
|
||||
$(INSTALL) -m 0755 $(BR)/baseq3/vm/qagame.qvm $(COPYDIR)/baseq3/vm/qagame.qvm
|
||||
$(INSTALL) -m 0755 $(BR)/baseq3/vm/cgame.qvm $(COPYDIR)/baseq3/vm/cgame.qvm
|
||||
$(INSTALL) -m 0755 $(BR)/baseq3/vm/ui.qvm $(COPYDIR)/baseq3/vm/ui.qvm
|
||||
-$(MKDIR) -p -m 0755 $(COPYDIR)/missionpack/vm
|
||||
$(INSTALL) -m 0755 $(BR)/missionpack/vm/qagame.qvm $(COPYDIR)/missionpack/vm/qagame.qvm
|
||||
$(INSTALL) -m 0755 $(BR)/missionpack/vm/cgame.qvm $(COPYDIR)/missionpack/vm/cgame.qvm
|
||||
$(INSTALL) -m 0755 $(BR)/missionpack/vm/ui.qvm $(COPYDIR)/missionpack/vm/ui.qvm
|
||||
endif
|
||||
|
||||
clean: clean-debug clean-release
|
||||
$(MAKE) -C $(LOKISETUPDIR) clean
|
||||
|
||||
|
|
|
@ -645,7 +645,7 @@ qboolean CL_ReadyToSendPacket( void ) {
|
|||
}
|
||||
|
||||
// send every frame for LAN
|
||||
if ( Sys_IsLANAddress( clc.netchan.remoteAddress ) ) {
|
||||
if ( cl_lanForcePackets->integer && Sys_IsLANAddress( clc.netchan.remoteAddress ) ) {
|
||||
return qtrue;
|
||||
}
|
||||
|
||||
|
|
|
@ -72,6 +72,8 @@ cvar_t *cl_inGameVideo;
|
|||
cvar_t *cl_serverStatusResendTime;
|
||||
cvar_t *cl_trn;
|
||||
|
||||
cvar_t *cl_lanForcePackets;
|
||||
|
||||
clientActive_t cl;
|
||||
clientConnection_t clc;
|
||||
clientStatic_t cls;
|
||||
|
@ -2484,6 +2486,7 @@ void CL_Init( void ) {
|
|||
|
||||
Cvar_Get( "cl_maxPing", "800", CVAR_ARCHIVE );
|
||||
|
||||
cl_lanForcePackets = Cvar_Get ("cl_lanForcePackets", "1", CVAR_ARCHIVE);
|
||||
|
||||
// userinfo
|
||||
Cvar_Get ("name", "UnnamedPlayer", CVAR_USERINFO | CVAR_ARCHIVE );
|
||||
|
|
|
@ -355,6 +355,8 @@ extern cvar_t *cl_allowDownload;
|
|||
extern cvar_t *cl_conXOffset;
|
||||
extern cvar_t *cl_inGameVideo;
|
||||
|
||||
extern cvar_t *cl_lanForcePackets;
|
||||
|
||||
//=================================================
|
||||
|
||||
//
|
||||
|
|
|
@ -1816,6 +1816,11 @@ void SaveJPG(char * filename, int quality, int image_width, int image_height, un
|
|||
* Here we just illustrate the use of quality (quantization table) scaling:
|
||||
*/
|
||||
jpeg_set_quality(&cinfo, quality, TRUE /* limit to baseline-JPEG values */);
|
||||
/* If quality is set high, disable chroma subsampling */
|
||||
if (quality >= 85) {
|
||||
cinfo.comp_info[0].h_samp_factor = 1;
|
||||
cinfo.comp_info[0].v_samp_factor = 1;
|
||||
}
|
||||
|
||||
/* Step 4: Start compressor */
|
||||
|
||||
|
@ -1890,6 +1895,11 @@ int SaveJPGToBuffer( byte *buffer, int quality,
|
|||
|
||||
jpeg_set_defaults(&cinfo);
|
||||
jpeg_set_quality(&cinfo, quality, TRUE /* limit to baseline-JPEG values */);
|
||||
/* If quality is set high, disable chroma subsampling */
|
||||
if (quality >= 85) {
|
||||
cinfo.comp_info[0].h_samp_factor = 1;
|
||||
cinfo.comp_info[0].v_samp_factor = 1;
|
||||
}
|
||||
|
||||
/* Step 4: Start compressor */
|
||||
jpeg_start_compress(&cinfo, TRUE);
|
||||
|
|
|
@ -423,7 +423,7 @@ void RB_TakeScreenshotJPEG( int x, int y, int width, int height, char *fileName
|
|||
}
|
||||
|
||||
ri.FS_WriteFile( fileName, buffer, 1 ); // create path
|
||||
SaveJPG( fileName, 95, glConfig.vidWidth, glConfig.vidHeight, buffer);
|
||||
SaveJPG( fileName, 90, glConfig.vidWidth, glConfig.vidHeight, buffer);
|
||||
|
||||
ri.Hunk_FreeTempMemory( buffer );
|
||||
}
|
||||
|
@ -727,7 +727,7 @@ const void *RB_TakeVideoFrameCmd( const void *data )
|
|||
|
||||
if( cmd->motionJpeg )
|
||||
{
|
||||
frameSize = SaveJPGToBuffer( cmd->encodeBuffer, 95,
|
||||
frameSize = SaveJPGToBuffer( cmd->encodeBuffer, 90,
|
||||
cmd->width, cmd->height, cmd->captureBuffer );
|
||||
ri.CL_WriteAVIVideoFrame( cmd->encodeBuffer, frameSize );
|
||||
}
|
||||
|
|
|
@ -583,11 +583,11 @@ void SV_SendMessageToClient( msg_t *msg, client_t *client ) {
|
|||
|
||||
// set nextSnapshotTime based on rate and requested number of updates
|
||||
|
||||
// local clients get snapshots every frame
|
||||
// local clients get snapshots every server frame
|
||||
// TTimo - https://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=491
|
||||
// added sv_lanForceRate check
|
||||
if ( client->netchan.remoteAddress.type == NA_LOOPBACK || (sv_lanForceRate->integer && Sys_IsLANAddress (client->netchan.remoteAddress)) ) {
|
||||
client->nextSnapshotTime = svs.time - 1;
|
||||
client->nextSnapshotTime = svs.time + (1000/sv_fps->integer);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue