Commit Graph

71 Commits

Author SHA1 Message Date
Zack Middleton b943d506bf Fix clients being able to reset their player state and respawn using donedl. 2012-12-15 08:08:46 +00:00
Zack Middleton 50475fc37b Fix server ignoring client move commands if voip data is included. 2012-12-13 23:54:58 +00:00
Zack Middleton a4c61d874d add a missing '\n', remove some unwanted ones
From /dev/humancontroller.
2012-06-18 16:16:57 +00:00
Zack Middleton d9b72dedc1 Require gamename if not supporting legacy protocol. 2011-09-07 19:38:19 +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 4c5e9963e3 Fix compile for USE_VOIP=0 2011-07-16 11:14:20 +00:00
Thilo Schulz 58a5d3d383 Have server send protocol version in challengeResponse so protocol negotiation works. (Where did this one get lost?) 2011-07-15 14:49:51 +00:00
Thilo Schulz f6d6ed4b30 - Revert back to Z_Malloc from Hunk_FreeTempMemory introduced in r2077 as Hunk_FreeTempMemory must be freed in LIFO order (#5079)
- Introduce SV_ClientFree() to prevent memory leaks r2077 was supposed to fix
2011-07-15 14:44:06 +00:00
Thilo Schulz d827447da8 - Forgot to mention: last rev (2077) bumped default protocol version to 70
- Fix queued packet rate control
2011-07-13 18:37:26 +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 e52a492f61 - Greatly improve UDP downloading speed for clients
- Add download rate control cvar sv_dlRate
- Don't send snapshots to downloading clients
2011-07-12 11:01:20 +00:00
Thilo Schulz 74e538ffcf - Add better protection against DoSing connecting users from connecting
- Have Com_sprintf return string length
- add STR_LEN macro for static strings
2011-07-07 16:07:58 +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 c95bd0a684 Remove newlines from Com_Error message format strings, patch by DevHC 2011-05-12 14:02:48 +00:00
Thilo Schulz a9696d3558 Refactoring patch by DevHC 2011-05-11 14:21:27 +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 fef4d12d68 Refactoring patch by DevHC 2011-03-05 19:20:37 +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 ba19fe1152 Still not compiling when STANDALONE is set 2011-02-08 20:24:41 +00:00
Thilo Schulz 7efcc91265 fix compiling error when in standalone mode 2011-02-08 20:21:37 +00:00
Thilo Schulz ecbe1ab9fd Thanks Simon McVittie for fixing the bug regression in https://bugzilla.icculus.org/show_bug.cgi?id=4629 2011-02-04 15:11:57 +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 de0e3cba34 Fix hanging client when map_restart executed on the server while client is still loading the map 2011-01-27 16:40:15 +00:00
Zachary Slater df758ba6c2 Bugzilla #4629
commands sent to client when disconnecte
2010-10-25 06:43:55 +00:00
Thilo Schulz 186f30a74f Fix netcode inconsistency, thanks to /dev/humancontroller for the patch, see http://bugzilla.icculus.org/show_bug.cgi?id=4060 2009-10-12 17:17:15 +00:00
Thilo Schulz 9b7543a905 Fix circumventing sv_maxping restriction, thanks to Amanieu for reporting. http://bugzilla.icculus.org/show_bug.cgi?id=3423 2009-10-08 20:03:25 +00:00
Tim Angus 5c62c95c64 * Fix incorrect comment 2009-10-05 22:07:01 +00:00
Ryan C. Gordon 8d0f212521 When dropping bots, don't move to CS_ZOMBIE. Go straight to CS_FREE.
They aren't a real network connection, so you don't want to waste time before
 opening the slot for humans.

  Fixes Bugzilla #4243.
2009-09-15 01:11:09 +00:00
Thilo Schulz 18cc7c1ed3 Make servers echo challenge codes from client getchallenge commands 2009-06-01 05:28:47 +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
Thilo Schulz 50ca55702f - Introduce new NET_CompareBaseAdrMask for easy comparison of ip address ranges
- Overhaul of the new banning functions:
  * basic check for redundant bans/exceptions
  * introduction of sv_banFile to make it possible to configure the file where to read bans and exceptions from
  * bans can now be deleted by giving address ranges, too.
2009-05-24 16:58:08 +00:00
Ludwig Nussel bbd9f02d08 mark functions static (#4010) 2009-05-08 09:48:45 +00:00
Ludwig Nussel ae612721a3 fix STANDALONE challengeResponse (#4000) 2009-03-02 17:29:51 +00:00
Ludwig Nussel f5aae78481 security fix: prevent command injection via callvote 2009-01-17 23:09:58 +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
Ryan C. Gordon 8ab3f7af8d Changed the protocol for VoIP packets to support legacy clients.
Previously, a legacy client wouldn't get a VoIP packet, but if they did,
 they'd panic and disconnect. Now they ignore them and continue on. This also
 gives us the framework to add other features legacy clients can ignore.

Oh, this also has the benefit of allowing us to store incoming VoIP for
 playback in recorded demos. They'll play the chatter on VoIP clients, and
 be ignored on legacy ones. Huge win.
2008-06-03 02:32:52 +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 12326a9eac Initial patch for in-game VoIP support! 2008-06-01 07:51:23 +00:00
Thilo Schulz 563eb9443b One minor comment fix 2008-04-12 17:14:53 +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 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 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
Tim Angus 672cfbf16f * Merge unified-sdl to trunk
* Bump Q3_VERSION to 1.35
2007-09-05 18:17:46 +00:00
Tony J. White = da75e9fda8 * (bug 3027) don't trust the "ip" value in the userinfo string since a client
could set this.  disconnect (or disallow connection for) a client that
  has a userinfo string that's too full for "ip" to be added properly.
  (Richard Stanway)
2007-02-14 23:14:25 +00:00