Commit graph

3137 commits

Author SHA1 Message Date
James Canete
213b15a9db Merge pull request #310 from em92/sceenlooping-bugfix
ignore window resize event on fullscreen
2017-09-10 10:54:09 -07:00
Eugene Molotov
e0a367451f ignore window resize event on fullscreen 2017-09-10 14:31:51 +05:00
Zack Middleton
5f743bdb22 Disable DPI scaling on Windows
Windows DPI scaling prevents using full monitor resolution in
fullscreen mode.
2017-09-07 21:17:44 -05:00
Zack Middleton
aeaecb4ae5 Add Windows application manifest
- Use common controls 6 so error dialogs use correct visuals on
Windows XP or later!
- Specify running as invoker so Windows doesn't guess if it should
prompt for admin permission on Vista or later.
- Specify compatible with Vista through Windows 10. Tells Windows
not to emulate Vista behavior, not sure if it affects anything.

Makefile automatically runs windres when manifest changes.
2017-09-07 21:04:52 -05:00
Zack Middleton
6f0736ce9a Fix loading renderer DLLs on Windows x86
After 'Fix floating point precision loss in renderer', Windows x86
client won't load the renderer DLLs. The problem is a 64 bit modulus.
I couldn't find any reports of this online. However, client with
built-in renderer worked with the 64 bit modulus.

Only tested with mingw-w64.
2017-09-07 20:42:31 -05:00
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
Zack Middleton
8192f66b39 Don't draw crosshair 0 in Team Arena setup menu
Don't draw crosshair 0 in Team Arena setup menu. It isn't drawn
in CGame. Wrap cg_drawCrosshair in missionpack menu like CGame
instead of treating as index 0 which is no longer drawn.
2017-09-02 18:19:08 -05:00
Zack Middleton
e152761c28 Fix team chat box for spectators
Make spectators use green background for team chat box when following
players. The team chat messages are from spectators not the team of
the followed player.

Make spectators draw team chat box even when not following a player.
2017-09-02 17:57:26 -05:00
Zack Middleton
5d88c6fdee Limit ui_smallFont/ui_bigFont/cg_noTaunt cvars to missionpack
ui_smallFont and ui_bigFont are for missionpack HUD font size
selection. cg_noTaunt disables missionpack taunt voice chats.
2017-09-02 17:40:16 -05:00
Zack Middleton
2c22ead078 Make map names in q3_ui map select menu be uppercase
Makes map names match on both pages of start server menu.
2017-09-02 17:35:19 -05:00
Zack Middleton
f4d68590c2 Fix going to previous browser source in q3_ui
It wasn't possible to go to previous source from favorites if
sv_master5 cvar wasn't set.
2017-09-02 17:31:04 -05:00
Zack Middleton
c3e64d3806 Make bots only use q3tourney6 crusher to kill their enemy
Only use the crusher for killing the bot's enemy. This doesn't
affect 1v1 very much but prevents the whole team of bots in CTF
from suddenly shooting at the crusher button. Entering the crusher
bounds was basically instant death.
2017-08-28 21:46:58 -05:00
Zack Middleton
ad1d0e616e Make bots use crusher on other q3tourney6 maps
Make bots activate crusher on q3tourney6_ctf and mpq3tourney6.

Check if player is inside the crush bounds instead of below the
crusher. There is a jumppad the goes under it in mpq3tourney6.
2017-08-28 21:46:57 -05:00
Zack Middleton
63e07afae9 Make input events use earliest possible time
SDL doesn't provide exact the exact time that input events happen
so use the earliest possible time that an event could happen.

This make sub-frame input actions such as walking take affect
immediately instead of in the next frame.

Based on patch by Alexander "wareya" Nadeau.
2017-08-21 22:43:33 -05:00
Zack Middleton
5993c63c4e Removing input functions from sys_local.h for last commit
It helps to actually save files before making commits.
2017-08-21 22:27:09 -05:00
Zack Middleton
ead54782d0 Improve client input responsiveness
Move sampling input to the other side of framerate limiter.

Thanks to Alexander "wareya" Nadeau and Juraj "youurayy" Vitko for
pointing this out.
2017-08-21 21:40:54 -05:00
Zack Middleton
34d0b78754 Improve keys using international key layouts
Always map number row to number keys for AZERTY.
Map Unicode character keys to world keys using scan code.

Based on patches by @mickael9.
2017-08-21 20:21:18 -05:00
Zack Middleton
be1c71d363 Combine mouse movement events in event queue
Fixes 'Com_QueueEvent: overflow' spam after hitch / map load.

Based on patch by @ec-.
2017-08-21 20:12:26 -05:00
Zack Middleton
e793c0c37c Fix crash when pmove_msec is 0
When pmove_fixed is set to 1, setting pmove_msec to 0 would crash.
2017-08-19 01:42:38 -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
9736e7ff91 Fix compiling Cmd_CallTeamVote_f 2017-08-09 19:19:59 -05:00
Zack Middleton
3f267728c3 Remove newlines from chat messages in Game VM
This has no affect due to ioquake3 engine already removing command
separators (which includes newlines) in Cmd_Args_Sanitize().
2017-08-09 18:41:26 -05:00
Zack Middleton
f0b74a27c9 Check for all command separators in callTeamVote
Make callTeamVote check for all command separators like in callVote.
It's not exploitable as the only vote option (leader) always uses an
integer argument.

