Commit graph

479 commits

Author SHA1 Message Date
Zack Middleton
6d62dc3646 Fix abs() being used for float in cl_input.c 2015-06-28 18:27:09 -05:00
Zack Middleton
70eb1fa79e Make cinematic times be int like CL_ScaledMilliseconds
Cinematic's startTime and lastTime are always set from CL_ScaledMilliseconds
which returns int and are converted back and forth to int and unsigned int.

This fixes a warning that abs() is used on an unsigned int.
2015-06-28 18:02:51 -05:00
Zack Middleton
b27e0fbf95 Remove unused function WRITE_1BYTES from cl_avi.c 2015-06-28 17:55:51 -05:00
Jeff Kent
63e6c82f4b fix buffer overflow in CL_CheckForResend 2015-04-18 22:43:47 -05:00
Zack Middleton
4fb053b8e7 Fix incorrect strncpy in S_AL_StartBackgroundTrack
Error is loop argument is NULL.
Ensure that s_backgroundTrack is a null terminated string.
2015-02-05 04:37:26 -06:00
Simon McVittie
ff7ff32b0e Ensure that mbstowcs does not overflow its buffer
Similar to one of the changes by Tim Angus in fd986da: mbstowcs' third
argument is the number of wchar_t available in dest, not the number
of bytes.

This does not appear to be exploitable, because ioquake3 does
not actually call mumble_set_identity() or mumble_set_description()
anywhere, but it might be relevant to derivatives.

Spotted via compiler warnings.
2015-01-07 23:37:11 +00:00
Zack Middleton
7de09c3490 Include stdint.h instead of inttypes.h in libmumblelink.c
MSVC 2010 has stdint.h but not inttypes.h.
Debian (GCC, MinGW) and OS X (Clang) can compile using stdint.h.
2014-12-28 15:08:02 -06:00
Tim Angus
f83334d81b Add facility to describe cvars 2014-09-26 14:29:51 +01:00
Zack Middleton
a5d641b3d0 Merge pull request #84 from MAN-AT-ARMS/openal_speedsound
Change default value for s_alDopplerSpeed
2014-09-09 18:05:08 -05:00
MAN-AT-ARMS
a3653e475e Change default value for s_alDopplerSpeed 2014-09-09 13:03:29 -04:00
MAN-AT-ARMS
dd83cbdc25 Fix possible division by zero in S_PaintChannelFrom16_altivec 2014-09-09 11:30:23 -04:00
Tim Angus
4f3c95c589 Fix client warnings 2014-09-01 11:13:47 +01:00
Zack Middleton
de3062623a Use ColorIndexForNumber in Con_DrawSolidConsole 2014-08-29 01:55:47 -05:00
Zack Middleton
1d95ef210e SDL 2 scroll/caps/num lock keys send KEYUP event when key is released 2014-08-28 20:09:37 -05:00
Pan7
18e08125dd Add ColorIndexForNumber macro replacing '& 0x07'
Makes it easier to add more colors.
2014-08-28 20:09:37 -05:00
Zack Middleton
eeef7cbae7 Don't scale cinematic time by timescale twice
Reported by Ensiform.
2014-08-28 20:09:37 -05:00
Zack Middleton
0853c85e19 Fix incorrect strncat usage in CL_ServerInfoPacket 2014-08-27 20:35:16 -05:00
Zack Middleton
0fe2e8d224 Restore drawing a cut off client console line in 1920x1080
The text lines don't meet at top of the sceen in 1920x1080, restore
drawing a cut off line across the top. In 640x480 this line isn't seen
at all. This is still better then trying to draw twice as many lines
than are actually seen (the way it was before the last commit).
2014-07-13 02:07:45 -05:00
Zack Middleton
b9e0398244 Don't draw client console buffer past top of screen
Thanks @Pan7.
2014-07-12 21:57:03 -05:00
Zack Middleton
0861d3c583 Revert "DMA 44100Hz needs more memory for sound buffers"
This reverts commit 0e6632f464.

Cause crashes if com_soundMegs is 32.
2014-03-17 13:44:30 -05:00
Tequila
baca82d64e Bunch of comment fixes 2014-03-13 02:20:54 +01:00
Zack Middleton
0e6632f464 DMA 44100Hz needs more memory for sound buffers
It doubles the size of the data compared to the default (22050),
so increase the buffer automatically. Likewise, decreasing speed
doesn't need as much (though that doesn't really matter).
2014-03-11 17:16:03 -05:00
Zack Middleton
a167110f43 Don't mix sfx with NULL soundData
Caused a crash. Already done for looping sounds.
2014-03-11 16:44:50 -05:00
MAN-AT-ARMS
89fab090d7 Fix s_alDopplerSpeed default value 2014-03-02 23:00:46 -06:00
Zack Middleton
5bf4f26d5f Remove references to alDopplerVelocity
Let's load driver even if it doesn't have the deprecated alDopplerVelocity.
2014-02-22 18:06:04 -06:00
MAN-AT-ARMS
6887a69064 Replace deprecated alDopplerVelocity with alSpeedOfSound per OpenAL 1.1 spec 2014-02-22 18:02:22 -06:00
user
922d7044f6 Merge branch 'master' into features/upgrade-curl-7.35.0 2014-02-10 00:28:57 +00:00
Zack Middleton
90eb32c5ab Clear referenced paks when disconnecting
After playing Team Arena, if you switch to Q3A and try to play a demo with
cl_allowDownload enabled it would print "Need Paks: blah blah" and not play the demo.
2014-02-08 22:09:30 -06:00
hairball
1435e78454 Upgrade from libcurl 7.15.5 (2006-08-07) to 7.35.0 (2014-01-29)
Note: This uses the generic curlbuild.h because it is used by multiple platforms.
A system curl would have a configure generated one.

