Merge branch 'master' into sdl2
This commit is contained in:
commit
779ebfacfd
32 changed files with 996 additions and 1795 deletions
|
@ -2429,6 +2429,9 @@ void CL_InitServerInfo( serverInfo_t *server, netadr_t *address ) {
|
|||
server->game[0] = '\0';
|
||||
server->gameType = 0;
|
||||
server->netType = 0;
|
||||
server->punkbuster = 0;
|
||||
server->g_humanplayers = 0;
|
||||
server->g_needpass = 0;
|
||||
}
|
||||
|
||||
#define MAX_SERVERSPERPACKET 256
|
||||
|
@ -2937,13 +2940,13 @@ void CL_Frame ( int msec ) {
|
|||
if ( CL_VideoRecording( ) && cl_aviFrameRate->integer && msec) {
|
||||
// save the current screen
|
||||
if ( clc.state == CA_ACTIVE || cl_forceavidemo->integer) {
|
||||
float fps = MIN(cl_aviFrameRate->value * com_timescale->value, 1000.0f);
|
||||
float frameDuration = MAX(1000.0f / fps, 1.0f) + clc.aviVideoFrameRemainder;
|
||||
|
||||
CL_TakeVideoFrame( );
|
||||
|
||||
// fixed time for next frame'
|
||||
msec = (int)ceil( (1000.0f / cl_aviFrameRate->value) * com_timescale->value );
|
||||
if (msec == 0) {
|
||||
msec = 1;
|
||||
}
|
||||
msec = (int)frameDuration;
|
||||
clc.aviVideoFrameRemainder = frameDuration - msec;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3836,21 +3839,8 @@ void CL_ServerInfoPacket( netadr_t from, msg_t *msg ) {
|
|||
|
||||
// add this to the list
|
||||
cls.numlocalservers = i+1;
|
||||
cls.localServers[i].adr = from;
|
||||
cls.localServers[i].clients = 0;
|
||||
cls.localServers[i].hostName[0] = '\0';
|
||||
cls.localServers[i].mapName[0] = '\0';
|
||||
cls.localServers[i].maxClients = 0;
|
||||
cls.localServers[i].maxPing = 0;
|
||||
cls.localServers[i].minPing = 0;
|
||||
cls.localServers[i].ping = -1;
|
||||
cls.localServers[i].game[0] = '\0';
|
||||
cls.localServers[i].gameType = 0;
|
||||
cls.localServers[i].netType = from.type;
|
||||
cls.localServers[i].punkbuster = 0;
|
||||
cls.localServers[i].g_humanplayers = 0;
|
||||
cls.localServers[i].g_needpass = 0;
|
||||
|
||||
CL_InitServerInfo( &cls.localServers[i], &from );
|
||||
|
||||
Q_strncpyz( info, MSG_ReadString( msg ), MAX_INFO_STRING );
|
||||
if (strlen(info)) {
|
||||
if (info[strlen(info)-1] != '\n') {
|
||||
|
|
|
@ -233,6 +233,9 @@ typedef struct {
|
|||
int timeDemoMaxDuration; // maximum frame duration
|
||||
unsigned char timeDemoDurations[ MAX_TIMEDEMO_DURATIONS ]; // log of frame durations
|
||||
|
||||
float aviVideoFrameRemainder;
|
||||
float aviSoundFrameRemainder;
|
||||
|
||||
#ifdef USE_VOIP
|
||||
qboolean voipEnabled;
|
||||
qboolean speexInitialized;
|
||||
|
|
|
@ -271,6 +271,11 @@ static sfx_t *S_FindName( const char *name ) {
|
|||
return NULL;
|
||||
}
|
||||
|
||||
if (name[0] == '*') {
|
||||
Com_Printf( S_COLOR_YELLOW "WARNING: Tried to load player sound directly: %s\n", name );
|
||||
return NULL;
|
||||
}
|
||||
|
||||
hash = S_HashSFXName(name);
|
||||
|
||||
sfx = sfxHash[hash];
|
||||
|
@ -1237,7 +1242,13 @@ void S_GetSoundtime(void)
|
|||
|
||||
if( CL_VideoRecording( ) )
|
||||
{
|
||||
s_soundtime += (int)ceil( dma.speed / cl_aviFrameRate->value );
|
||||
float fps = MIN(cl_aviFrameRate->value, 1000.0f);
|
||||
float frameDuration = MAX(dma.speed / fps, 1.0f) + clc.aviSoundFrameRemainder;
|
||||
|
||||
int msec = (int)frameDuration;
|
||||
s_soundtime += msec;
|
||||
clc.aviSoundFrameRemainder = frameDuration - msec;
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -208,11 +208,6 @@ qboolean S_LoadSound( sfx_t *sfx )
|
|||
snd_info_t info;
|
||||
// int size;
|
||||
|
||||
// player specific sounds are never directly loaded
|
||||
if ( sfx->soundName[0] == '*') {
|
||||
return qfalse;
|
||||
}
|
||||
|
||||
// load it in
|
||||
data = S_CodecLoad(sfx->soundName, &info);
|
||||
if(!data)
|
||||
|
|
|
@ -208,6 +208,11 @@ static sfxHandle_t S_AL_BufferFind(const char *filename)
|
|||
return 0;
|
||||
}
|
||||
|
||||
if ( filename[0] == '*' ) {
|
||||
Com_Printf( S_COLOR_YELLOW "WARNING: Tried to load player sound directly: %s\n", filename );
|
||||
return 0;
|
||||
}
|
||||
|
||||
for(i = 0; i < numSfx; i++)
|
||||
{
|
||||
if(!Q_stricmp(knownSfx[i].filename, filename))
|
||||
|
@ -325,10 +330,6 @@ static void S_AL_BufferLoad(sfxHandle_t sfx, qboolean cache)
|
|||
if(curSfx->filename[0] == '\0')
|
||||
return;
|
||||
|
||||
// Player SFX
|
||||
if(curSfx->filename[0] == '*')
|
||||
return;
|
||||
|
||||
// Already done?
|
||||
if((curSfx->inMemory) || (curSfx->isDefault) || (!cache && curSfx->isDefaultChecked))
|
||||
return;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue