Commit graph

149 commits

Author SHA1 Message Date
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
a447aa82af Fix #if macros for idx64 and id386 2011-06-15 14:10:20 +00:00
Thilo Schulz
03201aff22 - Add MASM assembler files for MSVC x64 projects to support vm_x86 in x64 mode
- Clean up ftol()/snapvector() mess
- Make use of SSE instructions for ftol()/snapvector() if available
- move ftol/snapvector pure assembler to inline assembler, this will add x86_64 and improve support for different calling conventions
- Set FPU control word at program startup to get consistent behaviour on all platforms
2011-06-13 09:56:39 +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
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
3bf8ec2dab (#4925) - com_pipefile to create a named pipe for sending commands from other processes, patch by Chris Schwarz 2011-03-10 01:01:27 +00:00
Thilo Schulz
e5cec15fbf Fix bug where Com_StartupVariable would set CVAR_USER_CREATED on already existing cvars 2011-03-09 22:50:06 +00:00
Thilo Schulz
21668c0616 Fix systeminfo command, fix by DevHC 2011-03-05 19:11:56 +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
34e0a6c6f6 Make NET_Sleep wait 1ms less than requested, then busy-wait the last ms for better timeout precision. 2011-02-23 18:09:17 +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
2d2bdea553 Cleanup STANDALONE 2011-02-08 19:51:43 +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
16c83ae2c5 Server crash can cause recursive call to Com_Error, too 2011-02-02 23:57:22 +00:00
Thilo Schulz
e5dbce839a - Use select() to sleep when idle as opposed to busy waiting.
- Introduce com_busyWait cvar to go back to old behaviour
2011-02-02 16:46:23 +00:00
Thilo Schulz
74be070642 Make sure com_developer global var gets written right after developer has been read from cmd line 2011-01-25 16:18:49 +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
Tim Angus
78df7a1de4 * (bug #4346) Dedicated server uses 100% CPU when stdin is not a TTY
* com_speeds reports misleading values on dedicated server (Guillaume Bougard)
2009-12-24 00:40:39 +00:00
Thilo Schulz
10cdcdb0a1 Forgot this one 2009-11-14 01:59:01 +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
4ba2452f83 Use new Sys_SetEnv here 2009-11-06 10:50:16 +00:00
Tim Angus
639fdb4ed3 * Fix MinGW build (it doesn't have _putenv_s) 2009-10-13 15:58:23 +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
e48b56559d MinGW doesn't have setenv() either, so..... 2009-10-12 16:20:01 +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
Ryan C. Gordon
569edcb04e Minor reworking to check command line cvars before Com_InitZoneMemory().
This lets you set com_zoneMegs from the command line (although still not
 from a config file, but oh well).

  Fixes Bugzilla #2571.
2009-09-14 19:28:59 +00:00
Thilo Schulz
eaaaa6f5fc Replace a few sprintf with Com_sprintf 2009-06-01 00:18:02 +00:00
Thilo Schulz
e0a2100df5 Fix warning in Sys_RandomBytes() usage 2009-05-31 20:31:56 +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
Ludwig Nussel
ec846d23b2 define STRING and XSTRING in q_shared.h (#4054) 2009-05-05 18:19:29 +00:00
Tim Angus
1bd63e59e5 * Remove superfluous comments committed with fix to bug #3999 2009-03-02 22:26:36 +00:00
Ludwig Nussel
35a27638fe initialize qport with random value instead of time (#3999) 2009-03-02 18:08:13 +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
9d0e643425 * Fix to console completion bug introduced by the last fix (from the oops
dept.)
2008-08-30 22:07:50 +00:00
Tim Angus
f1faa1d12a * Collapse common command completion code into one function and fix the
incorrect buffer size parameter to strncpy (from the
  how-the-fuck-did-this-ever-work dept.)
2008-08-27 20:00:34 +00:00
Tim Angus
36a43f2aa1 * Handle dead keys more gracefully by taking a "best guess" rather than ignoring
completely
* When activating or deactivating the mouse flush any pending motion events;
  this should stop the view moving unpredictably in these circumstances
* Add keyname completion to "unbind"
2008-08-25 21:15:25 +00:00
Tim Angus
00e790ce00 * Change win32 client Sys_Sleep so it ONLY sleeps since before it was waking on
more or less any input event; fine for the server, not so much use for the
  client
* In the main loop, don't bother sleeping if it's going to be less than 10ms as
  the methods we're using to sleep at the moment aren't very precise
* Add Sys_PlatformInit for platform specific initialisation
* In win32 Sys_PlatformInit force selection of the DirectX SDL backend in order
  to get better fullscreen mouse input (in conjunction with a patched SDL DLL
  http://bugzilla.libsdl.org/show_bug.cgi?id=265)
2008-08-03 19:42:53 +00:00
Tim Angus
71f8a85e42 * Sign check com_maxfps* variables 2008-07-21 22:16:57 +00:00
Tim Angus
0124371c01 * Use Sys_Sleep to limit FPS, which will save CPU
* Add com_maxfpsUnfocused and com_maxfpsMinimized; self explanatory
* Fix reopening of bug 3703, I hope
2008-07-21 22:02:54 +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
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
49413057ee * Change dedicated cvar to CVAR_LATCH on the dedicated server 2008-07-06 00:31:52 +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
Tim Angus
b2207b250f * (bug 3641) Server is left running following a local disconnect 2008-05-12 10:49:02 +00:00
Thilo Schulz
82e32bdf41 Make forced unloading work in more cases than just server disconnects 2008-04-29 22:49:37 +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
Ludwig Nussel
43ac1eca6a set flag to allow forced unload of a running VM
required to prevent a client from exiting if the server disconnects (bug 3585)
2008-04-06 12:59:35 +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
Tim Angus
e31156e586 * Write q3config_server.cfg for the server, to avoid reseting client variables
after running a dedicated server
2008-02-28 21:39:54 +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
6113cf7a68 * (bug 3454) Fix crash in autocompletion due to incorrect strncpy buffer size 2007-12-03 00:07:56 +00:00
Tim Angus
aa5e852056 * Unconditionally place a '\' at the start of the command buffer when
autocompleting -- you're still all WRONG :p
* Fix bugette where the completee didn't get its case copied from
  the completed token
* Add functionality to autocomplete key names
* Don't build client command completion on the dedicated server
2007-10-12 22:34:45 +00:00
Tim Angus
672cfbf16f * Merge unified-sdl to trunk
* Bump Q3_VERSION to 1.35
2007-09-05 18:17:46 +00:00
Tim Angus
0c99c0c1d2 * Fix a few -pedantic warnings 2007-07-25 21:28:15 +00:00
Tony J. White =
c6249fcc25 * (bug 3019) use the operating system's random number generator if possible
when generating the qkey file
2007-02-16 23:50:37 +00:00
Thilo Schulz
90208be35a - Remove "server crashed" message on server shutdown caused by local client disconnect.
- Stop demo recording on a new gamestate packet so the demo won't end with a new level load.
2006-10-27 12:49:55 +00:00
Thilo Schulz
01d057967f Go back to rev. 874. ATM, there is no good way to make FS_Restart() behave as it was originally described. 2006-08-28 01:48:38 +00:00
Thilo Schulz
39d050b748 More fixes for the FS_Shutdown change. Declare qconsole.log as closed before FS_Shutdown
closes all files.
2006-08-28 01:10:46 +00:00
Thilo Schulz
fbfc886b22 Fix crash when recording to files and the map changes. Was caused by new, correct, behaviour of
FS_Restart() which would close the files before they'd be closed by the client.
2006-08-28 00:44:59 +00:00
Tony J. White =
90b35ec5c8 * Print the SVN version string in Com_Init() 2006-08-25 16:25:51 +00:00
Thilo Schulz
5e88acf217 Fix 100% CPU usage on idle dedicated servers. 2006-08-18 01:50:51 +00:00
Tim Angus
7d657ba62f * sv_minRate (from R1CH)
* [cl|sv]_packetdelay (from tjw)
2006-06-17 19:19:34 +00:00
Thilo Schulz
70fca10af2 Replaced various "baseq3" strings with the centrally defined BASEGAME macro. 2006-04-26 11:27:12 +00:00
Thilo Schulz
e7daf33d8e - botlib logfile now gets stored in the fs_game directory in fs_homepath. (patch from Erik Auerswald)
- Added proper error handling when fopening qconsole.log
- Fixed bug where r_chat.c gets loaded in botlib even when bot_nochat is 1.
2006-04-21 17:04:21 +00:00
Tim Angus
4ec0c94828 * Displace the '\n's passed to SV_Shutdown 2006-02-28 23:01:23 +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
Tim Angus
8a6be4aef4 * Persistent console history 2006-01-24 04:35:19 +00:00
Tim Angus
c3f7915a8b * Overhaul of console autocompletion
- No longer does weird stuff like move the cursor inappropriately
  - Autocomplete works with compound commands
  - Special autocomplete on some commands e.g. \map, \demo
  - Removed various hacks used to counter the original autocomplete code
2006-01-22 01:58:50 +00:00
Tim Angus
7913ec3c4b * Fix a bug with command/cvar autocompletion 2006-01-21 01:35:42 +00:00
Tim Angus
b4898caac4 * Fix to a stupid bug I introduced whilst trying to be clever 2006-01-15 15:30:52 +00:00
Tim Angus
560b02488c * Up the defaults for zone and hunk memory since some mods (UT) have large
memory requirements that will have increased versus 1.32b due to some of the
  alignment fixes
2006-01-05 16:49:59 +00:00
Tim Angus
6e24cfe7d3 * Fix the MinGW and (hopefully) OS X builds
* Remove custom memcpy/memset code
2006-01-04 03:40:49 +00:00
Tim Angus
1704eecc52 * Replaced ALIGN macro with PAD
* Moved ALIGN16 macro from tr_local.h to ALIGN in q_shared.h
2005-12-05 17:32:54 +00:00
Ryan C. Gordon
ff9c89f8fe Better altivec cvar handling. Should fix crashes at startup, or curious
people that toggle it on at runtime on a G3.
2005-12-04 21:40:25 +00:00
Ryan C. Gordon
721b9a7d01 Mac OS X work...lots of little changes that touch a lot of random places.
Still work to be done, but this at least matches the PowerPC Linux status
 now.

MacOS-specific directory (and XCode project) is gone...this now uses SDL,
 OpenAL, and the Unix Makefiles.

--ryan.
2005-11-26 07:46:21 +00:00
Ludwig Nussel
c95d0c29e4 use common macro for alignment 2005-11-13 17:51:21 +00:00
Ludwig Nussel
b2f39d7ddd use system memcpy and memset 2005-11-06 18:22:49 +00:00
Ludwig Nussel
87b12105bc - set umask to 0077 before writing the cdkey, the rest of the world
doesn't need to read it.
2005-11-06 13:45:20 +00:00
Tim Angus
a87185a96f * Centralise architecture defines in q_platform.h 2005-11-05 00:29:40 +00:00
Tim Angus
e4b7a04d5c * Replaced a bunch of inline and __inline with ID_INLINE
* Replaced a bunch of __i386__ with id386
* General tidy up of asm preprocessor decisions
* Removed C_ONLY from the dedicated server build
2005-11-04 22:32:00 +00:00
Ludwig Nussel
e121614406 allocate memory pointer aligned 2005-11-02 20:34:25 +00:00
Tim Angus
c5bdb034f2 * Beginnings of Solaris support from Vincent S. Cojot
* Note this patch also splits USE_SDL into USE_SDL_VIDEO and USE_SDL_AUDIO
2005-10-29 22:05:20 +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
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
f01ed7b3da * Tab completed commands no longer treated like cvars 2005-10-21 19:52:52 +00:00
Tim Angus
f306b2895f * Tiny patch to print values of cvars when tab completing ala ET 2005-10-21 00:09:34 +00:00
Tim Angus
4bc5c29115 * FreeBSD fixes/updates from Andreas Kohn 2005-09-25 22:04:51 +00:00
Tim Angus
2b8395a4d0 * Replaced lots of __linux__ || __FreeBSD__ with __GNUC__
* MinGW port now uses asm versions of SnapVector and ftol
* Improved the handling of mangled symbols in vm_x86.c
2005-09-23 02:59:15 +00:00
Tim Angus
fcaf343d7f * Port to MinGW 2005-09-22 03:21:33 +00:00
Zachary Slater
f327407bb8 Cleanups from pomac! 2005-09-02 20:13:47 +00:00
Ludwig Nussel
5ae70d54b0 remove svn:executable property 2005-08-28 17:54:51 +00:00
Zachary Slater
f46ede91fb Ludwig's 1st diff: Some 64bit fixes for x86_64. Also fixes Makefile build. 2005-08-27 02:24:00 +00:00
Zachary Slater
59cce31e75 newlines fixed 2005-08-26 17:39:27 +00:00
Zachary Slater
5b755058f5 Itsa me, quake3io! 2005-08-26 04:48:05 +00:00
Travis Bradshaw
dbe4ddb103 The Quake III Arena sources as originally released under the GPL license on August 20, 2005. 2012-01-31 13:41:34 -06:00