summaryrefslogtreecommitdiff
path: root/source/sv_init.c
AgeCommit message (Collapse)Author
2010-09-15Renamed source tree subdirectory into ‘src’, moved ‘asm’ ↵Andrey Nazarov
subdirectory there and renamed it into ‘i386’.
2010-09-08Check for levelstring truncation in SV_Map.Andrey Nazarov
Remove useless local variable from SV_SpawnServer.
2010-09-07Allow extended ‘<limit>[/<period>[sec|min|hour]]’ syntax for ↵Andrey Nazarov
‘sv_status_limit’ (default period is one second). Split ‘sv_badauth_time’ cvar into ‘sv_auth_limit’ and ‘sv_rcon_limit’, with syntax identical to ‘sv_status_limit’. Reset rate limiting counters at server shutdown to make sure rcon rate limiting continues to work.
2010-09-07Re-resolve master servers after one day.Andrey Nazarov
Don't spam server console with ping acks from masters. Added ‘listmasters’ command for checking IPs and ack times. Send the first heartbeat soon after server initialization.
2010-08-31Fixed a crash when ‘map_override_path’ is in use.Andrey Nazarov
Made external entity string loading more verbose.
2010-07-03Yet another huge commit.Andrey Nazarov
Implemented new error reporting framework based on errno and custom error codes. Converted filesystem code, image and model managers, BSP loader to use the new framework and report errors more accurately. Replaced fileHandle_t with qhandle_t. Removed INVALID_LENGTH definition. Killed USE_LOADBUF code. Defined FS_FileExists(Ex) macro, implemented FS_EasyOpenFile and FS_WriteFile helper functions. When testing for free screenshot slots, open the file with O_EXCL flag to avoid race conditions (works only on glibc yet). Don't allow quake paths with high bits set. Don't tolerate any fatal errors encountered when searching for files and pass errors back to the caller. FS_Seek() now fails on files from packs instead of returning an invalid position. Fixed ‘mvdskip’ command not working properly. Avoid inefficient usage of MakeColor macro in image loading functions. Prevent memory leak in JPEG and PNG image functions after calling longjmp() by marking some local variables volatile. Added support for loading monochrome JPEG images. Fixed signed integer overflow in GetWavinfo(). Fixed missing return statement in BSP_LoadSurfEdges() causing out of range edge indices to be left uncaught. Fixed possible access to uninitialized memory in BSP_LoadLeafs() for maps with no leafs. Properly NUL terminate the buffer in SCR_ScoreDump_f(), also check for being in a level. Always free latched_string when cvar is set back to current value. Fixed a crash in ‘mvdplay’ command possible when demo file is invalid.
2010-06-13Pass -MAX_WBITS to inflateInit2/deflateInit2 instead of raw value of -15.Andrey Nazarov
2010-06-11Fixed gamedir not being changed properly when connecting to a server.Andrey Nazarov
Forbid changing gamedir at all while connected to a server. Automatically restart filesystem when user changes gamedir while disconnected. Killed FS_NeedRestart and FS_SafeToRestart.
2010-03-03Kill CL_LocalConnect preventing dedicated server to build.Andrey Nazarov
2009-09-17Added ‘sv_recycle’ variable to the dedicated server. Setting it to 1 ↵Andrey Nazarov
will cause reload of the game DLL once ‘gamemap’ command is executed, setting it to 2 will cause entire server exit sending reconnect message to the clients.
2009-06-03Don't cap maxmsglen on loopback connections.Andrey Nazarov
Use seperate buffer for stuffcmd processing on client so that something like ‘map foobar;wait;wait;wait;give shells’ works (original Q2 used deferred buffer for this). Don't include netgraph code into release builds. Made ‘changing’ and ‘precache’ commands not available from console, since they may confuse the client when typed manually. Client now handles newlines embedded into ‘cstring’ and ‘cstring2’ layout commands properly. Fixed a crash when displaying inventory. Detect zero bytes embedded into config files and refuse to execute them.
2009-05-29Ran all source files through expand(1).Andrey Nazarov
2009-05-10Display client PL, RTTs and packetdup values in ‘status l’ command ↵Andrey Nazarov
output, as well as ‘dumpuser’ output. Implemented naive protection against clients using ‘cl_nodelta 1’ via ‘sv_allow_nodelta’ cvar. Allow admins to vote regardless of ‘g_vote_spectators’ value. Changed level of obituary messages sent to victims/attackers to PRINT_HIGH. Fixed endianess issues. Fixed bashisms in ‘configure’ script.
2009-03-24Implemented a workaround for Q2 pmove bug resulting in swimming velocity in ↵Andrey Nazarov
‘z’ direction being heavily dependent of client's FPS when ‘+moveup’ is used. New minor Q2PRO protocol version 1015. Fixed command completion mode cursor positioning. Disable ‘cl_updaterate’ variable until it is fully supported. Added ‘sv_waterjump_hack’ variable, enabling the pmove bug workaround described above for supported clients. Properly count connected MVD spectators in menus. Update MVD menus as spectators join/leave the channels.
2008-11-13Hacked the source to get it compile on Windows Mobile using CeGCC toolchain.Andrey Nazarov
Fixed nasty memory corruption bug in UI scripts loading code. Fixed software refresh compilation issues on Windows. Inactive MVD channels are now completely destroyed and recreated once they are active again, and they are no longer allowed to stay in waiting state forever. Fixed delay buffer overflow resulting in fatal connection error. Preserve MVD stream flags in demos recorded on GTV server, and handle `inuse' flag correctly on players when writing gamestate. Updated documentation and Debian package descriptions.
2008-10-26Cleaned up `sys_win.c', moved some code into `win_ac.c' and `win_dbg.c'.Andrey Nazarov
Fixed broken `sv_ac.c' compilation.
2008-10-11Major redesign of GTV protocol: added support for persistent GTV connections,Andrey Nazarov
bidirectional pinging, low traffic (`suspended') modes. HTTP server is now gone (remote console logging is temporary gone too), custom binary protocol is used for GTV connections now. MVD client no longer serves other MVD clients, only regular spectators. Changed FIFO buffers to be regular circular buffers, not BIP-buffers. Removed `sv_http_*', `sv_console_auth' variables. Added `sv_mvd_maxclients' variable, `addgtvhost', `delgtvhost' and `listgtvhosts' commands. Renamed `sv_mvd_max*' cvars for consistency. Reset `sv_ghostime' default value back to 6, but changed semantics: it now waits for any packet from client, not just `begin' packet. Added `--disable-mvd-server' and `--disable-mvd-client' options to configure script. FS_Restart() no longer chokes on real files opened for reading. Fixed client chat prompt length. Stubbed out more debugging stuff from dedicated server builds.
2008-10-03Consolidated all MVD server code in a single file for easier portability.Andrey Nazarov
Perform more strict configstring length checks server side. No longer stop reading packets in a loop after an ICMP error.
2008-10-01Stubbed out more client stuff from dedicated server build.Andrey Nazarov
Dedicated server now properly handles `wait' console command.
2008-09-26Removed useless `net_tcp_clientport' cvar.Andrey Nazarov
Server no longer honours `port' cvar, `net_port' should be used instead. Server no longer searches for a free port and fails to start after the first unsuccessful attempt. Added documentation of the network stuff. Do not optimize `oldorigin' stuff on player entities for non-Q2PRO clients. Only active MVD channels are now listed in the menu.
2008-09-26MVD channels now use unique spawncounts for clients checking those.Andrey Nazarov
Moved POV info from top of the screen and made it include channel name.
2008-09-24Com_sprintf -> Q_snprintf, Q_strncpyz -> Q_strlcpy, Q_strcat -> Q_strlcat.Andrey Nazarov
Q_vsnprintf, Q_sprintf, Q_concat, Q_strlcpy, Q_strcat all return number of characters to be written into the buffer regardless of overflow. Removed COM_AppendExtension, FS_CopyFile, FS_RemoveFile, FS_CopyFile_f. Made sure Q2PRO can only write files into subdirectories of the game directory with a fixed extension. Moved `play' command implementation into main client code. Added support for `s_ambient' value of 3. Renamed `net_log_active' cvar to `net_log_enable'. Log files are now written into `logs/' subdirectory.
2008-08-26Added `sv_show_name_changes' and `sv_changemapcmd' cvars.Andrey Nazarov
2008-08-23Changes to `net_ip', `net_port' and `net_clientport' cvars now takeAndrey Nazarov
effect immediately (`net_restart' is no longer required). Console title now properly updates on server port change. Added ability to display ban reason to clients, which should be specified as `comment' argument to `addban' command.
2008-08-20Allow local MVD recordings span multiple levels, whose maximumAndrey Nazarov
amount is controlled by `sv_mvd_max_levels' cvar. Print a developer warning whenever PF_StartSound is called on entity not currently in use. MVD_ClearState now clears all edict_t and mvd_player_t fields.
2008-08-16Split some monolithic include files into smaller ones.Andrey Nazarov
Use single BSP models cache for refresh and collision subsystems. Refresh libraries may not longer be dynamically loaded. Made gi.TagMalloc use separate tag namespace to avoid conflicts with engine reserverd tags. Fixed listing order of MVD channels in chooser menu. A lot of misc changes... MSVC build is definitely broken now.
2008-06-29Added client and server side support for 32-bit solids.Andrey Nazarov
New R1Q2 and Q2PRO minor protocol versions, 1905 and 1014. Use environment variables for game and server features negotiation. Relax restrictions on quake paths when searching inside pak files. Made OSS subsystem cvar names consistent with core sound system conventions. Misc latched cvar handling changes.
2008-05-08Removed hardcoded menus in favor of scriptable ones.Andrey Nazarov
Made UI module part of the client, removed all glue. Added `pushmenu', `popmenu', 'forcemenuoff' commands. Detect gzipped files by contents, not by *.gz extension (TODO).
2008-03-26Do not reset svs.realtime on map change.Andrey Nazarov
Fixed time wraparound issues in MVD client.
2008-03-26CM loading code no longer calls Com_Error.Andrey Nazarov
Made endianness conversion macros return unsigned integers.
2008-03-24Remove useless time wraparound checks.Andrey Nazarov
Apply more careful input sanitizing in several places (issues revealed by zzuf(1)). Remove stereo *.wav loading stuff, Q2 has never supported it properly. Fixed a memory leak in Image_LoadPCX. Mark clients after receiving ICMP errors from them, drop after `sv_ghostime' seconds.
2008-03-21MVD game modules now sets more server info cvars.Andrey Nazarov
MVD recorder buffers are no longer allocated by GTV nodes.
2008-02-17Huge search and replace commit.Andrey Nazarov
Use fixed size integer types from stdint.h instead of custom defined ones. Get endianess infromation form endian.h. Added `remotemode' console command. Link with -ldl only on Linux.
2008-01-22Updated revision to 181.Andrey Nazarov
Renamed `pick' server command to `pickclient'. Pressing `r' key in server browser sets `rcon_password' cvar to selected entry. Made LoadPCX errors more verbose. Fixed 3D viewport positioning in player config menu. Remove `password' key from userinfo when `sv_password' or `sv_reserved_password' variables are set. Reset `sv_anticheat_required' variable when entering MVD client mode. Do not crash GTV when spectator types `nextserver' in console. Do not crash GTV when spectator types `say' without arguments.
2008-01-10Always send nonzero areabytes to non-q2pro clientsAndrey Nazarov
(fixes hall of mirrors in MVD Waiting Room). Made `deathmatch' and `maxclients' default to `1' and `8' respectively. Made autocompletion work for some console variables too. Made `set' command accept multiple args with spaces, as well as Cvar_Command. Fixed potential crash on entities with EF_BFG bit and out of range skinnum. Levelshots work again now. Made `pingservers' command ping all 64 possible servers. Delete scrap texture on refresh shutdown. Added `leave' command for GTV, switches client to Waiting Room.
2008-01-08Fixed MVD recording problem while playback.Andrey Nazarov
Fixed data being written to MVD buffers even without dummy MVD client. Allow to specify up to 64 favorite servers via adrXX variables. Properly display servers without `hostname' or `mapname' infokeys. Set console title to display dedicated server hostname and port. Removed redundant `toggleconsole' from UI_PushMenu. Fixed AC_ParseQueryReply parsing message incorrectly. Fixed MVD_GameClientBeing setting cl->number instead of cl->slot.
2008-01-06Fixed invalid client ID being displayed by `status' command on GTV servers.Andrey Nazarov
Fixed stupid Sys_Sleep bug on Unix systems. Draw `Loading anticheat...' string in connection screen. Added Sys_GetAntiCheatAPI stub into sys_unix.c for testing purposes.
2008-01-03Always reserve a client slot for dummy MVD observer.Andrey Nazarov
Report uptime in server status page, as well as client connection time. Do not timeout loopback connections. Updated server documentation.
2007-12-27Updated revision to 170.Andrey Nazarov
Removed `com_sleep' variable. Fixed master heartbeat timings. Enabled anticheat server interface for Windows builds. Added `--single-user' option to configure script. Build `q2pro-client' and `q2pro-server' binary *.deb packages by default. Allow absolute homedir path, autoexpand `~' character on Unix.
2007-12-21Actually implemented sv_http_minclients.Andrey Nazarov
Avoid `Q_strncpyz: overflow' messages when loading CM surfaces. Updated server README.
2007-12-20Added initial server side support for r1ch.net anticheat.Andrey Nazarov
Renamed `listban' command to `listbans'. Make sure NET_Connect sets NS_CONNECTING state even if connect() succeedes immediately. Changed FIFO_Read/FIFO_Write semantics.
2007-12-15Fixed MVD observers being stuck in place.Andrey Nazarov
2007-12-13Removed `con_histfile' variable in favor of `con_history'.Andrey Nazarov
Write console history to `.conhistory' by default. Updated revision to 167.
2007-11-28Made PF_Pmove called with NULL sv_clientAndrey Nazarov
work as expected by game DLL (this makes bots function again).
2007-11-25Changed Com_sprintf --> Q_concat in quite some cases.Andrey Nazarov
Make sure WAVE sound driver is built by default. Added --disable-wave option to `configure'. Command line history is now remembered between sessions. ALT+Space refreshes all servers in Server Browser. Handle command line agruments like original Q2 engine did.
2007-09-20Added support for the new R1Q2 protocol version.Andrey Nazarov
Q2PRO protocol is now versioned similar to R1Q2 protocol. Allow "play" stuffcmd when watching a demo. Handle clients with zero qport properly, compare IP address _and_ port.
2007-09-19Made fs_restart command available for dedicated servers.Andrey Nazarov
Do not reset CVAR_LATCHED flag in Cvar_Get, as it causes problems.
2007-09-18Handle MVD frame overflows more safely, do not kill entire server.Andrey Nazarov
2007-09-14Fixed several major MVD related bugs. MVD features are functional now.Andrey Nazarov
2007-09-12Improved server side handling of entity relative sounds.Andrey Nazarov
Reduced memory usage of MVD delta codec (currently MVDs are broken :)). Fixed zero viewangles being sent so server is some cases (RJ scripts now work). Added screenshotpng command, renamed screenshotJPEG to screenshotjpg. Added gl_screenshot_compression cvar. Fixed too large startup messages being written to client demos. Other misc changes.