Also the ioquake3 engine remove command separators from client game
commands in Cmd_Args_Sanitize().
2017-08-09 18:37:18 -05:00
Zack Middleton
0bce5463f7 Add spawnflags to QUAKED for trigger_multiple 2017-08-09 17:47:33 -05:00
SmileTheory
9d1c6748f5 OpenGL2: Force VAO usage on OpenGL 3.0+ 2017-08-08 20:20:11 -07:00
SmileTheory
3f415abe61 OpenGL2: Use extension functions with OpenGL versions before 3.0. 2017-08-07 18:00:00 -07:00
Zack Middleton
00a5339b27 Update arch in misc/setup for ioq3 changing from i386 to x86 2017-08-07 05:52:13 -05:00
SmileTheory
2955f8dadb Reject OpenGL contexts w/ software renderer when core context requested. 2017-08-03 14:20:33 -07:00
Zack Middleton
59b1262b82 Fix floating point precision loss in renderer [part 2]
Fix floatTime using float precision instead of double using GCC.
Fix R_BindAnimatedImage to be in sync with function table.
Fix vertexDeform bulge, vertexDeform normals, noise wave function
at high level time.

Revert unnecessary float -> double conversions.
2017-08-03 00:14:22 -05:00
Zack Middleton
30fdd88c9f Fix floating point precision loss in renderer [part 1]
Patch for https://bugzilla.icculus.org/show_bug.cgi?id=5931 by
Eugene C. from 2013 plus recent fix for tcMod rotate.

I merged the changes into the OpenGL2 renderer though the fix for
tcMod turb doesn't translate.
2017-08-02 23:44:44 -05:00
Tobias Kuehnhammer
9c4c363ccc Fix friction in AAS_ClientMovementPrediction
Ground and water friction were reversed.
2017-08-02 15:05:46 -05:00
Zack Middleton
d2b1d124d4 Fix/improve buffer overflow in MSG_ReadBits/MSG_WriteBits
Prevent reading past end of message in MSG_ReadBits. If read past
end of msg->data buffer (16348 bytes) the engine could SEGFAULT.
Make MSG_WriteBits use an exact buffer overflow check instead of
possibly failing with a few bytes left.
2017-08-02 14:55:22 -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
Zack Middleton
c05fbe554e Make warmup in Team Deathmatch wait for players to join both teams
Reported by Cyrax.
2017-07-31 15:24:15 -05:00
Zack Middleton
e62941396d Remove unused imgFlag_t value IMGFLAG_SRGB 2017-07-30 15:39:32 -05:00
Zack Middleton
39716745f9 Silence g_util.c warning about set but not read variable
Probably caused by my commit on June 2 2017.

  commit 4006358492
  Fix spawn/freed entity logic (specifically harvester skulls)
2017-07-28 17:36:20 -05:00
Zack Middleton
8ebb600f62 Workaround Travis-CI MinGW builds failing with new cURL 2017-07-28 14:34:17 -05:00
MAN-AT-ARMS
e07ffa715c Update internal curl to 7.54.0 2017-07-28 16:32:22 +01:00
Zack Middleton
6693465336 Don't try to remove non-existant command 'shaderstate'
Remove commands in the order they are added because the different
orders is annoying.
2017-07-27 18:58:46 -05:00
Zack Middleton
fa034c17ec Echo server say/tell/sayto message to console 2017-07-24 20:55:14 -05:00
SmileTheory
356ae10ef6 OpenGL2: Don't use initialized arrays in glsl shaders.
Unsupported in GLSL 1.20 (Mac OS X 10.6)
2017-07-24 16:29:04 -07:00
Zack Middleton
67dace6c20 Escape quotes for sv_dlURL in shell so it doesn't become "http:"
q3ded +set sv_dlURL "http://example.org"

The shell removes the quotes but makes the content be a single argument
for progam args. Quake 3 concatenates all the program args and splits
lines at + or newlines. Then Quake 3 parses them using a tokenizer
that skips unquoted C comments beginning with //. This results in
the cvar being set to "http:".

Escape the quotes so they are passed to the program and the tokenizer
knows not to skip C comments.

    q3ded +set sv_dlURL \"http://example.org\"
2017-07-20 23:24:52 -05: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
Noah Metzger
fa1549d457 Move CON_Init ahead of Com_Init to avoid Windows dedicated server crash 2017-07-15 10:16:13 +01:00
Zack Middleton
5f2e4a03c5 Add score bonus for defending the flag carrier in 1 Flag CTF
Set flag_pw to neutral flag instead of using CTF value for red or
blue flag so that flag carrier is detected correctly.
2017-07-14 19:06:43 -05:00
Zack Middleton
13831f9569 Restore not giving defense score bonus to flag carrier
The Team Arena code for giving defense bonus for fragging player
who recently damaged a skull carrier unintentionally applied to
the flag carrier.

The skull carrier case would of been handled by the flag carrier
block above it. However, Harvest mode doesn't call
Team_CheckHurtCarrier() so the skull carrier defense bonus does
not work.

This restores the pre-Team Arena behavior of not giving defense
score bonus to flag carrier.
2017-07-14 19:06:43 -05:00
Zack Middleton
c8db6c55e5 Fix score bonus for defending the flag carrier in CTF
Fix copy-paste error in the original Quake 3 code. The wrong values
are used for v1 and v2. v2 was previously set to distance of attacker
to flag base; which should be handled already.

The game now gives defense score bonus to player when they frag an
enemy near their team's flag carrier while the player is more than
1000 units from the flag carrier.

This may also fix not giving defense bonus when near carrier due to
checking if carrier and enemy (instead of attacker) are in PVS.

Found by @Razish.
2017-07-14 19:06:43 -05:00
SmileTheory
786f6fc525 whoops, left a bit of debugging enabled 2017-07-14 16:26:41 -07:00
SmileTheory
6f1712dafe OpenGL2: "Fix" cg_shadows 4. 2017-07-14 16:15:02 -07:00
SmileTheory
6a77f4e363 OpenGL2: Don't do MSAA resolve/shadow mask/SSAO on shadow views. 2017-07-14 15:42:41 -07:00