Commit graph

528 commits

Author SHA1 Message Date
Zack Middleton
c2ce1c2f51 Make client for Windows x86_64 use OpenAL64.dll by default
ioquake3.x86_64.exe can't load x86 OpenAL32.dll. Using separate
library names allows shipping OpenAL for both architectures.

Though since the dll name is saved in the config file, using both
clients on the same computer will cause one client arch to always
try to load the wrong OpenAL dll and then fallback to the correct
default OpenAL dll. I guess it could be fixed by using separate
cvar names for s_alDriver.
2017-09-04 20:34:55 -05:00
Mickaël Thomas
bae86208f9 Only allow safe protocols for cURL downloads
A malicious server could abuse dangerous protocols such as gopher:// to,
for instance, send mail via SMTP.
2017-08-15 21:47:27 -05:00
Zack Middleton
2d6171f44c Remove CVAR_PROTECTED from cl_renderer
Setting cl_renderer isn't a security concern and valid behavior for
a menu to provide. Sys_LoadDLL ensures only libries are loaded and
engine prevents QVMs from writing them.
2017-08-02 14:50:22 -05:00
MAN-AT-ARMS
e07ffa715c Update internal curl to 7.54.0 2017-07-28 16:32:22 +01:00
Zack Middleton
9f239d647b Make 'globalservers 0' fetch all masters
This commit fixes the vanilla Q3 UI VMs not displaying a server list
when id Software's master server is down.

Originally master 0 for the globalservers command was Internet and
master 1 was MPlayer (defunct). In 2008 ioquake3 changed it so that
master 0 to 4 were five separate master servers with no affect on
original Quake3/Team Arena UI VMs; they continued to get the server
list from master.quake3arena.com.

id Software's master server (master.quake3arena.com) goes down
occasionally. Using ioq3's UI VM additional master servers can be
accessed but players using the original UI VMs are unable to get a
server list.

In order to fix the original UI VMs in Quake3/Team Arena's pk3s this
commit makes 'globalservers 0' fetch all master servers. So players
get a combined list of id Software's and ioquake3's master list. Or
just ioquake3's list if id Software's master is down.

Getting lists from individual master servers using globalservers has
changed from 0 through 4 to 1 through 5 to accommodate using 0 for
other purposes. This commit modifies ioq3's UI code to support the new
values for globalservers command.

A side affect of these changes is that UI VMs based on ioq3 since 2008
will have Internet1 fetch all master servers and Internet2 request
sv_master1 instead of sv_master2 and so on. It may be worth noting that
getting server list from masters 3-5 could not be done using ioq3's UI
before 2011.
2017-07-20 15:39:51 -05:00
Zack Middleton
51ca4d35ea Fix misleading-indentation warnings in cl_cin.c 2017-07-09 14:01:41 -05:00
Zack Middleton
e9436abff0 Only allow connectionless print/echo from server/rcon address
Reported by Ensiform.
2017-06-10 19:15:26 -05:00
Zack Middleton
dfce71929a Add con_autochat and con_autoclear cvars 2017-06-08 15:46:19 -05:00
Zack Middleton
0b853a659a Make Team Arena server list sub-sort clients by max clients
The player column in Team Arena UI lists clients and max clients
in format of "clients [maxclients]". When sorting by clients the
max clients is ignored which results in player column being
disorganized.

When servers have the same number of clients, sort based on max
clients. Otherwise client sort is sub-sorted based on order of
getinfo responses (ping).
2017-06-01 17:24:06 -05:00
Zack Middleton
8a50e2aa09 Don't repeat alt+enter key event
Holding alt+enter should not continuously toggle fullscreen mode.
2017-05-29 16:41:03 -05:00
Zack Middleton
024a8842bd Fix compiling debug code for writing VoIP data 2017-05-29 09:54:39 -05:00
Zack Middleton
eecc8326a0 Save connect and playdemo argument before calling CL_Disconnect()
Save argument instead of using a pointer to cmd token memory that
might be overwritten when Cmd_TokenizeString() is called.

No known method for causing the issue without engine changes.
Cmd_TokenizeString() is called by FS_PureServerSetReferencedPaks()
in CL_Disconnect() but it's not an issue because the string is
blank.

Thanks @mickael9.
2017-05-24 12:46:25 -05:00
Zack Middleton
05858d30e8 Don't load libraries with non-standard file extensions
Also don't allow writting files ending in a library extension such
as ".so.0" or ".dylib.0".
2017-05-24 10:28:46 -05:00
SmileTheory
d4e1a01f33 Remove FS_Read2().
Functionally the same as FS_Read().
Streaming functionality was removed in 672cfbf16f but flag remained.
2017-03-17 04:21:11 -07:00
SmileTheory
b173ac0599 Merge some file writing extension checks from OpenJK.
Thanks Ensiform.
https://github.com/JACoders/OpenJK/commit/05928a57f9e4aae15a3bd0
https://github.com/JACoders/OpenJK/commit/ef124fd0fc48af164581176
2017-03-13 20:44:47 -07:00
SmileTheory
f61fe5f6a0 Don't open .pk3 files as OpenAL drivers. 2017-03-13 20:28:37 -07:00
SmileTheory
376267d534 Don't load .pk3s as .dlls, and don't load user config files from .pk3s. 2017-03-13 14:14:00 -07:00
Tim Angus
d85a544bf2 Merge pull request #230 from fmwviormv/patch-1
reset samplefrac to 8-bits, to prevent overflow
2017-01-25 10:42:49 +00:00
Zack Middleton
978afd7590 Avoid shuting down opus voip codec multiple times 2016-10-09 18:30:19 -05:00
fmwviormv
2ef641b969 reset samplefrac to 8-bits, to prevent overflow
issue: https://github.com/ioquake/ioq3/issues/106
2016-10-07 01:21:15 +03:30
SmileTheory
1246d16834 Default cl_renderer to opengl2. 2016-10-02 20:00:59 -07:00
Simon McVittie
c5b6bb0d4b snd_wavelet: avoid undefined pointer below array bounds
Given an array b[] of length n, pointers to &b[0]..&b[n] are defined
(where only &b[0]..&b[n-1] can be validly dereferenced). &b[-1], or
equivalently b-1, is not something we can use in valid Standard C.

