Commit Graph

28 Commits

Author SHA1 Message Date
Shpoike 4d0d324479 Fix demo playback. Play some ftenq demos too. 2021-08-31 04:59:11 +01:00
Spike d58f3f6cfe Throttle networking to 72 if host_maxfps is set any higher (or 0).
This means that you can just disable vsync and set host_maxfps to 0 for uncapped framerates without any new physics issues.
Note that this commit does not fix bf flashes.
2021-08-31 04:59:11 +01:00
Spike fe4b224c7d Added support for simple csqc.
This is a subset of csqc, with alternative entry points that can be invoked by compat wrappers.

Also added sv_gameplayfix_setmodelrealbox cvar. Default value of 1 matches QuakeSpasm, whereas a value of 0 matches vanilla quake's behaviour.
2021-08-31 04:59:11 +01:00
Spike d76ca606bf All changes present in QSS-R7, plus
md3 support
quoth/etc bug fix
strzone bug fix
png/jpg replacement wall textures
rewrote mdl rendering to always use arrays, relaxing vertex+tri limits.
removed static ents limit
fixed ambient_level not working at high framerates.
2021-08-31 04:59:11 +01:00
Eric Wasylishen 79aac789be Revert "always run" changes from r797; move the QuakeSpasm customizations to a new "cl_alwaysrun" cvar.
Set to 1 to scale forward/side/up speed by "cl_movespeedkey" (usually 2), and make "speedkey" act as "slowkey".

Change "always run" menu option to offer
"off" (cl_alwaysrun 0, cl_forwardspeed 200, cl_backspeed 200),
"vanilla" (cl_alwaysrun 0, cl_forwardspeed 400, cl_backspeed 400) and
"quakespasm" (cl_alwaysrun 1, cl_forwardspeed 200, cl_backspeed 200).

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1480 af15c1b1-3010-417e-b628-4374ebc0bcbd
2017-08-23 06:00:20 +00:00
Ozkan Sezer 9c26054be9 avoid segfault from the 'viewpos' and 'viewtrace' commands when not
connected (e.g. right after the engine boots.)  make the 'entities'
command to only print when connected.

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1479 af15c1b1-3010-417e-b628-4374ebc0bcbd
2017-08-20 23:15:43 +00:00
Eric Wasylishen a1c95a5978 gl_refrag.c: Hunk-allocate efrags and trim out unused functionality
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1394 af15c1b1-3010-417e-b628-4374ebc0bcbd
2017-04-02 19:39:18 +00:00
Eric Wasylishen 4fe5f6956f Adjust "exceeds standard limit of" debug warnings to include the actual QS limit.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1386 af15c1b1-3010-417e-b628-4374ebc0bcbd
2017-03-30 06:26:16 +00:00
Eric Wasylishen 759aa803d1 CL_Tracepos_f: fix wrong trace endpoint (developer function added in Fitzquake)
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1304 af15c1b1-3010-417e-b628-4374ebc0bcbd
2016-05-21 19:50:03 +00:00
Eric Wasylishen 11a5300247 Convert to Con_DWarning (developer 1 only) the remaining two "exceeded standard limit" warnings.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1216 af15c1b1-3010-417e-b628-4374ebc0bcbd
2015-05-29 18:33:08 +00:00
Eric Wasylishen 1f3c1a711a Make "exceeds standard limit of" messages only display when developer cvar is set, with a new Con_DWarning function.
Have heard these are confusing players and mappers/modders; people assume there is an error or a limit in QS is exceeded, but the messages are only about exceeding the limits in vanilla WinQuake/GLQuake.

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1211 af15c1b1-3010-417e-b628-4374ebc0bcbd
2015-05-25 01:48:03 +00:00
Eric Wasylishen 171b08cf39 Support pausing demo playback.
This is done by adding an extra 'demopaused' flag to client_static_t, separate from cl.paused because we don't want a svc_setpause inside the demo (caused by the player pausing during recording) to actually pause demo playback. The only potential failure case is, if the demo contains a svc_stufftext of the command "pause", the demo will pause itself when being played.

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1147 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-12-08 19:30:36 +00:00
Ozkan Sezer b9032b7815 copyright years, general tidy-up, remove unused d_ifacea.h.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1059 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-09-22 08:55:46 +00:00
Ozkan Sezer 9a78c9e829 some merges from uhexen2: clean up some crap in long chat line support.
do not set messagemode when not really connected. made chat_buffer[] and
chat_bufferlen static to keys.c. console.c uses new Key_GetChatBuffer()
and Key_GetChatMsgLen() accessor functions. renamed team_message global
to chat_team as in qw/q2. added Key_EndChat() as a new helper. called
Key_EndChat() from within CL_Disconnect() to not get stuck in chat mode.
now that key_message is guaranteed to be set only in game mode, removed
its cases from Key_ForceDest(). several other cleanups.

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@771 af15c1b1-3010-417e-b628-4374ebc0bcbd
2012-10-21 09:55:16 +00:00
Ozkan Sezer 0d53e0f959 moved cfg_unbindall and its registration to cl_main.c. moved the
config.cfg write of unbindall to Key_WriteBindings().

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@768 af15c1b1-3010-417e-b628-4374ebc0bcbd
2012-10-12 07:33:11 +00:00
Sander van Dijk 95d20d835f revert (most of) r521, r756 and r759. Alter "gamekey" handling a bit to compensate.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@761 af15c1b1-3010-417e-b628-4374ebc0bcbd
2012-10-06 18:09:23 +00:00
Sander van Dijk d4611c823e more mouse grab/release fixes
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@759 af15c1b1-3010-417e-b628-4374ebc0bcbd
2012-10-05 18:58:59 +00:00
Ozkan Sezer 3c08cf2e3c cl_main.c (CL_Disconnect): set cl.intermission to 0. Fixes a minor
intermission glitch which isn't hit easily. See Baker's notice at:
http://forums.inside3d.com/viewtopic.php?t=4944

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@695 af15c1b1-3010-417e-b628-4374ebc0bcbd
2012-07-16 17:00:24 +00:00
Ozkan Sezer 1928f2e1b8 * first shot at cvar flag system and cvar layer clean-ups :
- removed the archive and server members of cvar_t structure
  which are now represented by the CVAR_ARCHIVE, CVAR_NOTIFY
  and CVAR_SERVERINFO flags.
