Commit graph

2891 commits

Author SHA1 Message Date
SmileTheory
ad819edcc4 OpenGL2: Workaround for multiple deforms on MD3 mesh.
https://github.com/ioquake/ioq3/issues/122
2016-10-11 04:18:41 -07:00
SmileTheory
aa79738c50 OpenGL2: Store vertex colors and hdr lightmaps/lightgrid as RGBA16. 2016-10-11 03:28:20 -07:00
SmileTheory
239f539702 OpenGL2: Non-square merged lightmaps. 2016-10-10 03:06:03 -07:00
Zack Middleton
c80f341711 Handle ERR_DROP during Com_GameRestart
If ERR_DROP during Com_GameRestart after shutting down client, Com_Error
needs to restart the client otherwise there is just a black window. Also,
clear the game restarting flag in Com_Error otherwise it's not possible to
run Com_GameRestart again later.

I don't know of a way to trigger ERR_DROP, in FS_Restart for instance,
without engine changes however.
2016-10-09 19:17:58 -05:00
Zack Middleton
978afd7590 Avoid shuting down opus voip codec multiple times 2016-10-09 18:30:19 -05:00
Zack Middleton
755b2f38f0 Offer post-crash safe settings on a per-mod basis
Offer to restore settings when loading a mod that crashed, not the first
mod that gets loaded after a crash. Before the first mod loaded (usually
baseq3) would get the option even if missionpack or some other mod crashed.

- Make pid files separate for each fs_game.
- Remove/write pid every time switching fs_game.
- Create path before writing pid file otherwise it fails on first run.
- Show mod description.txt or fs_game instead of engine name in abnormal
  exit message.
