Commit Graph

189 Commits

Author SHA1 Message Date
Thilo Schulz 404fe4e6e0 Don't search system directories for renderer lib 2011-08-01 09:33:48 +00:00
Thilo Schulz 40dfcee06e Modular rendering system. Patch by use.less01
This might break MSVC builds. I'll take care of it later
2011-08-01 01:19:55 +00:00
Thilo Schulz ba385fa43c - Switch master server protocol to dpmaster for better game separation. Based partly on patch by Zack Middleton
- Get rid of ugly cvars sv_heartbeat and cl_gamename and replace with single com_gamename
- Remove sv_flatline. Flatlines are ignored by dpmaster and are considered to be insecure because flatlines can be udp-spoofed.
2011-07-29 13:46:50 +00:00
Thilo Schulz 23f6fd1633 Bug 5094 - Code cleanup, patch by Zack Middleton and DevHC. Fixes unused-but-set gcc warnings 2011-07-29 12:27:00 +00:00
Thilo Schulz 2349148cf1 - Apply parts of Ben Millwood's target bitfield patch (#3787)
- Fix Ryan's FIXME and have voip packet buffer on the server dynamically allocated via Z_Malloc and store pointers in a circular buffer
- Improve voip target parsing on top of Ben Millwood's patch
- Add new "spatial" target where speaker is spatialized in 3d space and can be heard by all clients in hearing range (s_alMaxDistance)
  (#4467)
- Decrease voip sound lengths from 240ms to 80ms per voip packet to mitigate udp packet loss and decrease latency
- Protocol version incremented to 71
2011-07-27 15:47:29 +00:00
Thilo Schulz 9dc32d55e2 Bug 4812 - GCC __attribute__ annotations for printf, non-returning functions etc., patch by linux@youmustbejoking.demon.co.uk and Zack Middleton 2011-07-18 14:56:57 +00:00
Thilo Schulz ac30d86db0 - Improve snapshot rate and data rate control
- Make server send packet fragments and queued packets when server is idle
- Voip protocol detection is tied to com_protocol making past-end-of-message reading unncessary
- Use Hunk_AllocateTempMemory() for buffering VOIP packets and fix buffering scheme that ryan hates so much
- Disable packet scrambling for new protocol as it is useless now
- Get rid of the old packet scrambling functions predating latest point release
- Use Hunk_AllocateTempMemory() for netchan packet queue to fix memory leak when client gets disconnected with packets in the queue
- Use Hunk_AllocateTempMemory() for download blocks to fix memory leak when client gets disconnected with download blocks in the queue
- Fix SV_RateMsec to account for udp/udp6 packet lengths
2011-07-13 17:11:30 +00:00
Thilo Schulz e06c117e9e - Implement dual protocol support (#4962)
- Fix several UDP spoofing security issues
2011-07-12 11:59:48 +00:00
Thilo Schulz 88f1fc7500 Fix ipv6 server query 2011-06-25 00:17:44 +00:00
Thilo Schulz d57ba6a57b - Automatically reset fs_game to "" if it was supplied by the user and is equal to com_basegame
- Fix problem where users could change values of CVAR_INIT variables after the call to Cvar_Get() via Com_StartupVariable()
- Move sound shutdown after client shutdown so VMs don't hold invalid sound handles in memory
2011-06-22 23:00:36 +00:00
Thilo Schulz df1687c5c7 Fix unnoticed bug in game_restart 2011-06-21 11:29:31 +00:00
Thilo Schulz dee3724a13 - Improve game_restart:
* differing screen resolutions and network settings are now honoured when changing fs_game
  * Fix hunk memory leak on game_restart
  * Move cls.state and cls.servername to clc so connection state is fully preserved over game_restart
  * Revert back to previous fs_game after disconnecting from a server that triggered a game_restart
  * Fix error dialog popping up after every game_restart if an error happened previously (reported by Ensiform)
- Fixed that not all commands added by CL_Init() would be removed by CL_Shutdown()
2011-06-21 11:18:35 +00:00
Thilo Schulz a5f31084d4 - Fix memory leak in DMA sound after S_Shutdown()
- Make codec load use temp hunk memory instead of zone mem
- Fix sound issues with direct sound and game_restart (#4526)
2011-06-17 23:29:19 +00:00
Thilo Schulz b509d770a7 - Remove Q_strrchr(), replace with standard, portable strrchr()
- Add strrchr() to bg_lib.c, patch by DevHC
2011-05-15 14:08:03 +00:00
Thilo Schulz 86c41d39da Fix sending reliable commands before being connected, patch by Eugene C. (#4971) 2011-05-02 16:03:35 +00:00
Thilo Schulz d34c6b7e0b Revert protocol 69 pending further discussion (#4962) 2011-04-27 20:17:45 +00:00
Thilo Schulz a5580d8974 - Harden the client and server protocol against UDP spoofing attacks. This will defend ioquake3 against http://aluigi.altervista.org/papers/q3noclient.txt (#3041)
- Retains full compatibility to the old but unsecure protocol between clients and servers
- Harden the connection process against DoS attacks, possibly connected to UDP spoofing
2011-04-27 16:03:35 +00:00
Thilo Schulz 9541fca878 Add better support for analog joysticks, patch by use.less01 2011-04-19 13:26:15 +00:00
Thilo Schulz 0a6f873999 Add g_humansplayers (found by server) and g_needpass (cvar) to serverinfo (#4702) 2011-03-07 23:12:16 +00:00
Thilo Schulz c0cca7a0a8 - Fix potential out-of-bounds read in files.c, fix by using new FS_IsExt
- Add capability to load demos with com_protocol suffix, partially applied patches from Simon McVittie
- Fix demo loading if protocol number has more digits than 2
- Minor refactoring, replace all occurances of suffix "dm_" with global macro DEMOEXT
2011-03-07 22:08:48 +00:00
Thilo Schulz 0387b8002e Add cvar "protocol" so user can change protocol version on command line, for standalone games. Most of the patch by Simon McVittie with a few minor modifications by myself 2011-03-05 19:10:23 +00:00
Thilo Schulz 8bb9a261bd Auto complete demos on not in pk3s while in pure servers. Patch by Zack Middleton (#4794) 2011-02-11 14:30:55 +00:00
Thilo Schulz 614f315ce8 Fix console tab autocomplete for exec and condump on pure servers, patch by Zack Middleton 2011-02-10 19:58:20 +00:00
Thilo Schulz a56e448850 Add minimize command (#4531) 2011-02-10 19:21:13 +00:00
Thilo Schulz 44fb8f49b6 Fix adding multiple entries for same server when using globalservers several times, patch by Tequila 2011-02-06 17:59:23 +00:00
Tim Angus c61ad8a074 * Fix fp literals 2011-02-04 17:22:42 +00:00
Thilo Schulz 31d99e2c4e Fix division by zero, reported by Simon McVittie 2011-02-04 17:16:53 +00:00
Thilo Schulz 67a8b273c2 - Add cvars cl_gamename, sv_heartbeat, sv_flatline so standalone games can customise their messages to the master server 2011-02-04 13:25:51 +00:00
Thilo Schulz 3148416c04 - Change runtime standalone detection:
* com_standalone now read-only
  * add new cvars com_basegame, com_homepath
  * standalone now automatically detected when com_basegame is set to something different than baseq3 and no id pak pk3s are found
  * This fixes https://bugzilla.icculus.org/show_bug.cgi?id=4699
- Replace a few hardcoded string literals with macros
- Add checks for Team Arena PK3s to FS_CheckPak0()
2011-02-04 12:04:56 +00:00
Thilo Schulz cd3e202fca - Add parameter checking to CL_*Ping* functions.
- Remove unused CL_UpdateServerInfo function
2011-01-27 17:07:07 +00:00
Thilo Schulz 5c0ae99642 Make number of supported master servers tunable via define 2011-01-25 02:04:25 +00:00
Ludwig Nussel 34d616dbef enable (dummy) cdkey calls in standalone mode to prevents mods from crashing 2010-02-28 08:58:03 +00:00
Tim Angus 005f870ebe * Sys_Dialog for more user friendly error reporting
* (bug #3932) Recovery from bad video settings
2010-02-15 16:20:33 +00:00
Ludwig Nussel 6f9b34ef75 avoid setting cvars by name each frame 2010-01-06 13:47:41 +00:00
Ludwig Nussel 42b8b8ecec make reason for voip disable more visible 2010-01-06 13:47:35 +00:00
Ludwig Nussel 6ebc650542 set default rate to broadband 2010-01-06 13:47:32 +00:00
Tim Angus 3b63c54a24 * Fix demo playback being broken, not entirely sure by what or when 2009-11-11 10:51:33 +00:00
Thilo Schulz e8ae8f5d3a Remove leftover stub 2009-11-10 00:25:48 +00:00
Thilo Schulz 258429efe7 - Add unset command for cvars created by the user
- Fix crash bug when maximum number of cvars has been reached
- Fix cvar_restart
- Add possibility to cleanly switch mods ingame (#2819)
2009-11-09 22:41:42 +00:00
Thilo Schulz 018de1dd2e Added TTimo's QuakeLive-style mouse acceleration, thanks Gabriel Schnoering and TTimo for the patch. (#3693) 2009-11-02 16:17:10 +00:00
Thilo Schulz fd57c987c4 Fix infinite loop in case an invalid pk3 file has been downloaded from the server. Thanks tjw for reporting (#3074) 2009-10-19 22:36:17 +00:00
Thilo Schulz d86dd71327 Fix environment variable handling for Linux, make setenv command added before parsing of configuration files. (https://bugzilla.icculus.org/show_bug.cgi?id=3626) 2009-10-12 16:03:18 +00:00
Thilo Schulz 387dc9d6ff Don't need a call to va() for this 2009-10-12 03:21:02 +00:00
Thilo Schulz 691da05b74 Whoops.. don't make it overwrite cmds in case of recursive error. 2009-10-11 18:34:15 +00:00
Thilo Schulz fee5a4a157 Fix recursive error for disconnect after reliable client command overflow. Thanks to /dev/humancontroller for reporting. https://bugzilla.icculus.org/show_bug.cgi?id=3616 2009-10-11 18:31:00 +00:00
Tim Angus 64a0a078d2 * Fix warning in cl_main.c
* Fix bug #4026 (SDL dx backend doesn't work on some machines)
2009-09-14 12:34:31 +00:00
Ryan C. Gordon 2bd4c89203 Better handling of "voip" console command.
Prints usage info and current gain values, and catches a case where we
 report an error where no error exists.

  Fixes Bugzilla #4018.
2009-09-14 01:37:59 +00:00
Zachary Slater d34e91ef68 More 3966 business:
http://bugzilla.icculus.org/show_bug.cgi?id=3966
I'm hopeful that the server browser will surrender.
2009-07-07 22:13:06 +00:00
Zachary Slater 20c374e87b Fix for bad ping times, see bug 3966 but note that this patch is different, got a fresh one from
Amanieu in irc.
2009-07-04 19:43:13 +00:00
Thilo Schulz 02195ea8bd Make client send a random challenge number in getchallenge requests 2009-06-01 05:29:28 +00:00
Thilo Schulz 4e8a181073 I'll retain the new way seeding the random number generator.. these calls are therefore redundant 2009-05-31 20:30:37 +00:00
Thilo Schulz e4d0c14f70 Revert changes of rand() to random() as random() was redefined in quake3. 2009-05-31 20:24:10 +00:00
Thilo Schulz b40f1507ea - Introduce seeding of the random number generator at startup
- Replaced all engine-side occurances of rand() with random()
2009-05-31 19:48:28 +00:00
Tim Angus 130c0c6575 * Move command argument completion from being hard coded to being associated
with the individual commands to be completed
2008-09-16 21:05:22 +00:00
Tim Angus 47ee177430 * Supply specific identifier to the master server (Mathieu Olivier) 2008-09-15 20:24:04 +00:00
Tim Angus b2d87c4b2a * Add Com_HexStrToInt
* Fixed some whacky indentation in q_shared.c
* Allow single character keys e.g. 'c' to be used in cl_consoleKeys in addition
  to ASCII characters
* Experimental code to ignore dead keys
2008-09-05 23:38:35 +00:00
Thilo Schulz 9dd887b2ea - Add scope id to ipv6 addresses.
- Clean up a few other ipv6 issues like removing the seemingly unnecessary MacOSX workaround.
- Bring ipv6 master server up to speed for dpmaster

Thanks go out to Mathieu Olivier for this work.
2008-08-31 19:54:29 +00:00
Tim Angus c0328ab4f6 * Revert 'Handle dead keys more gracefully by taking a "best guess" rather than
ignoring completely' from r1459; it can't ever work acceptably, especially on
  azerty/qwertz layouts
* Make the ordering of the output from in_keyboardDebug more sensible
* Add cl_consoleKeys cvar, a space delimited list of key names or characters
  that toggle the console
2008-08-28 22:05:34 +00:00
Tim Angus d13269c5bb * Restrict OpenAL capture support test hack to OS X, where it is required; this
fixes a crash on exit with Windows when using OpenAL
2008-08-03 19:31:42 +00:00
Tim Angus d84d418086 * Remove cl_platformSensitivity as it predates the move to SDL everywhere 2008-07-12 13:31:31 +00:00
Tim Angus 37d664d4b2 * Rename voip cvar to cl_voip
* s/#if USE_VOIP/#ifdef USE_VOIP/
* Add generalised runtime cvar range checking, currently on [sv|cl]_voip,
  dedicated and a bunch of r_ variables
2008-07-07 22:31:39 +00:00
Tim Angus 391bb74c44 * Don't start UI when starting client binary with +set dedicated 1 2008-07-06 15:47:15 +00:00
Tim Angus 9d469692f3 * Fix killserver command for client binary based dedicated server 2008-07-06 10:55:19 +00:00
Ryan C. Gordon 1e21a3e258 VOIP: Added cvar cl_voipCaptureMult to boost gain on recorded bits. 2008-07-05 04:38:16 +00:00
Ryan C. Gordon f8d6828f15 VoIP: Added cheapie VoIP meter. 2008-06-25 05:50:44 +00:00
Ryan C. Gordon a7b854d65f VoIP: Save own voice when recording a demo.
We fake a server packet and write it directly to the demo file at the point
 where we'd transmit to the server. This is a little nasty, but it seems to
 be the most reasonable solution.
2008-06-08 08:25:25 +00:00
Ryan C. Gordon 28c48a8cf9 VoIP: Don't lose gain for good if using VAD on disconnect.
This temporarily disables VAD so the system can clean up recording state.
2008-06-08 08:24:38 +00:00
Ryan C. Gordon be9ae48039 VoIP: tweaked VAD code.
Also added cl_voipVADThreshold cvar...if the power of a set of Speex frames
 doesn't exceed this value, it isn't transmitted.
2008-06-08 07:29:25 +00:00
Ryan C. Gordon d4ee08b985 VoIP: attempt at changing voipPower calc and using it for VAD.
The Speex VAD sort of sucks, honestly, or I'm not using it right. Now
 trying this algorithm, after denoising:

    http://lists.xiph.org/pipermail/speex-dev/2006-March/004269.html

And I'll play around to find the threshold for considering a set of frames
 to be "voice" from there.

Also worth noting: we consider the power of the set of frames as a whole, so
 you need to sustain power for 0.25 seconds at a time, or it's not "voice."
2008-06-08 07:09:10 +00:00
Ryan C. Gordon fec2cc2f05 VoIP: initial shot at voice activation. 2008-06-07 14:40:59 +00:00
Ryan C. Gordon c50799fcf7 VoIP: Initial work on adding Speex preprocessor. 2008-06-07 14:39:49 +00:00
Ryan C. Gordon 26c706df15 VoIP: Don't hardcode Speex sample rate. 2008-06-07 14:38:46 +00:00
Ryan C. Gordon 020704d2ff VoIP: functionality to adjust incoming audio gain, per-user. 2008-06-04 21:50:00 +00:00
Ryan C. Gordon cc18323a99 VoIP: client can now specify targets for voice transmission. 2008-06-04 21:49:15 +00:00
Ryan C. Gordon 45c18e29b8 VoIP: voip cvar should be 1 by default. 2008-06-03 06:06:17 +00:00
Ryan C. Gordon e0ebde0b27 Don't allow client to capture audio if playing back a demo. 2008-06-03 02:28:03 +00:00
Ryan C. Gordon 0403ca2260 More VoIP work: treat voip/sv_voip cvars as protocol version numbers. 2008-06-02 19:52:13 +00:00
Ryan C. Gordon b5eaa94d03 Changed a few VoIP cvars to be latched.
It either doesn't make sense to change these mid-game, or doing so won't work.
2008-06-01 18:10:33 +00:00
Ryan C. Gordon 9b1984647a Forbid setting voip cvar if network data rate is too low.
This prevents "Connection Interrupted" packets as VoIP data is incoming.
2008-06-01 18:08:03 +00:00
Ryan C. Gordon a948f7cf69 Client shouldn't try to capture audio data if voip cvar is disabled. 2008-06-01 17:43:58 +00:00
Ryan C. Gordon 12326a9eac Initial patch for in-game VoIP support! 2008-06-01 07:51:23 +00:00
Ludwig Nussel 0ee3960225 mumble link support
The coordinate calculation was adopted from Warsow's mumble patch.
2008-05-30 17:19:31 +00:00
Thilo Schulz 10ed996784 - replace a few constant values with GL macros in tr_cmds.c
- tidy up top of tr_types.h a bit, change flags to hex representation
- make ROM cvar enforcing really work
- remove cg_stereoSeparation from cgame as it is obsolete.
- Add CG_DrawCrosshair3D so people see crosshair correctly when stereoseparation is enabled
2008-05-01 14:56:57 +00:00
Thilo Schulz cebdb640f3 remove commented code 2008-04-12 20:05:33 +00:00
Thilo Schulz c281b6aca0 Another change to server parsing as a server reporting in from 69.79.84.0/24 with the master server could screw up the server list in ioquake3 clients. 2008-04-12 19:53:16 +00:00
Tim Angus 845de6a960 * Fix some recently introduced warnings
* Fix referenced pk3 list including excessive number of spaces
2008-04-12 18:58:06 +00:00
Thilo Schulz f8d8a1c2f7 - fix a potential file descriptor leak in server side of pak downloading
- add new functions for banning clients from server, in engine part. This will also make it possible to ban ipv6 addresses in old mods.
2008-04-12 17:00:18 +00:00
Thilo Schulz 9a8cc99a93 - Revamp in-game server browser: you can now scan for games on multiple master servers, while retaining compatibility with old QVMs.
- Make Master server reporting/server queries ipv6 capable.
2008-04-11 18:39:03 +00:00
Thilo Schulz 78a82bcba2 Add com_standalone cvar for at-runtime handling of mods that do not require the original quake3 game data. 2008-04-10 15:37:25 +00:00
Thilo Schulz b3822d03e2 Include #ifdef to make it easier to create a stand-alone binary. 2008-04-09 23:43:30 +00:00
Thilo Schulz eb3b59308b Add Multicast capabilities for LAN server scanning. 2008-04-09 14:37:42 +00:00
Thilo Schulz 5d63a38ad9 Basic IPv6 support. Some inspiration from the patches by Lubos Dolezel and JF Tremblay at https://bugzilla.icculus.org/show_bug.cgi?id=2355. 2008-04-04 23:22:22 +00:00
Thilo Schulz fe1e02e457 A more clean solution to this bug. Stop the renderer when the UI VM is not running, as no commands get issued in that case anyways. 2008-03-27 03:18:32 +00:00
Thilo Schulz d79a5487bc Fix flashing connect screen, see https://bugzilla.icculus.org/show_bug.cgi?id=3425. 2008-03-27 03:00:49 +00:00
Thilo Schulz 11d9608fca Remove obsolete code for obfuscation. 2008-03-25 21:59:31 +00:00
Tim Angus 59c231c6c6 * (bug 3412) %s expansion security patch (DevHC) 2008-01-22 23:44:10 +00:00
Thilo Schulz 08ee31604a Remove small redundancy 2007-12-27 11:45:20 +00:00
Tim Angus b62950ca6e * Fix bug where an extraneous render command can cause a crash when
recording video
* Make S_CodecUtilClose NULL the snd_stream_t pointer
* Fix indentation in runtime SDL check code
2007-11-18 01:06:46 +00:00
Ludwig Nussel f0215128af make master server used by client configurable (cl_master)
patch by Erik Kloppenburg
2007-11-14 19:04:12 +00:00
Tim Angus 5692e30fa9 * Fix bug that prevented key up events getting to cgame/ui when not in game
* Use Key_[GS]etCatcher everywhere to set keycatcher
* Clear all key states when the catcher changes
2007-10-02 14:14:45 +00:00