- added new Cvar_SetROM and Cvar_SetValueROM functions to 
  set vars marked as CVAR_ROM (read-only vars) programaticaly
- added Cvar_SetCallback() as a new function to assign (or
  remove) a callback function to a cvar.
- changed Cvar_RegisterVariable() to only accept a var pointer
  as in original quake
- moved notification handling from Cvar_Set() to callbacks.
- changed Cvar_Set() so that it doesn't reallocate the var's
  string buffer if nothing is changed, nor does it run the
  var's callback.
- changed the 'registered' and 'cmdline' cvars to be read-only
  so that the users can't change it using the console.  (and
  with 'registered' flagged as CVAR_ROM, the 'static_registered'
  thing is no longer required)
- added comment that sending cmdline upon CCREQ_RULE_INFO is
  evil...
- more to follow later.

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@566 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-12-28 22:01:33 +00:00
Ozkan Sezer 7ee8c348c0 Made the cmd argument of CL_SendMove() const.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@511 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-12-12 14:11:17 +00:00
Ozkan Sezer 945262b863 min/max macros: renamed them to q_min and q_max, moved them common.h.
removed the inline versions which only handled integers.  moved CLAMP
macro to common.h.  Adjusted all places for the renamed macros.


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@386 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-01-10 10:35:40 +00:00
Ozkan Sezer cbb7eb0428 Backported external music files support using decoder libraries and the
new raw samples interface from Hammer of Thyrion (uhexen2) :
- bgmusic.c, bgmusic.h: New BGM interface for background music handling.
  Handles streaming music as raw sound samples.
- bgmnull.c: BGM source for cases where the engine is configured for no
  sound.
- cl_main.c: Include bgmusic.h. Call BGM_Stop() and CDAudio_Stop() in
  CL_Disconnect().
- cd_sdl.c: Moved bgmvolume boundary checking to bgmusic.c upon value
  changes.
