Skip to content

Commit

Permalink
ioquake3-2214-SWiSH-1.1.patch applied to ioquake3-2216
Browse files Browse the repository at this point in the history
  • Loading branch information
spekode committed Jan 24, 2012
1 parent 476afb0 commit 780c50a
Show file tree
Hide file tree
Showing 25 changed files with 1,922 additions and 260 deletions.
19 changes: 3 additions & 16 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -259,22 +259,8 @@ ifneq ($(BUILD_CLIENT),0)
endif

# Add svn version info
USE_SVN=
ifeq ($(wildcard .svn),.svn)
SVN_REV=$(shell LANG=C svnversion .)
ifneq ($(SVN_REV),)
VERSION:=$(VERSION)_SVN$(SVN_REV)
USE_SVN=1
endif
else
ifeq ($(wildcard .git/svn/.metadata),.git/svn/.metadata)
SVN_REV=$(shell LANG=C git svn info | awk '$$1 == "Revision:" {print $$2; exit 0}')
ifneq ($(SVN_REV),)
VERSION:=$(VERSION)_SVN$(SVN_REV)
endif
endif
endif

SVN_REV=2214
VERSION:=$(VERSION)_SVN$(SVN_REV)

#############################################################################
# SETUP AND BUILD -- LINUX
Expand Down Expand Up @@ -1378,6 +1364,7 @@ Q3OBJ = \
\
$(B)/client/snd_adpcm.o \
$(B)/client/snd_dma.o \
$(B)/client/snd_dmahd.o \
$(B)/client/snd_mem.o \
$(B)/client/snd_mix.o \
$(B)/client/snd_wavelet.o \
Expand Down
16 changes: 16 additions & 0 deletions Makefile.local
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#
# Build options for SWiSH
#

CLIENTBIN=ioUrT_SWiSH

BUILD_STANDALONE=1
BUILD_CLIENT=1
BUILD_CLIENT_SMP=1
BUILD_SERVER=0
BUILD_GAME_SO=0
BUILD_GAME_QVM=0
BUILD_BASEGAME=0
BUILD_MISSIONPACK=0
#USE_RENDERER_DLOPEN=0
#USE_CURL_DLOPEN=0
22 changes: 11 additions & 11 deletions code/client/cl_input.c
Original file line number Diff line number Diff line change
Expand Up @@ -691,15 +691,15 @@ qboolean CL_ReadyToSendPacket( void ) {
return qtrue;
}