gcc 6 diagnoses this as:

code/client/snd_wavelet.c:33:9: warning: array subscript is below array bounds [-Warray-bounds]

and might take this undefined behaviour as permission to emit
"more efficient" object code that is not what the author expected,
for example nothing at all. Use a macro to fake a 1-based array instead.
2016-09-25 17:13:40 +01:00
SmileTheory
b7f2ebd477 Better gamepad support. 2016-08-08 02:36:10 -07:00
SmileTheory
1972128927 Better defaults for joystick axes.
These changed from SDL1->SDL2 afaict.
2016-08-04 21:31:26 -07:00
Zack Middleton
780f0a5d3e Prevent CL_RunCinematic from reading cinTable[-1]
At the end of CL_RunCinematic, RoQShutdown sets currentHandle to -1.
This causes the return at the end to be return cinTable[-1].status.
Use return FMV_EOF when RoQShutdown is called.

I think FMV_EOF should be returned instead of FMV_IDLE which is set in
RoQShutdown because RoQShutdown is clearing out state so it can be reused
for a new cinematic.

The return value isn't actually read by the ioq3 client, renderers,
cgame, or ui.
2016-06-15 13:58:26 -05:00
Victor Roemer
398dea397c Fix Makefile for OSX
Bump base SDK from 10.5 -> 10.7
Just use the builtin __APPLE__
2016-06-12 17:17:33 -04:00
Zack Middleton
8b458e5457 Fix warnings that names passed to Name_PlayerNameCompletion is not const 2016-05-09 10:41:58 -05:00
SmileTheory
41791c662f Fix frame_msec possibly being zero in cl_input.c.
This fixes a mouse freezing bug.
2016-01-29 20:14:35 -08:00
Zack Middleton
8d38e2307c Fix some opus_decode issues
It was able to fail the assert before. I was using opus_decode wrong.
2016-01-06 05:19:10 -06:00
Zack Middleton
615b73288f Use Opus for VoIP
Server/client VoIP protocol is handled by adding new cvars
cl_voipProtocol and sv_voipProtocol, sv_voip and cl_voip
are used to auto set/clear them. All users need to touch
are cl/sv_voip as 0 or 1 just like before.

Old Speex VoIP packets in demos are skipped.
New VoIP packets are skipped in demos if sv_voipProtocol
doesn't match cl_voipProtocol.

Notable difference between usage of speex and opus codecs,
when using Speex client would be sent 80ms at a time.
Using Opus, 60ms is sent at a time. This was changed because
the Opus codec supports encoding up to 60ms at a time.
(Simpler to send only one codec frame in a packet.)
2016-01-06 05:19:10 -06:00
Zachary J. Slater
fe619680f8 Merge pull request #73 from Pan7/sayto
sayto cmd with player name completion
2015-12-28 09:04:19 -08:00
Tim Angus
7e0dac7517 Fix check for empty rconpassword in CL_Rcon_f 2015-10-04 21:11:35 +01:00
Tim Angus
9732f1ba69 Now with less infinite recursion 2015-09-26 10:54:16 +01:00
Tim Angus
c70e10d15e Effectively revert c2e146c1 2015-09-25 22:50:01 +01:00
Tim Angus
ec6916ded5 Fix the wonky fix to the wonky va_list usage 2015-09-09 23:33:36 +01:00
Tim Angus
566e2a18de Fix wonky va_list usage 2015-09-09 22:32:12 +01:00
Pan7
8fddf5d6cd Fix va_list warning 2015-07-30 17:09:51 +02:00
Pan7
017af35969 Add missing qcurl handle cleanup 2015-07-29 16:44:59 +02:00
Tim Angus
4e1cf7ac9b Return the result from qcurl_easy_setopt_warn 2015-07-29 13:39:27 +01:00
Tim Angus
eb3dda59e4 Merge pull request #143 from Pan7/qcurl_cleanup
qcurl_multi_cleanup check
2015-07-29 13:16:39 +01:00
Pan7
e9e1e25d77 qcurl_multi_cleanup check 2015-07-29 13:32:00 +02:00
Pan7
c2e146c145 qcurl_easy_setopt dev warning 2015-07-28 17:23:31 +02:00
Tim Angus
da79a3ed4e Merge pull request #140 from Pan7/qcurl_remove
qcurl_multi_remove_handle check
2015-07-28 10:37:07 +01:00
Pan7
4db5c3af40 qcurl_multi_strerror not curl_multi_strerror 2015-07-27 21:04:47 +02:00
Pan7
85faec91ab qcurl_multi_remove_handle check 2015-07-27 20:38:20 +02:00
Tim Angus
0dad4ce9fe Merge pull request #92 from Pan7/curl_error
qcurl_multi_add_handle error check
2015-07-26 19:48:03 +01:00
Zack Middleton
b4b68b8e80 Remove logically dead code from CL_GetServerStatus
Found by Coverity.
2015-07-12 21:14:04 -05:00
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