The libraries for win32 and win64 were cross compiled with these options:

  --disable-shared --enable-static --disable-ares --enable-http \
  --enable-ftp --disable-ldap --disable-ldaps --disable-rtsp \
  --disable-dict --disable-file --disable-telnet --disable-tftp \
  --disable-pop3 --disable-imap --disable-smtp --disable-gopher \
  --enable-ipv6 --without-ssl \
  --disable-manual --disable-libcurl-option

This effectively enables only HTTP and FTP protocol support.
2014-02-08 17:33:56 +00:00
Zack Middleton
aedb151d94 Merge pull request #33 from inolen/widescreen_clear_fix
don't clear screen during CA_LOADING and CA_PRIMED
2014-02-01 15:51:41 -08:00
Zack Middleton
36a4075a8d Try default OpenAL driver if user set one fails to load 2014-01-27 20:09:55 -06:00
Anthony Pesch
280b5269f8 don't clear screen during CA_LOADING and CA_PRIMED 2014-01-23 13:44:36 -08:00
Zack Middleton
0698817a7f Remove unused code path from S_Base_StartBackgroundTrack
We make sure intro isn't NULL. Then if loop is NULL, set it to intro.
2014-01-12 18:16:39 -06:00
Zack Middleton
ebac005c9e Don't read clc.voipIncomingSequence until range checked sender 2014-01-12 18:01:02 -06:00
Zack Middleton
52e72408d9 Fix demoName Com_sprintf size larger than buffer
Maybe this is why demoName is a static global with the comment 'compiler bug workaround'?
2014-01-12 16:22:46 -06:00
Zack Middleton
43c6ebee8d Fix music studder in base sound when starting silent cinematics 2014-01-12 15:14:38 -06:00
Zack Middleton
1a86229538 Fix playback of stereo sounds in Base sound system
Already works correctly in OpenAL.
2013-12-15 00:23:10 -06:00
Amanieu d'Antras
efe8437cde Fix crash in OpenAL when no input devices are available 2013-12-10 16:40:28 -06:00
Zack Middleton
fa9fd1b1fc Support spatialized raw streams in base sound, e.g. for VoIP 2013-12-07 00:15:29 -06:00
Zack Middleton
57eae5da91 Fix signal 6 in S_Base_StartBackgroundTrack on OS X 10.9
In S_UpdateBackgroundTrack, s_backgroundLoop was passed to
S_Base_StartBackgroundTrack and tried to copy to itself using Q_strncpyz.
2013-11-20 23:19:17 -06:00
Ensiform
93be2655f8 Remove unused cvar_t variable cl_trn 2013-11-11 01:09:10 -06:00
Zack Middleton
203ab7b9af Fix cinematics often being silent on OS X
If OpenAL source isn't playing, often what happens is: queued buffers is 0 and processed buffers is non-0.
S_AL_StreamUpdate won't play the steam if queued buffers 0.
So start the stream in S_AL_RawSamples.
2013-11-11 00:21:53 -06:00
Zack Middleton
b3bd74fce7 Fix restoring loop sound position on OS X
The default OpenAL library on OS X errors AL_INVALID_VALUE for AL_SEC_OFFSET if source isn't playing.
2013-11-10 23:28:54 -06:00
Zack Middleton
5795be68f6 Make OpenAL buffer management work on OS X
Don't assume we have unlimited OpenAL buffers.
Detach buffers from sources by setting AL_BUFFER to 0. Cannot delete buffers on OS X immediately after alSourceUnqueueBuffers.
Free unprocessed stream and music buffers.
Free unused sfx buffers when sound file exists and fails loading into OpenAL (though I haven't seen it fail).
2013-11-10 22:55:35 -06:00
Zack Middleton
2d45e57068 Support FS_SEEK_END and negative offset for zipped files in FS_Seek
Use FS_SEEK_END in sound code instead of working around it.
If FS_SEEK_SET and going to current position, just return.
2013-11-08 18:43:34 -06:00
Tim Angus
7ae49cc237 Fix video recording sync drift (patch refactored but original author unknown) 2013-11-02 19:11:14 +00:00
Zack Middleton
e0a42885d9 Clear more variables in CL_InitServerInfo
Have cls.localServers use CL_InitServerInfo.
Don't set cls.localServers netType to from.type, it's the wrong value.

Note: server->visible is not cleared in CL_InitServerInfo, as stated by a comment below a place where CL_InitServerInfo is used.
2013-10-28 15:23:01 -05:00
Zack Middleton
a836c2db89 Drop sounds starting with * before allocating sfx slot
Causes handle 0 to be returned by S_RegisterSound.
2013-10-09 09:51:32 -05:00
Zack Middleton
d4c6711e51 Fix "bind <key>" message for unbound keys
"bind X cmd; unbind X; bind X" now says '"x" is unbound' instead of '"x" = ""'
2013-08-16 15:41:01 -05:00
Zack Middleton
3d69ae9995 Fix OpenAL music stop issues using stream stop code
S_AL_StopBackgroundTrack would sometimes generate AL errors.
S_AL_MusicSourceFree needs to kill source or next track may have short looping buffer.
2013-08-16 15:29:12 -05:00