Commit graph

160 commits

Author SHA1 Message Date
Thilo Schulz
f725b23c4f Fix floating point imprecision causing glitches in snapshot sending 2011-01-29 22:01:55 +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
Thilo Schulz
b179fb087c Make sure status reply always has at least one space between address and qport, important for ipv6 addresses. 2011-01-25 15:16:50 +00:00
Thilo Schulz
5c0ae99642 Make number of supported master servers tunable via define 2011-01-25 02:04:25 +00:00
Thilo Schulz
bf07014b1d Make this change so standalone developers will know to change the HEARTBEAT game string for their versions, too. 2011-01-24 18:09:20 +00:00
Thilo Schulz
8243a77c0e Revert changes because dpmaster doesn't work that way. 2011-01-24 01:24:07 +00:00
Thilo Schulz
7861cde4a2 Make it use the correct game name in getserversExt queries 2011-01-24 00:21:33 +00:00
Zachary Slater
df758ba6c2 Bugzilla #4629
commands sent to client when disconnecte
2010-10-25 06:43:55 +00:00
Thilo Schulz
5fe2a61910 Second batch of bug fixes reported and patched by Zack "ZTurtleMan" Middleton:
#4740
#4741
#4742
#4743
#4744
2010-08-29 18:08:29 +00:00
Ludwig Nussel
1434fd1845 fix typo 2010-06-21 07:11:52 +00:00
Tim Angus
fc05ba7f46 * Fix some compiler warnings 2010-01-03 22:37:14 +00:00
Tim Angus
4056c90358 * Rate limit getstatus and rcon connectionless requests 2010-01-03 22:12:20 +00:00
Tim Angus
37598962f5 * Actually that can be more precise... 2009-10-16 19:21:31 +00:00
Tim Angus
b539a87e72 * (bug #4232) Avoid "cl.snap.serverTime < cl.oldFrameServerTime" for slow
loading clients combined with short g_warmups
2009-10-15 23:39:19 +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
Thilo Schulz
5fec4498f1 Add received rcon command string to server log, see https://bugzilla.icculus.org/show_bug.cgi?id=3748 2009-09-17 16:54:01 +00:00
Ryan C. Gordon
d56a093317 Removed more unused variables.
Partially fixes Bugzilla #3782.
2009-09-15 03:19:43 +00:00
Ryan C. Gordon
815026072a Removed unused variables.
CM_LeadArea() has no side effects, so those could go, too.

   Partially fixes Bugzilla #3782.
2009-09-15 02:58:38 +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
Ryan C. Gordon
df13db2b64 Fixed triggering Com_Error() when kicking a large number of bots at once.
Fixes Bugzilla #3418.
2009-09-14 23:12:54 +00:00
Thilo Schulz
948f7a6015 - fix typo in previous commit to net_ip.c
- Make servers send heartbeats to master servers in ipv4 as well as ipv6 if master server has both protocols
2009-06-23 00:59:47 +00:00
Thilo Schulz
18cc7c1ed3 Make servers echo challenge codes from client getchallenge commands 2009-06-01 05:28:47 +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
Thilo Schulz
0693f0c1b3 This could never have worked in the first place. Duh. 2009-05-28 07:52:09 +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
Thilo Schulz
f2d63c1633 More commentary to source code 2009-05-21 20:52:35 +00:00
Ludwig Nussel
10aca2387f whitespace fixes 2009-05-08 09:50:52 +00:00
Ludwig Nussel
eff87e9524 SV_ReplacePendingServerCommands is unused 2009-05-08 09:48:49 +00:00
Ludwig Nussel
bbd9f02d08 mark functions static (#4010) 2009-05-08 09:48:45 +00:00
Ludwig Nussel
f0e24f9a46 msg->oob is actually qboolean (#4010) 2009-05-08 09:48:40 +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
Ludwig Nussel
8536a42dd5 gamename is already a cvar with CVAR_SERVERINFO
do not set gamename to different values in getstatus and getinfo responses
2009-01-11 18:42:50 +00:00
Ludwig Nussel
c754d6fdfb fix strict aliasing issues
Patch by Przemysław Iskra (#3805)
2008-11-03 17:03:54 +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
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
de8131938c * Fix server info string voip setting 2008-07-08 16:23:06 +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
809c361744 Reverted svn revision #1410 to sv_init.c
sv_voip is a protocol version number, not a boolean, so this check is
 reasonable and correct.
2008-07-06 20:07:43 +00:00
Tim Angus
6b572920a9 * Remove silly range check on sv_voip during initialisation
* Changed dedicated binary dedicated cvar to CVAR_INIT and remove runtime check
2008-07-06 01:35:01 +00:00
Tim Angus
7fe9a02d91 * In the dedicated binary, prevent setting dedicated cvar to 0 2008-07-06 01:00:00 +00:00
Tim Angus
2c0861c1ce * (bug 3610) Server sending unnecessary newline with SV_ConSay_F (Tyler Schwend
<TylerSchwend@gmail.com>)
* (bug 3623) COMMAND is mapped to the ALT key (Matthias <Kapffer@macbay.de>)
* (bug 3665) Typo error in FS_FOpenFileByMode function (TsT <tst2006@gmail.com>)
* (bug 3669) Some files left out of Solaris Packages (Vincent Cojot
  <vincent@cojot.name>)
* (bug 3680) server quit messages (Ben Millwood)
* (bug 3682) Maps with >1024 models cause a segfault (misantropia
  <bnoordhuis@gmail.com>)
* (bug 3683) R_FindShader(): negative lightmap indexes cause stray pointers
  (misantropia <bnoordhuis@gmail.com>)
* (bug 3688) q3asm potential segfault fix and other changes (TsT
  <tst2006@gmail.com>)
* (bug 3695) Not allowing to write file with lib extention (.dll/.so/...) (TsT
  <tst2006@gmail.com>)
* (bug 3696) make-macosx-ub.sh outdated by revision 1340; test for Tiger not
   working (Matthias <Kapffer@macbay.de>)
* (bug 3698) #error reported as warning in q3cpp (and no #warning support)
  (Ben Millwood)
* (bug 3703) restoring the valued pre-SDL window behaviour (/dev/humancontroller
  <devhc97@gmail.com>)
2008-07-05 23:50:38 +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
1e4fa5a54c Treat sv_voip cvar as a version number (0 == off, 1 == version 1 protocol).
Don't publish it to server's info string if set to zero.
2008-06-02 19:41:09 +00:00
Ryan C. Gordon
953e9ec287 sv_voip cvar should be latched. 2008-06-02 19:37:05 +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
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
bb47026b5f - Replace vsprintf function in bg_lib.c with vsnprintf implementation started by Patrick Powell.
- Remove all calls to vsprintf in the engine and gamecode and replace them with calls to vsnprintf.
2008-03-25 21:36:09 +00:00
Tony J. White =
4c3b7def84 * send along the reason for disconnection when sending the disconnect
cmd to all clients in SV_FinalMessage()
* on Com_Error(), set the cvar "com_errorCode" with the errorParm_t integer
  value for the error.  This can be used by a mod's ui to an draw error
  dialog specific for the error (e.g. Reconnect button on ERR_SERVERDISCONNECT)
2007-12-31 22:35:22 +00:00
Tim Angus
3f3e1a51a1 * (bug 3420) Don't respect sv_killserver unless a server is actually running
* (bug 3431) USERINFO cvars created in cg_main not getting sent (arQon)
2007-11-23 00:33:13 +00:00
Tony J. White =
e46fe24426 * rewrite of the win32 dedicated console:
1) NET_Sleep() no longer watches for input, Sys_Sleep() added for waiting
     on input.
  2) Added "CtrlHandler" for trapping Ctrl-C and other quit methods not
     handled by signals on windows
  3) Added history support
  4) Added tab completion
  5) Removed automatic cursor/scroll adjustment (too problematic)
  6) Enable mousewheel scrolling
  7) Stop using the InputBuffer for editing

  This seems to work pretty well now, but I jumped the gun on a previous
  commit message by saying you can scroll now without locking up your server.
  That was only true up until the point that a server tried to print to
  the console, at that point it will hang until you release the scroll bar :(
  It may be possible to get around this by using a seperate thread for
  console output, but that's a whole new can of worms.
2007-09-15 02:22:58 +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 =
7d13d6cd3b * (bug 3066) rcon rate-limiting was not compatible with the eventual
integer overflow in Com_Milliseconds() (R1CH)
2007-05-10 01:39:58 +00:00
Tony J. White =
b5bf1280c1 * (bug 3018) Should not reset CVAR_CHEAT cvars when loading cgame/ui if they
are being loaded to play a demo.  This restores the normal
             "timedemo" cvar behaviour.
* (bug 3054) The "demo" command works properly now when connected to
             the local server
2007-04-05 15:26:15 +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
Tony J. White =
046e86a925 * (bug 3014) my revision 935 broke the sending of the kick/clientkick message
since SV_DropClient() tried to set the client's state to CS_ZOMBIE prior 
  to sending the message.
2007-02-01 22:24:45 +00:00
Thilo Schulz
5dc3b35b49 - Fix loads of format string bugs
- Fix locally looping sounds, thanks to Timbo
2007-01-24 21:23:21 +00:00
Ludwig Nussel
8ca8d84591 fix buffer overflow and format string bug in auth server response
processing
2006-12-31 15:36:42 +00:00
Ludwig Nussel
8e82c3d605 - tag more functions with gnu format attribute
- fix format string bugs. still some left
2006-12-30 12:32:54 +00:00
Tony J. White =
189e8b33f3 * (bug 2784) help to prevent reliable command overflow in cases when a slow
client is loading the map on a busy server. Specifically, hold back all
  configstring update commands while the client is CS_PRIMED.  Once the
  client goes from CS_PRIMED to CS_ACTIVE, send the cleint commands for
  updating each of the configstring indexes which were updated while the 
  client was CS_PRIMED.
2006-10-13 19:44:52 +00:00
Tony J. White =
2af23e813d * add cURL support for HTTP/FTP downloading (bug 2661) 2006-09-11 16:41:55 +00:00
Thilo Schulz
bea6fcff13 Correctly handle 0 timescale 2006-08-26 12:43:38 +00:00
Thilo Schulz
5ee7b5ed59 A few more timescale influences added 2006-08-26 02:45:59 +00:00
Thilo Schulz
fb18a4b2e4 - compensate sv_fps for timescale value.
- Add a non-dirty-hack fix for client hanging when unpausing a game.
2006-08-26 01:45:27 +00:00
Thilo Schulz
5e88acf217 Fix 100% CPU usage on idle dedicated servers. 2006-08-18 01:50:51 +00:00
Tim Angus
e41d081710 * qvm files no longer installed by "make copyfiles"
* Loopback clients only get snapshots at the server frame rate now
  (Anonymous <nkylqinhvgcbyl@mailinator.com>)
* JPEG chroma subsampling disabled if the quality value is >= 85
  (Anonymous <nkylqinhvgcbyl@mailinator.com>)
* cl_lanForcePackets. When set to 0 (default is 1) the cl_maxpackets setting
  will be ignored if on a LAN. (Anonymous <nkylqinhvgcbyl@mailinator.com>)
2006-08-13 17:09:05 +00:00
Tim Angus
7d657ba62f * sv_minRate (from R1CH)
* [cl|sv]_packetdelay (from tjw)
2006-06-17 19:19:34 +00:00
Thilo Schulz
6fe78df757 Fixed missing initialization of idPack and missionPack variables which may result in failure to autodownload files from the server even if legitimate. 2006-05-15 19:50:44 +00:00
Thilo Schulz
60293f49ee Fix bug that permits download of arbitrary files from a download enabled server by checking requested file name against the list of loaded pk3 files. See CVE-2006-2082 2006-05-08 19:53:41 +00:00
Thilo Schulz
1847c321f0 - Added SV_Shutdown to Linux signal handler to ensure that clients don't hang when server gets killed, as suggested by Tony J. White
- Added newline to final message sent to clients.
- Added check for whether client is running at all before CL_Shutdown runs through.
2006-05-04 13:59:58 +00:00
Thilo Schulz
2583351211 - Replaced SV_GetPlayerByName with SV_GetPlayerByHandle that supports lookup of client_t structures by playernum, too.
That means the ban and kick commands will now accept the playernum - as seen in the status command - as argument.
2006-05-02 21:20:07 +00:00
Thilo Schulz
7b6fe90aad Fix "Net_CompareAdr: Bad address type" error message when starting a new map with bots. 2006-05-02 17:53:26 +00:00
Tim Angus
d475dfef97 * Yet another tweak to the long server uptime bug fix 2006-04-28 17:31:02 +00:00
Thilo Schulz
70fca10af2 Replaced various "baseq3" strings with the centrally defined BASEGAME macro. 2006-04-26 11:27:12 +00:00
Tim Angus
ef51968654 * Fix to a bug introduced by the fix to the long server uptime bug 2006-04-22 15:57:43 +00:00
Tim Angus
131fb9933f * Fix to bug involving the port value of master server heartbeats (from Thilo
Schulz)
2006-04-14 20:28:28 +00:00
Tim Angus
4ec0c94828 * Displace the '\n's passed to SV_Shutdown 2006-02-28 23:01:23 +00:00
Tim Angus
d5509dcd35 * Fix to a bug where servers with long uptimes (~27 days) would consume 100%
CPU if the running game did not set the nextmap cvar. This patch instead uses
  the mapname server cvar, which is guaranteed to be defined.
2006-02-23 23:10:54 +00:00
Ludwig Nussel
4c242115dc - change long to intptr_t for 64bit windows compatability
- change vmMain arguments back to int. 64bit types are apparently not
  needed there. Only the syscall function needs them.
2006-02-18 19:07:23 +00:00
Ludwig Nussel
e129637b5a 64bit fix: VM_Call return value is a pointer 2006-02-18 19:03:06 +00:00
Tim Angus
c41483634c * General decrufting:
* Removed Q3_STATIC and associated defines
* Removed MAC_STATIC
* Replaced __LCC__ with Q3_VM
* Removed bspc and splines directories
2005-10-29 23:13:09 +00:00
Tim Angus
05e8ab9538 * Added STATUS
* Updated TODO
* Moved ChangeLog to root
* Updated ChangeLog
* s/Foobar/Quake III Arena Source Code/
* Biggest patch EVAR. I wonder how many mail boxes this will fill...
2005-10-29 01:53:09 +00:00
Tim Angus
ffdc69f138 * Deleted code/unix/vm_x86.c - wtf was that about anyway?
* Removed HAVE_VM_NATIVE
* Removed DLL_ONLY
* Replace HAVE_VM_COMPILED with NO_VM_COMPILED -- this means the JIT compiler
  should be enabled on the OS X and VC builds now
* Remove the remainder of the freetype building stuff
2005-10-29 00:23:10 +00:00
Tim Angus
090f4d7266 * Compiler warning fix from ankon 2005-10-28 22:10:39 +00:00
Tim Angus
4c63d1ed40 * Fix to https://bugzilla.icculus.org/show_bug.cgi?id=2454 2005-10-28 21:09:50 +00:00
Tim Angus
3a2ad50406 * Moved various source files from their mod sdk locations to places more
appropriate for open source Q3
* This patch looks bigger than it really is, however it will probably break the
  VC and OS X builds (easy to fix though)
2005-10-26 19:45:21 +00:00
Tim Angus
b9c9f86cd1 * Cap the maximum snaps a client can request at the server framerate rather
than a hard-coded 30 (from misantropia). I'm slightly nervous about this
  since it changes the behaviour versus 1.32b in that a client requesting e.g.
  25 snaps will actually get 20 (default sv_fps) with this patch applied. I'm
  not sure why anyone would want this though -- it may even destablise their
  inter/extrapolation. I'll leave the bug (2422) open for a while and if no one
  complains it can be closed.
2005-10-19 22:25:32 +00:00
Tim Angus
33a48a0336 * Fix to multiple buffer overflow bugs in CL_Rcon_f
* Fix to COM_ParseExt 1 byte overwrite bug
* Fixed some missing calls to trap_FS_FCloseFile
* Fixed q3msgboom and q3infoboom bugs
* Fixed some qboolean type confusion
* Above fixes from http://www.quakesrc.org/forums/viewtopic.php?t=5374
2005-09-19 17:45:29 +00:00