// check for exceeding cl_maxpackets
if ( cl_maxpackets->integer < 15 ) {
Cvar_Set( "cl_maxpackets", "15" );
} else if ( cl_maxpackets->integer > 125 ) {
Cvar_Set( "cl_maxpackets", "125" );
// check for exceeding sacc_maxpackets
if ( sacc_maxpackets->integer < 30 ) {
Cvar_Set( "sacc_maxpackets", "30" );
} else if ( sacc_maxpackets->integer > 125 ) {
Cvar_Set( "sacc_maxpackets", "125" );
}
oldPacketNum = (clc.netchan.outgoingSequence - 1) & PACKET_MASK;
delta = cls.realtime - cl.outPackets[ oldPacketNum ].p_realtime;
if ( delta < 1000 / cl_maxpackets->integer ) {
if ( delta < 1000 / sacc_maxpackets->integer ) {
// the accumulated commands will go out in the next packet
return qfalse;
}
Expand Down Expand Up @@ -771,12 +771,12 @@ void CL_WritePacket( void ) {
// we want to send all the usercmds that were generated in the last
// few packet, so even if a couple packets are dropped in a row,
// all the cmds will make it to the server
if ( cl_packetdup->integer < 0 ) {
Cvar_Set( "cl_packetdup", "0" );
} else if ( cl_packetdup->integer > 5 ) {
Cvar_Set( "cl_packetdup", "5" );
if ( sacc_packetdup->integer < 0 ) {
Cvar_Set( "sacc_packetdup", "0" );
} else if ( sacc_packetdup->integer > 5 ) {
Cvar_Set( "sacc_packetdup", "5" );
}
oldPacketNum = (clc.netchan.outgoingSequence - 1 - cl_packetdup->integer) & PACKET_MASK;
oldPacketNum = (clc.netchan.outgoingSequence - 1 - sacc_packetdup->integer) & PACKET_MASK;
count = cl.cmdNumber - cl.outPackets[ oldPacketNum ].p_cmdNumber;
if ( count > MAX_PACKET_USERCMDS ) {
count = MAX_PACKET_USERCMDS;
Expand Down
9 changes: 6 additions & 3 deletions code/client/cl_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ cvar_t *rcon_client_password;
cvar_t *rconAddress;

cvar_t *cl_timeout;
cvar_t *sacc_maxpackets;
cvar_t *sacc_packetdup;
cvar_t *cl_maxpackets;
cvar_t *cl_packetdup;
cvar_t *cl_timeNudge;
Expand Down Expand Up @@ -3472,8 +3474,8 @@ void CL_Init( void ) {
cl_pitchspeed = Cvar_Get ("cl_pitchspeed", "140", CVAR_ARCHIVE);
cl_anglespeedkey = Cvar_Get ("cl_anglespeedkey", "1.5", 0);

cl_maxpackets = Cvar_Get ("cl_maxpackets", "30", CVAR_ARCHIVE );
cl_packetdup = Cvar_Get ("cl_packetdup", "1", CVAR_ARCHIVE );
sacc_maxpackets = Cvar_Get ("sacc_maxpackets", "125", CVAR_USERINFO | CVAR_ARCHIVE );
sacc_packetdup = Cvar_Get ("sacc_packetdup", "1", CVAR_USERINFO | CVAR_ARCHIVE );

cl_run = Cvar_Get ("cl_run", "1", CVAR_ARCHIVE);
cl_sensitivity = Cvar_Get ("sensitivity", "5", CVAR_ARCHIVE);
Expand Down Expand Up @@ -3542,7 +3544,8 @@ void CL_Init( void ) {

// userinfo
Cvar_Get ("name", "UnnamedPlayer", CVAR_USERINFO | CVAR_ARCHIVE );
Cvar_Get ("rate", "25000", CVAR_USERINFO | CVAR_ARCHIVE );
Cvar_Get ("sacc_rate", "30000", CVAR_USERINFO | CVAR_ARCHIVE );
Cvar_Get ("rate", "30000", CVAR_USERINFO | CVAR_ARCHIVE );
Cvar_Get ("snaps", "20", CVAR_USERINFO | CVAR_ARCHIVE );
Cvar_Get ("model", "sarge", CVAR_USERINFO | CVAR_ARCHIVE );
Cvar_Get ("headmodel", "sarge", CVAR_USERINFO | CVAR_ARCHIVE );
Expand Down
2 changes: 2 additions & 0 deletions code/client/client.h
Original file line number Diff line number Diff line change
Expand Up @@ -372,6 +372,8 @@ extern cvar_t *cl_nodelta;
extern cvar_t *cl_debugMove;
extern cvar_t *cl_noprint;
extern cvar_t *cl_timegraph;
extern cvar_t *sacc_maxpackets;
extern cvar_t *sacc_packetdup;
extern cvar_t *cl_maxpackets;
extern cvar_t *cl_packetdup;
extern cvar_t *cl_shownet;
Expand Down
21 changes: 14 additions & 7 deletions code/client/snd_dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA

#include "snd_local.h"
#include "snd_codec.h"
#include "snd_dmahd.h"
#include "client.h"

void S_Update_( void );
Expand All @@ -55,14 +56,14 @@ channel_t s_channels[MAX_CHANNELS];
channel_t loop_channels[MAX_CHANNELS];
int numLoopChannels;

static int s_soundStarted;
static qboolean s_soundMuted;
int s_soundStarted;
qboolean s_soundMuted;

dma_t dma;

static int listener_number;
static vec3_t listener_origin;
static vec3_t listener_axis[3];
int listener_number;
vec3_t listener_origin;
vec3_t listener_axis[3];

int s_soundtime; // sample PAIRS
int s_paintedtime; // sample PAIRS
Expand All @@ -81,7 +82,7 @@ cvar_t *s_show;
cvar_t *s_mixahead;
cvar_t *s_mixPreStep;

static loopSound_t loopSounds[MAX_GENTITIES];
loopSound_t loopSounds[MAX_GENTITIES];
static channel_t *freelist = NULL;

int s_rawend[MAX_RAW_STREAMS];
Expand Down Expand Up @@ -1379,7 +1380,7 @@ void S_UpdateBackgroundTrack( void ) {
bufferSamples = MAX_RAW_SAMPLES - (s_rawend[0] - s_soundtime);

// decide how much data needs to be read from the file
fileSamples = bufferSamples * s_backgroundStream->info.rate / dma.speed;
fileSamples = (bufferSamples * dma.speed) / s_backgroundStream->info.rate;

if (!fileSamples)
return;
Expand Down Expand Up @@ -1544,5 +1545,11 @@ qboolean S_Base_Init( soundInterface_t *si ) {
si->MasterGain = S_Base_MasterGain;
#endif

#ifndef NO_DMAHD
if (dmaHD_Enabled()) {
return dmaHD_Init(si);
}
#endif

return qtrue;
}
Loading

0 comments on commit 780c50a

Please sign in to comment.