Commit graph

2736 commits

Author SHA1 Message Date
Tim Angus
dd82b9d1a8 Fix case where interval overflows (thanks jackeri)
[17:58] <Jacker> hey, you might be interested in checking out this
4da5a397b5 (diff-acaedc9d8b492f9af8966ae68597392cR615)
[17:58] <Jacker> its related to the ddos protection code you wrote
[17:59] <Jacker> in continuation to:
ab9b08e584
[17:59] <Jacker> in a case if the client has in the past connected to
the server days/weeks earlier and time wraps the client wont be able to
connect
[18:00] <Jacker> since in that case if the bucket of that clients ip
still exists it wont get checked correctly
2014-12-29 19:08:42 +00:00
Zack Middleton
458ab7716c Make travis do all the builds again
Travis was only using the last env section, not merged them and was only doing
one build using gcc instead of six builds (gcc, clang, mingw, ..).
2014-12-28 15:38:22 -06: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
Zack Middleton
3cc16d6b92 Merge pull request #94 from wombat23/asmfix
Fix compile error with ml64 assembler
2014-12-28 15:06:29 -06:00
Tim Angus
a2bbb74cae Unfix warning 2014-12-28 15:47:40 +00:00
Tim Angus
4756826521 Fix warning 2014-12-28 12:44:59 +00:00
Zack Middleton
70e3d61006 Fix cg.intermissionStarted only being enabled at first intermission
Game sets CS_INTERMISSION to 1 at intermission, but does not clear it at
map_restart so it's only sent the first time. CG_MapRestart manually clears
cg.intermissionStarted (which is set to value of CS_INTERMISSION when it's
modified). So subsequent intermissions do not have cg.intermissionStarted
enabled.

Now CS_INTERMISSION is cleared and sent each time intermission is started
and cg.intermissionStarted is enabled each time.

This makes subsequent intermissions not play sounds in CG_CheckLocalSounds
during the 1 second between intermission starting and switching to scoreboard
(PM_INTERMISSION) and makes Team Arena voice chats not play.
2014-12-27 18:32:49 -06:00
Pan7
a82fb6d1b1 Windows header files for q3lcc 2014-12-26 23:33:52 +01:00
Pan7
6de3f51c23 Renaming outp to outbufp because outp() is an existing function 2014-12-26 12:52:10 +01:00
Zack Middleton
4463af85fb When player stops following a player, keep view angles
Now player keeps looking the same direction instead of facing somewhere else
which is slightly disorienting.
2014-12-19 22:09:26 -06:00
Zack Middleton
5cf45c5937 Don't use dead view angles after stop following a dead player
If ps.stats[STAT_HEALTH] is less or equal to 0, cgame uses fixed view angles.
When stop following a player, make sure health isn't less or equal to 0.
2014-12-19 22:08:06 -06:00
Zack Middleton
a700b76722 Fix reading 4 byte UTF-8 text input 2014-12-19 21:56:54 -06:00
Zack Middleton
65121c62c9 Add weapon barrel to gauntlet/mg/bfg items in baseq3 too 2014-12-10 19:29:36 -06:00
Zack Middleton
b0561e5fb4 Fix weapon barrel angle on Gauntlet and BFG items in Team Arena
The barrels were rotated 90 degrees from what they should be.
Used barrel code from CG_AddPlayerWeapon to fix them.
2014-12-10 19:23:35 -06:00
Michael Rieder
55c15e4466 Fix compile error with ml64 assembler 2014-12-07 03:40:52 +01:00
Zack Middleton
424122c366 Fix bot's teamleader name field being too short
Players using names with 32 to 35 characters could not be recognized as
the team leader.

Reported by Razor.
2014-12-04 16:50:28 -06:00
Zack Middleton
6557800707 Merge branch 'master' into game/eliteforce 2014-12-02 17:40:09 -06:00
Zack Middleton
b21a59af8c Fix negative glyph index in Team Arena text functions
Team Arena's text functions cast signed char values to int and use as an array index.
This works fine for values 0 to 127, but not for -128 to -1 which are a negative array index.
Instead use "character & 255" like client and original Q3 ui/cgame string drawing code.
2014-12-01 22:14:58 -06:00
Zack Middleton
08ddb99732 Fix saving/loading glyph 255 in RegisterFont
The glyph for character 255 (lower case y with two dots above it) was
rendered, but it's glyph information was not stored in fontInfo_t and
not saved into .dat file (including the ones in Team Arena).

Attempting to load it from existing .dat font files is fine because
shader name is "" and gets 0 handle. The handle was already 0 anyway.
2014-12-01 22:04:40 -06:00
SmileTheory
8c7fedb1fe OpenGL2: Fix face culling. 2014-11-30 21:50:33 -08:00
SmileTheory
fd23249357 OpenGL2: Ensure tess VAO is bound before using it. 2014-11-21 16:12:53 -08:00
Zack Middleton
c787cf3aef Fix stencil shadows not drawing if has 500 or more vertexes
Stencil shadow is not drawn if a mesh, or multiple meshes with the same
entity and shader, have more than 500 vertexes. The issue is caused by storing
the projected positions in the tess vertex buffer. Use a new array instead.
2014-11-16 21:21:30 -06:00
Zack Middleton
d06deb41c8 Don't set fog image border color
GL1's R_CreateImage sets GL texture to 0 before it ends, so border color is not
applied to the fog image. GL_CLAMP is not used for fog image (in either renderer),
so it would presumably not be used even if applied to the fog image.
2014-11-16 14:59:09 -06:00
Zack Middleton
60d28722ef Remove unfinished OpenGL display list code
It seems unlikely anyone is going to do anything with this aside from stub
it out in OpenGLES ports.
2014-11-16 14:57:13 -06:00
Zack Middleton
22bcda018b Correct a few OpenGL variable types
Affectly no change for desktop OpenGL.
Use correct types for OpenGLES support.
2014-11-16 14:56:43 -06:00
SmileTheory
89b719ec8d OpenGL2: Bit more parallax optimization. 2014-11-14 01:12:41 -08:00
SmileTheory
d9e2184c1a OpenGL2: Add support for parallax occlusion mapping. 2014-11-10 22:11:36 -08:00
SmileTheory
b1821e303d OpenGL2: remove lightmap support from generic glsl shader.
This path was barely used and doing this compiles fewer shaders.
2014-11-10 21:59:37 -08:00
Zack Middleton
1d016e6ff5 Clear window buffer when it's created
When starting the game in windowed mode, the window buffer used whatever
was on the screen before running the game. Kind of like you could see
through the window, but it doesn't update what happens behind it.

