aboutsummaryrefslogtreecommitdiffstats
path: root/code/qcommon/common.c
Commit message (Collapse)AuthorAgeFilesLines
* * Fix MinGW build (it doesn't have _putenv_s)tma2009-10-131-1/+1
| | | | git-svn-id: svn://svn.icculus.org/quake3/trunk@1665 edf5b092-35ff-0310-97b2-ce42778d08ea
* Fix netcode inconsistency, thanks to /dev/humancontroller for the patch, see ↵thilo2009-10-121-16/+0
| | | | | | http://bugzilla.icculus.org/show_bug.cgi?id=4060 git-svn-id: svn://svn.icculus.org/quake3/trunk@1661 edf5b092-35ff-0310-97b2-ce42778d08ea
* MinGW doesn't have setenv() either, so.....thilo2009-10-121-3/+3
| | | | git-svn-id: svn://svn.icculus.org/quake3/trunk@1660 edf5b092-35ff-0310-97b2-ce42778d08ea
* Fix environment variable handling for Linux, make setenv command added ↵thilo2009-10-121-13/+53
| | | | | | before parsing of configuration files. (https://bugzilla.icculus.org/show_bug.cgi?id=3626) git-svn-id: svn://svn.icculus.org/quake3/trunk@1659 edf5b092-35ff-0310-97b2-ce42778d08ea
* Minor reworking to check command line cvars before Com_InitZoneMemory().icculus2009-09-141-6/+8
| | | | | | | | | | This lets you set com_zoneMegs from the command line (although still not from a config file, but oh well). Fixes Bugzilla #2571. git-svn-id: svn://svn.icculus.org/quake3/trunk@1590 edf5b092-35ff-0310-97b2-ce42778d08ea
* Replace a few sprintf with Com_sprintfthilo2009-06-011-3/+3
| | | | git-svn-id: svn://svn.icculus.org/quake3/trunk@1565 edf5b092-35ff-0310-97b2-ce42778d08ea
* Fix warning in Sys_RandomBytes() usagethilo2009-05-311-1/+1
| | | | git-svn-id: svn://svn.icculus.org/quake3/trunk@1564 edf5b092-35ff-0310-97b2-ce42778d08ea
* I'll retain the new way seeding the random number generator.. these calls ↵thilo2009-05-311-1/+0
| | | | | | are therefore redundant git-svn-id: svn://svn.icculus.org/quake3/trunk@1563 edf5b092-35ff-0310-97b2-ce42778d08ea
* Revert changes of rand() to random() as random() was redefined in quake3.thilo2009-05-311-4/+4
| | | | git-svn-id: svn://svn.icculus.org/quake3/trunk@1562 edf5b092-35ff-0310-97b2-ce42778d08ea
* - Introduce seeding of the random number generator at startupthilo2009-05-311-4/+22
| | | | | | | - Replaced all engine-side occurances of rand() with random() git-svn-id: svn://svn.icculus.org/quake3/trunk@1561 edf5b092-35ff-0310-97b2-ce42778d08ea
* define STRING and XSTRING in q_shared.h (#4054)ludwig2009-05-051-2/+0
| | | | git-svn-id: svn://svn.icculus.org/quake3/trunk@1539 edf5b092-35ff-0310-97b2-ce42778d08ea
* * Remove superfluous comments committed with fix to bug #3999tma2009-03-021-4/+2
| | | | git-svn-id: svn://svn.icculus.org/quake3/trunk@1508 edf5b092-35ff-0310-97b2-ce42778d08ea
* initialize qport with random value instead of time (#3999)ludwig2009-03-021-1/+8
| | | | git-svn-id: svn://svn.icculus.org/quake3/trunk@1506 edf5b092-35ff-0310-97b2-ce42778d08ea
* * Move command argument completion from being hard coded to being associatedtma2008-09-161-89/+7
| | | | | | | with the individual commands to be completed git-svn-id: svn://svn.icculus.org/quake3/trunk@1472 edf5b092-35ff-0310-97b2-ce42778d08ea
* * Fix to console completion bug introduced by the last fix (from the oopstma2008-08-301-1/+1
| | | | | | | dept.) git-svn-id: svn://svn.icculus.org/quake3/trunk@1465 edf5b092-35ff-0310-97b2-ce42778d08ea
* * Collapse common command completion code into one function and fix thetma2008-08-271-57/+38
| | | | | | | | incorrect buffer size parameter to strncpy (from the how-the-fuck-did-this-ever-work dept.) git-svn-id: svn://svn.icculus.org/quake3/trunk@1460 edf5b092-35ff-0310-97b2-ce42778d08ea
* * Handle dead keys more gracefully by taking a "best guess" rather than ignoringtma2008-08-251-0/+8
| | | | | | | | | | 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" git-svn-id: svn://svn.icculus.org/quake3/trunk@1459 edf5b092-35ff-0310-97b2-ce42778d08ea
* * Change win32 client Sys_Sleep so it ONLY sleeps since before it was waking on tma2008-08-031-1/+8
| | | | | | | | | | | | | | 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) git-svn-id: svn://svn.icculus.org/quake3/trunk@1434 edf5b092-35ff-0310-97b2-ce42778d08ea
* * Sign check com_maxfps* variablestma2008-07-211-3/+3
| | | | git-svn-id: svn://svn.icculus.org/quake3/trunk@1432 edf5b092-35ff-0310-97b2-ce42778d08ea
* * Use Sys_Sleep to limit FPS, which will save CPUtma2008-07-211-2/+17
| | | | | | | | * Add com_maxfpsUnfocused and com_maxfpsMinimized; self explanatory * Fix reopening of bug 3703, I hope git-svn-id: svn://svn.icculus.org/quake3/trunk@1431 edf5b092-35ff-0310-97b2-ce42778d08ea
* * Rename voip cvar to cl_voiptma2008-07-071-3/+7
| | | | | | | | | * 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 git-svn-id: svn://svn.icculus.org/quake3/trunk@1420 edf5b092-35ff-0310-97b2-ce42778d08ea
* * Remove silly range check on sv_voip during initialisationtma2008-07-061-1/+1
| | | | | | | * Changed dedicated binary dedicated cvar to CVAR_INIT and remove runtime check git-svn-id: svn://svn.icculus.org/quake3/trunk@1410 edf5b092-35ff-0310-97b2-ce42778d08ea
* * Change dedicated cvar to CVAR_LATCH on the dedicated servertma2008-07-061-1/+1
| | | | git-svn-id: svn://svn.icculus.org/quake3/trunk@1407 edf5b092-35ff-0310-97b2-ce42778d08ea
* * (bug 3610) Server sending unnecessary newline with SV_ConSay_F (Tyler Schwend tma2008-07-051-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | <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>) git-svn-id: svn://svn.icculus.org/quake3/trunk@1405 edf5b092-35ff-0310-97b2-ce42778d08ea
* * (bug 3641) Server is left running following a local disconnecttma2008-05-121-0/+1
| | | | git-svn-id: svn://svn.icculus.org/quake3/trunk@1343 edf5b092-35ff-0310-97b2-ce42778d08ea
* Make forced unloading work in more cases than just server disconnectsthilo2008-04-291-0/+4
| | | | git-svn-id: svn://svn.icculus.org/quake3/trunk@1333 edf5b092-35ff-0310-97b2-ce42778d08ea
* Add com_standalone cvar for at-runtime handling of mods that do not require ↵thilo2008-04-101-4/+14
| | | | | | the original quake3 game data. git-svn-id: svn://svn.icculus.org/quake3/trunk@1309 edf5b092-35ff-0310-97b2-ce42778d08ea
* set flag to allow forced unload of a running VMludwig2008-04-061-0/+2
| | | | | | required to prevent a client from exiting if the server disconnects (bug 3585) git-svn-id: svn://svn.icculus.org/quake3/trunk@1300 edf5b092-35ff-0310-97b2-ce42778d08ea
* - Replace vsprintf function in bg_lib.c with vsnprintf implementation ↵thilo2008-03-251-1/+1
| | | | | | | | | started by Patrick Powell. - Remove all calls to vsprintf in the engine and gamecode and replace them with calls to vsnprintf. git-svn-id: svn://svn.icculus.org/quake3/trunk@1277 edf5b092-35ff-0310-97b2-ce42778d08ea
* * Write q3config_server.cfg for the server, to avoid reseting client variablestma2008-02-281-2/+2
| | | | | | | after running a dedicated server git-svn-id: svn://svn.icculus.org/quake3/trunk@1269 edf5b092-35ff-0310-97b2-ce42778d08ea
* * send along the reason for disconnection when sending the disconnect tjw2007-12-311-0/+2
| | | | | | | | | | 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) git-svn-id: svn://svn.icculus.org/quake3/trunk@1245 edf5b092-35ff-0310-97b2-ce42778d08ea
* * (bug 3454) Fix crash in autocompletion due to incorrect strncpy buffer sizetma2007-12-031-3/+6
| | | | git-svn-id: svn://svn.icculus.org/quake3/trunk@1226 edf5b092-35ff-0310-97b2-ce42778d08ea
* * Unconditionally place a '\' at the start of the command buffer whentma2007-10-121-38/+90
| | | | | | | | | | | 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 git-svn-id: svn://svn.icculus.org/quake3/trunk@1195 edf5b092-35ff-0310-97b2-ce42778d08ea
* * Merge unified-sdl to trunktma2007-09-051-91/+169
| | | | | | | * Bump Q3_VERSION to 1.35 git-svn-id: svn://svn.icculus.org/quake3/trunk@1161 edf5b092-35ff-0310-97b2-ce42778d08ea
* * Fix a few -pedantic warningstma2007-07-251-1/+1
| | | | git-svn-id: svn://svn.icculus.org/quake3/trunk@1120 edf5b092-35ff-0310-97b2-ce42778d08ea
* * (bug 3019) use the operating system's random number generator if possibletjw2007-02-161-0/+21
| | | | | | | when generating the qkey file git-svn-id: svn://svn.icculus.org/quake3/trunk@1046 edf5b092-35ff-0310-97b2-ce42778d08ea
* - Remove "server crashed" message on server shutdown caused by local client ↵thilo2006-10-271-7/+7
| | | | | | | | | disconnect. - Stop demo recording on a new gamestate packet so the demo won't end with a new level load. git-svn-id: svn://svn.icculus.org/quake3/trunk@956 edf5b092-35ff-0310-97b2-ce42778d08ea
* Go back to rev. 874. ATM, there is no good way to make FS_Restart() behave ↵thilo2006-08-281-5/+5
| | | | | | as it was originally described. git-svn-id: svn://svn.icculus.org/quake3/trunk@880 edf5b092-35ff-0310-97b2-ce42778d08ea
* More fixes for the FS_Shutdown change. Declare qconsole.log as closed before ↵thilo2006-08-281-2/+1
| | | | | | | | | FS_Shutdown closes all files. git-svn-id: svn://svn.icculus.org/quake3/trunk@879 edf5b092-35ff-0310-97b2-ce42778d08ea
* Fix crash when recording to files and the map changes. Was caused by new, ↵thilo2006-08-281-3/+4
| | | | | | | | | correct, behaviour of FS_Restart() which would close the files before they'd be closed by the client. git-svn-id: svn://svn.icculus.org/quake3/trunk@878 edf5b092-35ff-0310-97b2-ce42778d08ea
* * Print the SVN version string in Com_Init()tjw2006-08-251-1/+1
| | | | git-svn-id: svn://svn.icculus.org/quake3/trunk@869 edf5b092-35ff-0310-97b2-ce42778d08ea
* Fix 100% CPU usage on idle dedicated servers.thilo2006-08-181-2/+2
| | | | git-svn-id: svn://svn.icculus.org/quake3/trunk@850 edf5b092-35ff-0310-97b2-ce42778d08ea
* * sv_minRate (from R1CH)tma2006-06-171-0/+5
| | | | | | | * [cl|sv]_packetdelay (from tjw) git-svn-id: svn://svn.icculus.org/quake3/trunk@808 edf5b092-35ff-0310-97b2-ce42778d08ea
* Replaced various "baseq3" strings with the centrally defined BASEGAME macro.thilo2006-04-261-1/+1
| | | | git-svn-id: svn://svn.icculus.org/quake3/trunk@724 edf5b092-35ff-0310-97b2-ce42778d08ea
* - botlib logfile now gets stored in the fs_game directory in fs_homepath. ↵thilo2006-04-211-5/+16
| | | | | | | | | | | (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. git-svn-id: svn://svn.icculus.org/quake3/trunk@715 edf5b092-35ff-0310-97b2-ce42778d08ea
* * Displace the '\n's passed to SV_Shutdowntma2006-02-281-4/+4
| | | | git-svn-id: svn://svn.icculus.org/quake3/trunk@594 edf5b092-35ff-0310-97b2-ce42778d08ea
* - change long to intptr_t for 64bit windows compatabilityludwig2006-02-181-3/+3
| | | | | | | | - change vmMain arguments back to int. 64bit types are apparently not needed there. Only the syscall function needs them. git-svn-id: svn://svn.icculus.org/quake3/trunk@550 edf5b092-35ff-0310-97b2-ce42778d08ea
* * Persistent console historytma2006-01-241-1/+4
| | | | git-svn-id: svn://svn.icculus.org/quake3/trunk@522 edf5b092-35ff-0310-97b2-ce42778d08ea
* * Overhaul of console autocompletiontma2006-01-221-64/+199
| | | | | | | | | | - 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 git-svn-id: svn://svn.icculus.org/quake3/trunk@514 edf5b092-35ff-0310-97b2-ce42778d08ea
* * Fix a bug with command/cvar autocompletiontma2006-01-211-1/+6
| | | | git-svn-id: svn://svn.icculus.org/quake3/trunk@512 edf5b092-35ff-0310-97b2-ce42778d08ea