- gl_vidnt.c, gl_vidsdl.c, cl_parse.c: Include bgmusic.h. Add BGM_Pause()
  and BGM_Resume() calls along with CDAudio_ counterparts.
- cl_parse.c: Replace CDAudio_Play() call by the new BGM_PlayCDtrack()
  which first tries CDAudio_Play() and then streaming music if it fails.
- host.c: Include bgmusic.h. Call BGM_Update() just before S_Update()
  in Host_Frame(). In Host_Init(), call BGM_Init() after other audio init
  calls. In Host_Shutdown(), call BGM_Shutdown() before all other audio
  shutdown calls.
- snd_dma.c: Include snd_codec.h and bgmusic.h. Call S_CodecInit() from
  S_Init(). Call S_CodecShutdown() from S_Shutdown().
- snd_codec.c, snd_codec.h: New public codec interface for streaming
  music as raw samples. Adapted from quake2 and ioquake3 with changes.
  Individual codecs are responsible for handling any necessary byte swap
  operations.
- snd_codeci.h: New header for snd_codec internals.
- snd_wave.c, snd_wave.h: Codec for WAV format streaming music. Adapted
  from ioquake3 with changes.
- snd_vorbis.c, snd_vorbis.h: Codec for Ogg/Vorbis format streaming music.
- snd_mp3.c, snd_mp3.h: Codec for MP3 format streaming music using libmad.
  Adapted from the SoX project with changes.
- Makefile: Adjusted for the new sources. Added switches USE_CODEC_WAVE,
  USE_CODEC_MP3, USE_CODEC_VORBIS for enabling and disabling individual
  codecs.
- Windows makefiles and project files as well as other CodeBlocks project
  files will be updated shortly.


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@374 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-01-05 19:50:43 +00:00
Ozkan Sezer db94e7f98c some more constifications and fixes for deprecated conversion
from string constant to char*


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@303 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-08-29 12:04:19 +00:00
Ozkan Sezer a7d57b4b51 * renamed Length() to VectorLength() for consistency with its friends.
* mathlib.c: Removed the unnecessary sqrt() prototype.
(VectorLength): Made it to just return sqrt(DotProduct(arg,arg))
(VectorNormalize): Calculate the length as sqrt(DotProduct(arg,arg)).
* mathlib.h (CLAMP): Renamed the macro arguments from min and max to
_minval and _maxval.


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@248 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-08-01 19:22:46 +00:00
Ozkan Sezer c24d592580 host_cmd.c, console.c, gl_draw.c, image.c, gl_model.c, r_sprite.c, cl_parse.c,
gl_warp.c, host.c, gl_mesh.c, gl_sky.c, gl_texmgr.c, cvar.c, sv_main.c, cvar.h,
gl_screen.c, r_brush.c, gl_vidsdl.c, zone.c, cl_main.c, cmd.c, snd_dma.c,
snd_mem.c, common.c, sv_phys.c: Added explicit casts to eliminate -Wc++-compat
warnings.


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@170 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-05-31 07:42:36 +00:00
Ozkan Sezer 6f43d5ca99 cl_main.c (CL_EstablishConnection): Send a clc_nop at the end of the function.
This has been referred to by Baker as the NAT fix of ProQuake. Applied upon
Steven's suggestion and it made me able to connect to bigfoot.quake1.net:26001
too.


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@98 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-03-05 16:11:06 +00:00
Ozkan Sezer 6bc3c41370 cl_main.c (CL_NextDemo): fix for an obscure bug when there are no demos
listed with startdemos: run the game, go into a savegame or start a new
game, type F3 and press Esc enough times to go back to normal view, bring
down the console and enter "timedemo demo1". when the demo ends, the only
thing I was able to *see* was the loading label, no other activity at all,
although I can still do F10 (quit) and blindly press Y to exit the game,
so the engine didn't crash. problem was that CL_NextDemo() didn't check
if an actual nextdemo exists before calling SCR_BeginLoadingPlaque() which
set scr_drawloading to true, so scr_drawloading still remained as true..
fixed thusly.


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@71 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-20 01:10:18 +00:00
Ozkan Sezer db613ab35d initial import of SDL port of Fitzquake-0.85 / 20090510 sources.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@2 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-02-15 23:26:55 +00:00