It makes it look like something is broken or non-responsive.

So clear the window opengl buffer to black.

Credit to theinvsblman for the code.
2014-11-07 21:50:00 -06:00
SmileTheory
1ad2b413ef Remove accidentally added increment. 2014-11-03 22:18:17 -08:00
SmileTheory
943259f6b4 OpenGL2: Support half floats for texcoords and vertex colors. 2014-11-03 19:10:35 -08:00
Zack Middleton
475e145d05 Fix holodeck doors fade out
Using the GL1 statebits in GL2 causes the doors to not fade not. Period.
In GL1 the items 'pop' into view after doors fade out completely.
Fix them both to fade out and blend over items.
2014-10-29 11:34:49 -05:00
Zack Middleton
7e663b7c86 Misc Elite Force code clean up 2014-10-29 10:52:23 -05:00
Zack Middleton
b7cd6b6088 Elite Force white space clean up
Also fixed some code to match ioq3 (a few comments, a printf, ..).
2014-10-29 10:13:12 -05:00
Zack Middleton
80986cbf21 Build Elite Force by default 2014-10-29 09:14:57 -05:00
Zack Middleton
ccd93c127b Port Elite Force renderer changes to OpenGL2
Appling the diff to renderergl2 mostly worked.

Had to change GLimp_HaveExtension to use GL_EXTENTIONS
directly because Elite Forces GL2 requires an extension that didn't fit in (the smaller than Q3)
glConfig.extensions_string.

Had to set ambientLight for RF_FULLBRIGHT, GL2 doesn't use ambientLightInt.

Made the RF_FORCE_ENT_ALPHA code change pStage->stateBits because the stateBits
are read a lot, whereas in GL1 it's done as an expression and passed to GL_State.
Copied from Spearmint.

There are a few issues; holodeck doors are missing and parts of light grid are black (???).
2014-10-29 09:00:23 -05:00
Zack Middleton
c6e5f060fe Port Elite Force iorev2231 patch to latest ioq3
Port Thilo Schulz's Elite Force Holomatch patch to latest ioq3.
Patch for ioq3 svn r2231.

No support for OpenGL2 renderer yet.
2014-10-29 07:15:12 -05:00
Zack Middleton
4d666212b2 Merge branch 'codec/mp3' into game/eliteforce 2014-10-29 06:39:10 -05:00
Zack Middleton
cd37c0adc3 Revert "Remove MSG_WriteDeltaUsercmd and MSG_ReadDeltaUsercmd"
This reverts commit 80b0792980.
2014-10-29 06:34:09 -05:00
Zack Middleton
0e412276c5 Add support for playing MP3s using libmad
Based on Thilo's Elite Force patch for ioq3.

Updated Makefile changes. Left out in-tree win32 lib support.
Striped trailing whitespace from snd_codec_mp3.c.
Changed two #if USE_CODEC_MP3 to use #ifdef.
2014-10-29 05:49:57 -05:00
Zack Middleton
1ba9e7a45e Always use GL_Cull to change cull state
Manually changing cull state can cause later GL_Cull calls to not change
the cull state.
2014-10-29 01:32:50 -05:00
Zack Middleton
39cf21bf54 Fix pid file ignoring user set fs_homepath
Create pid file in fs_homepath instead of (always) default homepath.
If not manually set, fs_homepath is set to Sys_DefaultHomePath().
2014-10-29 00:03:49 -05:00
Zack Middleton
3273df14af Add missing EV_USE_ITEM15 cases
Add EV_USE_ITEM15 to cg_event.c and ai_dmq3.c for consistency.
2014-10-29 00:03:49 -05:00
SmileTheory
e488663e31 OpenGL2: Change normal/tangent vertex encoding. 2014-10-28 18:15:13 -07:00
SmileTheory
7e808f92d6 OpenGL2: Speed up tonemap shader. 2014-10-27 06:37:57 -07:00
Pan7
50038a7d26 qcurl_multi_add_handle error check 2014-10-26 17:10:41 +01:00
SmileTheory
3765652778 OpenGL2: Fix corrupt models. 2014-10-23 16:51:10 -07:00
SmileTheory
4f5ebf8349 OpenGL2: Bit of multidraw optimization. 2014-10-16 00:32:20 -07:00
SmileTheory
03ac9649ea Fix a bug in previous commit. 2014-10-15 20:28:26 -07:00
SmileTheory
e34972b110 OpenGL2: Fix missing surfaces with r_mergeMultidraws 2. 2014-10-15 20:00:54 -07:00