- Check com_fullyInitialized in Com_Error before removing PID,
  otherwise "ioquake3 --version" segfaults when accessing fs_gamevar->string
  (plus not fully initialized isn't really a normal shutdown).
2016-10-09 18:18:08 -05:00
SmileTheory
1246d16834 Default cl_renderer to opengl2. 2016-10-02 20:00:59 -07:00
Tim Angus
f71fe6b613 Merge pull request #226 from smcv/underflow
Fix array underflow compiler warnings
2016-09-27 21:07:05 +01:00
Tim Angus
cce24668f7 Merge pull request #225 from smcv/reproducible-date
Pick up date from SOURCE_DATE_EPOCH, for reproducible builds
2016-09-27 21:05:24 +01:00
Tim Angus
5a33abe90c Merge pull request #224 from smcv/notshlib
Introduce NOTSHLIBLDFLAGS, used to link executables only
2016-09-27 21:03:45 +01:00
Tim Angus
3bd30f1f4f Merge pull request #223 from smcv/seperating
Fix mis-spellings of "separating" as "seperating"
2016-09-27 21:03:00 +01:00
Simon McVittie
f1a133acf1 UI_BuildFindPlayerList: make a sizeof() more obviously correct
As with the other branch of the if/else, each element of
foundPlayerServerNames is in fact the same size as each element of
foundPlayerServerAddresses, so it was fine; but it's better to make
it obvious that we are using the right array sizes.
2016-09-25 17:13:50 +01:00
Simon McVittie
01bfb1540f UI_BuildFindPlayerList: avoid array underflow
This function is used in the Team Arena menus

I don't think it's actually possible to reach this line with
foundPlayerServerNames < 1, because by the time we get here we have
set it to 1 + the actual number of servers; but if we did, it would
clearly underflow into foundPlayerServerNames[-1], which would be
undefined behaviour. gcc 6 diagnoses this with a warning:

code/ui/ui_main.c: In function ‘UI_BuildFindPlayerList’:
code/ui/ui_main.c:4138:16: warning: array subscript is below array bounds [-Warray-bounds]

Also correct the sizeof() invocation to make it more obviously
correct (in fact the buffers for names and addresses happen to both
be of size MAX_ADDRESSLENGTH, so it was fine, but it's good to be
obvious).
2016-09-25 17:13:47 +01: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
1cfa16674c OpenGL2: Some tr_image refactoring/cleanup. 2016-09-22 23:04:13 -07:00
Simon McVittie
9c76b546e3 Pick up date from SOURCE_DATE_EPOCH, for reproducible builds
The goal of reproducible builds is that a rebuild of the same source
code with the same compiler, libraries, etc. should result in the same
binaries. SOURCE_DATE_EPOCH provides a standard way for build systems
to fill in the date of the latest source change, typically from a git
commit or from metadata like the debian/changelog in Debian packages.

This does not change anything if SOURCE_DATE_EPOCH is not defined;
the intention is that a larger build system like a Debian package
will define it.

Please see https://reproducible-builds.org/ for more information about
reproducible builds.
2016-09-22 09:02:20 +01:00
Simon McVittie
cab94d0559 Introduce NOTSHLIBLDFLAGS, used to link executables only
This can be used for LDFLAGS that would be inappropriate for shared
libraries, such as the "-fPIE -pie" used to link position-independent
executables. PIEs make it more difficult to exploit various classes
of security vulnerability.
2016-09-22 08:58:18 +01:00
Simon McVittie
7d4f9525df Fix mis-spellings of "separating" as "seperating"
Found by Debian's Lintian tool.
2016-09-22 08:56:30 +01:00
SmileTheory
8417c184b4 OpenGL2: Clamp entity lighting to more resemble OpenGL1. 2016-09-14 04:19:46 -07:00
SmileTheory
8749d62bbd OpenGL2: Remove per fragment tangent space calculation code. 2016-09-14 03:57:51 -07:00
SmileTheory
4faf1008a0 OpenGL2: Remove map color scaling and r_forceSunMapLightScale.
Also simplify overbright code in ComputeShaderColors().
2016-09-14 02:59:54 -07:00
Tim Angus
4c169ab574 Merge pull request #221 from tkoeppe/strncpy
[code/botlib/l_precomp.c] Fix string buffer overflow
2016-09-13 13:55:08 +01:00
Thomas Köppe
90f2f02c55 [code/botlib/l_precomp.c] Fix string buffer overflow 2016-09-13 13:37:19 +01:00
Tim Angus
bd062f713a Merge pull request #216 from tkoeppe/abs
[renderergl2/tr_main.c] Use floating-point fabsf() for floating-point values
2016-09-13 10:34:48 +01:00
SmileTheory
bbc9e263f0 OpenGL2: Fix more reversed VectorCopy4() usage. 2016-09-13 01:41:46 -07:00
Tim Angus
7d063ba81d Merge pull request #220 from tkoeppe/shift
[qcommon/msg.c] Remove dead code
2016-09-12 18:00:21 +01:00
Thomas Köppe
fe111df610 [qcommon/msg.c] Remove dead code (which had undefined behaviour) 2016-09-12 13:32:59 +01:00
SmileTheory
ec3779988c OpenGL2: Fix reversed VectorCopy4() usage. 2016-09-11 16:08:18 -07:00
SmileTheory
497a74f22a Fix undefined behavior when shifting left by 32.
https://bugzilla.icculus.org/show_bug.cgi?id=6432
2016-09-07 16:56:23 -07:00
SmileTheory
927c9cc23c OpenGL2: Make R_FreeSurfaceGridMeshData() static. 2016-09-07 14:59:19 -07:00
SmileTheory
f9e5712311 OpenGL2: Fix missing bounds calculation when loading BSP surfaces. 2016-09-06 19:44:14 -07:00
SmileTheory
dfbaf50324 OpenGL2: Store normals/tangents as int16_t[4]. 2016-09-06 00:57:15 -07:00
Thomas Köppe
0eb72cd8c4 [renderergl2/tr_main.c] Use floating-point fabsf() for floating-point values 2016-09-01 17:29:32 +01:00
Tim Angus
762f50757d Merge pull request #213 from tkoeppe/abs
[game/ai_main.c] Use floating-point fabs() for floating-point values
2016-08-23 21:19:36 +01:00
Thomas Köppe
3c8da8ca07 [game/ai_main.c] Use floating-point fabs() for floating-point values 2016-08-23 19:36:27 +01:00
SmileTheory
c5c01e771a Fix joystick w/o controller mapping not working with SDL update. 2016-08-16 19:01:18 -07:00
James Canete
fb65e1232f Merge pull request #212 from MAN-AT-ARMS/sdl204-stripped
Add stripped SDL2 reference dll's to repo
2016-08-16 18:57:30 -07:00
MAN-AT-ARMS
966d39efed Add stripped SDL2 reference dll's to repo 2016-08-16 10:50:24 -04:00
James Canete
e8c5b3a535 Merge pull request #207 from MAN-AT-ARMS/sdl204
Update SDL2 to 2.0.4
2016-08-16 01:18:05 -07:00
MAN-AT-ARMS
4f9310dfa4 Update SDL2 to 2.0.4 2016-08-15 22:20:00 -04:00
SmileTheory
4ce600f5ac Missing bit of previous commit. 2016-08-14 22:33:48 -07:00
SmileTheory
fe8ac838e2 OpenGL2: Preallocate grid surfaces like other BSP surfaces. 2016-08-14 22:22:20 -07:00
SmileTheory
1cf0b21cda Fix black screen when in_joystick disabled but controller connected. 2016-08-11 00:46:43 -07:00
Zachary J. Slater
f47aaa2a61 Minor URL change. 2016-08-07 23:53:38 -10:00
SmileTheory
6262972488 Fix stricmp usage in previous commit. 2016-08-08 02:43:02 -07:00
SmileTheory
b7f2ebd477 Better gamepad support. 2016-08-08 02:36:10 -07:00
Zachary J. Slater
879fb555a5 Minor updates to README.md
Removed some language about the old mailing list, pointed to forums,
and more accurately to the
wiki, updated reference to SDL.
Zardoz speaks to you, His chosen ones.
2016-08-04 21:05:33 -10:00
SmileTheory
d09866861e Controller hot plug support. 2016-08-04 21:32:35 -07:00
SmileTheory
1972128927 Better defaults for joystick axes.
These changed from SDL1->SDL2 afaict.
2016-08-04 21:31:26 -07:00
SmileTheory
5252e28163 OpenGL2: Fix shader error logs. 2016-08-04 20:16:22 -07:00