summaryrefslogtreecommitdiff
path: root/source/cl_parse.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-08-02Made Q_ClearStr operate in place and renamed it to COM_strclr.Andrey Nazarov
Removed unused Q_HightlightStr function. Changed Q_ prefix on several functions to COM_ for consistency. Clear the message string before passing it to Cmd_ExecTrigger.
2010-08-01Applied patch from Toni Spets re-introducing support for message triggers.Andrey Nazarov
Allow ‘$var$’ syntax when performing macro expansion.
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-11Ported HTTP downloading implementation from R1Q2.Andrey Nazarov
Added ‘--enable-curl’ option to configure script.
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-06-09Expand the first ‘@’ character found in ‘logfile_prefix’ to a single ↵Andrey Nazarov
letter corresponding to message type (T - talk, D - developer, W - warning, E - error, A - everything else). Made player chat lines colored in dedicated server console.
2010-05-12Don't clear lagometer when toggling console.Andrey Nazarov
Added ‘scr_lag_max’ cvar for controlling lagometer scale.
2010-03-03Don't build client side dynamic lighting code unless software refresh is in use.Andrey Nazarov
Renamed USE_DYNAMIC to USE_DLIGHTS.
2010-03-03Don't build client side lightstyles code unless software refresh is in use.Andrey Nazarov
2010-02-28Moved some fx code to where it really belongs.Andrey Nazarov
2010-02-25Split CL_ParseTEnt into parsing and fx code.Andrey Nazarov
2010-02-23Cleaned up FS_Restart/FS_Shutdown code.Andrey Nazarov
Made ‘fs_restart’ command cause full filesystem restart (including reloading of the basedir).
2009-10-19Relaxed protocol version check for client side demos, allow version numbers ↵Andrey Nazarov
from 26 to 37 inclusive (and assume that protocols from 27 to 34 use the same binary format). Removed stupid extension check from CL_CheckOrDownloadFile.
2009-09-04Changed Com_DPrintf, Com_WPrintf and Com_EPrintf functions to macros.Andrey Nazarov
Introduced Com_LPrintf, FS_DPrintf, SV_DPrintf. Don't include any developer code at all unless built with _DEBUG.
2009-09-04Removed support for color escapes embedded in text (but still allow colored ↵Andrey Nazarov
lines in console). Moved color stuff from q_shared.c into the client code.
2009-07-03Don't write entity angles as shorts, wasting around 16 bytes per frame is ↵Andrey Nazarov
too much. Marked Q2PRO protocol version 1016 as reserved, reverted current version to 1015. Save 2 bytes for Q2PRO clients on entities with EF_QUAD by sending ‘effects’ as shorts. Read U_SKIN16 as unsigned short (hardly ever used though).
2009-06-19New minor Q2PRO protocol version 1016.Andrey Nazarov
Write entity angles as shorts for Q2PRO clients for smooth ‘func_rotating’ movement. Got rid of U_SOLID32/U_MASK, use msgEsFlags_t exclusively. Always draw ‘paused’ pic when paused. Fixed server side game pausing. Use extended ‘solid’ field when creating baselines for clients with MSG_ES_LONGSOLID bit set.
2009-06-19Server side IP filter now reports date and time of the last hit.Andrey Nazarov
Added support for long uptime reporing format (when ‘sv_uptime’ is set to 2). Added ‘com_uptime_long’ macro. Merged cl_draw.c code into cl_scrn.c, removed cl_draw.c. Got rid of loading screen, re-introduced loading plaque support. Don't include ‘scr_showstats’, ‘scr_showpmove’, ‘cl_test*’, ‘cl_stats’ cvars into release builds. Updated Debian package ‘Standards-Version’. Don't recommend ‘quake2-data’ anymore, use ‘$prefix/games/q2pro’ as base directory.
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-04-22Don't execute ‘cl_beginmapcmd’, ‘cl_changemapcmd’ and ↵Andrey Nazarov
‘cl_disconnectcmd’ triggers when playing back demos. Fixed automatic restart of sound subsystem after cvar change not working randomly. Don't crash in CL_Disconnect() on dedicated server exit. Added ‘sv_redirect_address’ variable. Fixed ‘\r’ char not stripped properly from filename when processing ‘\include’ directive in AC config files. Made AC config parser compliant with reference format as defined by R1Q2 implementation. Updated documentation.
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.
2009-01-30Client now works around the fact R1Q2 servers always report the highestAndrey Nazarov
protocol number they support in svc_serverdata message, regardless of the actual protocol version being used. Be silent and try to preserve reliable data at least when client demo message overflows, do not dump entire message. Use playerstate coordinates for positioning player's own entity in case it is invisible regardless of server protocol version. Changed ‘map_allsolid_bug’ default to 0, since it seems to break some mods. Implemented ‘recycle’ command for dedicated servers. Correctly parse comments from ‘/etc/default/q2pro’ config file. Install SIGHUP handler when running dedicated server only. It can now be used to reopen server logfile for rotation. Allow ${arg1-arg2} syntax when expanding alias parameters.
2009-01-19MVD client now exports ‘mvd_channels’ and ‘mvd_players’ counters ↵Andrey Nazarov
into server info. Fixed client side event positioning on player's own entity.
2009-01-13Client and server are now more tolerant to configstring overflows.Andrey Nazarov
2008-12-29Do not ‘fix’ current client entity origin/angles directly in the circularAndrey Nazarov
buffer, modify centity_t stuff instead. Fixes invalid player positioning when changing chasecam modes in modern mods such as OpenTDM. Use ‘lerp_origin’ for spatalizing looped sounds instead of discrete origin, fixes annoying stereo ‘wobbling’ of the railgun/bfg hum when strafing. Stop client sounds properly on deactivation when using SDL sound driver.
2008-12-15Put -lm back as it seems to break on non-i386 arches.Andrey Nazarov
Removed `sys_stdio' cvar in favor of `sys_console' on Unix. Unix client no longer writes anything on stdout by default if launched without a terminal (e.g. from X session). Server now uses entity origin instead of view origin when performing PVS/PHS culling of multicast data (fixes railing/chaining out of the water, etc). MVD client now clears roll angle of player entities. Really fixed MVD channel overflow recovery. Use RTLD_LAZY for loading game library on Unix to work around old mods. When adjusting lightmap/texture color saturation, calculate luminance accoring to sRGB colorspace specification. Fixed OpenGL renderer's PVS glitches when crossing water boundaries. Re-enable MD3 model support.
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-18Renamed `gtv.h' to `mvd_gtv.h'.Andrey Nazarov
A few fixes here and there.
2008-10-01Stubbed out more client stuff from dedicated server build.Andrey Nazarov
Dedicated server now properly handles `wait' console command.
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-20Avoid calling Com_ProcessEvents from CL_ParseServerMessage, as it canAndrey Nazarov
lead to undefined behavior if new network packet is received while parsing.
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-20Updated menu scripts syntax.Andrey Nazarov
Updated client docs.
2008-05-18Accept `all' as special argument to `delstuffcmd' command.Andrey Nazarov
Cleaned up Cvar_Get and fixed semantic bug. Accept `background keyword in menu scripts. Renamed `gl_fastsky' to `gl_drawsky'. If at least one of the sky env maps fails lo load, disable entire sky drawing. Reworked loading screen. Fixed Com_Quit argument string handling. Catch more signals on *nix. Updated server docs.
2008-05-05Brought SDL window resizing policy in compliance to ICCCM.Andrey Nazarov
Renamed `vid_placement' cvar to `vid_geometry'. Load *.pkz files by default. Do not allow backed-up quake paths at all. Apply `--enable-dsound' and `--enable-dinput' options to Unix too. Replaced `s_driver' and `in_driver' cvars with `s_direct' and `in_direct'. Renamed `s_initsound' cva to `s_enable'. Improved SDL input grabs handling in windowed mode. Allow `cl_noskins' to be dynamically changed. Run client at 10 fps if minimuzed, at 60 fps if not active (client is disconnected or in background). Fixed Sys_ExecDefault. Use absolute mouse positioning for UI. Hide custom UI cursor in windowed mode.
2008-04-23Added `dumpents' server command.Andrey Nazarov
Added support for `cl_noskins' value of 2 (default all female skins to `female/athena', all male skins to `male/grunt'). Renamed `scoreshot' command to `aashot', added `aadump' command. Fixed several alignment issues on ARM architecture. Server browser menu now indicates full and password protected servers with color codes. Implemented history search in console with Ctrl+R, Ctrl+S. Removed `cl_railtrail_alpha' variable, all `cl_rail*_color' variables now accept colors in #RRGGBBAA format. Added `map_override' cvar (enables loading map entity lump from external maps/*.ent file). Made `quit' command accept extra arguments. Made `draw' command accept arbitrary colors in #RRGGBBAA format. Fixed debian packages.
2008-04-09Added `addstuffcmd', `delstuffcmd' and `liststuffcmds'commands.Andrey Nazarov
Fixed broken delta decompression of clientNum field by the client. Rewrote SV_MvdPlayerIsActive, added flag 4 to `sv_mvd_capture_flags'. Added `scr_drawpmove' debugging variable. Improved intermission handling by the MVD client.
2008-04-02Use size_t instead of int where possible.Andrey Nazarov
Added initial support for Win64 port.
2008-03-27Changed some client side counters to unsigned type.Andrey Nazarov
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-05Rewrote autocompletion engine.Andrey Nazarov
Added `con_notifylines' variable. Do not allow chat beeps to overlap.
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-02-14Stop client demo recording when `changing' command is received.Andrey Nazarov
Prevent cl.time calculations from overflowing on high server frames.
2008-02-09Initial client support for variable server FPS.Andrey Nazarov
Added `cl_updaterate' variable. Fixed 'jerking bodies' bug when playing MVD stream. Fixed new entities warping when playing MVD stream. Allow dummy MVD client to be kicked. Never update layouts more than once per server frame for MVD observers. Added support for scrolling MVD client list using `invnext' and `invprev'. Fixed ref_soft compilation issue. Removed `mvd_wait_enter' and `mvd_wait_leave' variables in favor of `mvd_wait_delay' and `mvd_wait_percent'. Enter waiting state after buffer underflow only. Added `sv_locked' variable. Kick clients updating their userinfo to invalid one. Echo client name changes to the dedicated server console. Allow truncated MVDs to be played back in a row. Added `mvdpause' command. Made `serverstatus' command to query current server if called without argument. Enumerate clients in `serverstatus' command output. Demo browser now caches MVDs correctly. Allow `play' command to be used for playing MVDs too.
2008-01-13New minor Q2PRO protocol version, 1012.Andrey Nazarov
Save up to 6 bits on each usercmd vector component. Measure frame duration more accurately in CL_UpdateCmd.
2008-01-01Inspect `play' command more carefully in CL_ParseStuffText.Andrey Nazarov
Made FS_LoadFile return 0 instead of -1 on gzipped files. Cleaned up MVD_ParseUnicast. Display chase target name on the screen for non-q2pro GTV clients. Implemented UF_NOGAMECHAT = 8, UF_NOMVDCHAT = 16 user flags. MVD_Say_f no longer uses SV_BroadcastPrintf. Changed `scr_showfollowing' default value back to 1. Filter svc_stufftext and svc_layout on game server before sending mvd_unicast message to MVD clients.
2007-12-30Made `condump' command write into `condumps/*.txt' by default.Andrey Nazarov
Fixed anticheat being disabled after server restart via `map' command.
2007-12-11Fixed crash inside CL_PacketEntities on player ents with negative skinnum.Andrey Nazarov
Register all vwep models even with `cl_noskins 1'. Fixed S_RegisterSexedSound to always use sounds corresponding to visible player model.