Commit Graph

68 Commits

Author SHA1 Message Date
Andrei Drexler b26707b2ff Add sv_cheats cvar for 2021 rerelease
e.g. impulse 255 doesn't work without sv_cheats set to 1
2022-08-28 20:28:02 +03:00
Ozkan Sezer 02b953e993 use C11 _Generic macros for q_min, q_max and CLAMP, if available.
.. if not, then use GCC expression macros for them, if available.
2022-06-12 14:32:28 +03:00
Andrei Drexler e6d65c5aa4 Don't autoplay next demo after a timedemo
This happened when starting the game
with either -fitz or cl_startdemos 1
and then executing 'timedemo demo1'
while a title demo was still playing
2022-04-02 11:50:10 +03:00
Andrei Drexler ec49ef2441 Add 'horde' cvar (for 2021 rerelease) 2022-03-01 11:20:10 +03:00
Andrei Drexler 83af8d060f Add basic localized strings support for 2021 re-release
See https://github.com/Novum/vkQuake/pull/345
2021-08-29 17:11:28 +03:00
Andrei Drexler 65c1644849 add a 'campaign' cvar for quake '2021 release' version. 2021-08-22 18:55:02 +03:00
Andrei Drexler 3c8611f604 Reset pointers to sky textures on map unload/game change
This fixes a crash when loading a skyless map after one with a sky.
( From: https://github.com/Novum/vkQuake/pull/339 )
2021-08-10 01:00:02 +03:00
Ozkan Sezer 29b903bc84 host.c (Host_WriteConfiguration): don't VID_SyncCvars()
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1565 af15c1b1-3010-417e-b628-4374ebc0bcbd
2018-02-21 16:25:04 +00:00
Ozkan Sezer 1cd6ed55ed don't write the config file if we are Sys_Error()ing
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1564 af15c1b1-3010-417e-b628-4374ebc0bcbd
2018-02-21 07:33:07 +00:00
Ozkan Sezer f8247e30bd host.c (Host_WriteConfiguration): change bitwise and into logical and.
seems like a typo in original quake source.

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1561 af15c1b1-3010-417e-b628-4374ebc0bcbd
2018-02-16 06:03:25 +00:00
Ozkan Sezer e7648a42c9 minor cleanup to Max_Fps_f() cvar callback.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1505 af15c1b1-3010-417e-b628-4374ebc0bcbd
2017-09-17 11:02:46 +00:00
Eric Wasylishen e71737d35c host_maxfps: tweak warning message; > character looks weird in quake
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1501 af15c1b1-3010-417e-b628-4374ebc0bcbd
2017-09-13 00:04:31 +00:00
Eric Wasylishen 45f1df6112 host_maxfps: warn the player if > 72 that physics will be broken
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1500 af15c1b1-3010-417e-b628-4374ebc0bcbd
2017-09-12 23:27:26 +00:00
Eric Wasylishen e45de4c68a Add QUAKESPASM_VER_SUFFIX macro for marking betas/dev builds.
Refactor printing of QUAKESPASM_VERSION/QUAKESPASM_VER_PATCH to use a new
QUAKESPASM_VER_STRING macro.

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1408 af15c1b1-3010-417e-b628-4374ebc0bcbd
2017-05-29 04:17:49 +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
Ozkan Sezer 9c7eb2c6ff Host_Loadgame_f(): no need for entnum >= sv.max_edicts check
because EDICT_NUM() does it already. also move ent->free=false
statement to partial zero-fill case.
Host_ClearMemory(): remove check before free(sv.edicts)
SV_Init(): initialize sv.edicts to NULL (just paranoia)

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1319 af15c1b1-3010-417e-b628-4374ebc0bcbd
2016-06-25 05:21:22 +00:00
Ozkan Sezer f07ac29c0b fix C++11 -Wliteral-suffix warnings. fix -Wnarrowing errors/warnings.
fix the detestable in_sdl.c/SDL2 int-to-enum conversion failure errors
from g++.


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1302 af15c1b1-3010-417e-b628-4374ebc0bcbd
2016-04-29 20:00:50 +00:00
Eric Wasylishen ae8a4f82da SV_SpawnServer: use malloc for sv.edicts, and only zero it as needed
Previously we were Hunk_Alloc'ing space for 8192 edicts (by default) which zeros all of that memory, this way we only use as much RAM as needed since the unuesd pages aren't dirtied

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1286 af15c1b1-3010-417e-b628-4374ebc0bcbd
2016-01-29 01:05:11 +00:00
Eric Wasylishen 65727a9810 max_edicts: raise to 8192 (from 2048) and make non-archived, to reduce the need for players to mess with it to get maps/mods to run.
Some measurements on the size of the sv.edicts hunk allocation, with this change, on various mods (it depends on the number of QC entity fields):
id1 7MB, quoth 11 MB, arcadim 21 MB, rrp 9MB,  ne_ruins 16MB.

Since this is a Hunk_Alloc, the whole 10-20MB is cleared to zero which will allocate that much physical ram.
We could probably change it to a malloc later, and not clear the memory, so physical ram is only allocated when the memory is cleared in ED_Alloc.

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1278 af15c1b1-3010-417e-b628-4374ebc0bcbd
2016-01-10 23:03:06 +00:00
Eric Wasylishen 0ba423061b Add filename tab-completion for "playdemo" and "record" commands
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1219 af15c1b1-3010-417e-b628-4374ebc0bcbd
2015-05-30 02:28:58 +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
Sander van Dijk cebef615e5 input: Rework the text/non-text input mode handling.
Before, "gamekey" was the special case, now "textmode" is. We are now more precise about when we activate "textmode", e.g. we only do this when the console, messagemode, or a textfield in the menu are active. The trigger for doing this was this line on the "SDL_StartTextInput" page of the SDL2 wiki: "On some platforms using this function activates the screen keyboard.". Although we currenly support no such platform, it's good te be prepared, and what we do now is more correct anyway.


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1066 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-09-23 19:10:02 +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 ad2905b5e4 bumped version to 0.90.0
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1033 af15c1b1-3010-417e-b628-4374ebc0bcbd
2014-09-16 09:05:36 +00:00
Ozkan Sezer b3d2bb6884 host.c (Host_ShutdownServer): no need to clear the sv structure, because
ServerSpawn already do this by Host_ClearMemory.

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@782 af15c1b1-3010-417e-b628-4374ebc0bcbd
2012-11-06 08:56:09 +00:00
Ozkan Sezer cf30d683d0 renamed Key_ForceDest to Key_UpdateForDest. added M_Menu_Main_f()
prototype to menu.h. minor tidy-ups.

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@775 af15c1b1-3010-417e-b628-4374ebc0bcbd
2012-10-23 08:44:20 +00:00
Ozkan Sezer 9f8b2dfc0d added IN_UpdateForKeydest() as a new helper who does stuff if the
key_dest changes matter to the keyboard driver, e.g. sending KP_
key decisions, or SDL unicode stuff. we run it every frame either
before Sys_SendKeyEvents() or from within Key_ForceDest() for now.
(merged from uhexen2.)

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@773 af15c1b1-3010-417e-b628-4374ebc0bcbd
2012-10-21 11:33:10 +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
Sander van Dijk 73aee2dd56 Another approach to fixing mouse grab/key_dest
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@770 af15c1b1-3010-417e-b628-4374ebc0bcbd
2012-10-15 19:53:07 +00:00
Ozkan Sezer 1fef74e006 removed unused global host_time
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@769 af15c1b1-3010-417e-b628-4374ebc0bcbd
2012-10-12 07:50:45 +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 60ad340d72 Simplify r343 (the "oldval" stuff is already handled by the cvar system itself)
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@723 af15c1b1-3010-417e-b628-4374ebc0bcbd
2012-09-14 19:03:31 +00:00
Sander van Dijk 8d4edcc03b Make the "unbindall" in config.cfg configurable (on by default)
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@722 af15c1b1-3010-417e-b628-4374ebc0bcbd
2012-09-12 20:14:20 +00:00
Ozkan Sezer eb09523d00 changed some of the Cvar_Set[Value] calls to their *Quick variants in the
source files where the vars are defined.

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@576 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-12-29 21:21:11 +00:00
Ozkan Sezer c96c275334 some common.c cleanup: Made COM_InitFilesystem() public through common.h,
moved its calling from COM_Init() to Host_Init() just after COM_Init().
Moved registration of registered and cmdline cvars and COM_Path_f command
and the calling of COM_CheckRegistered() to COM_InitFilesystem(). Removed
unused memsearch(). Fixed the stupidity in leading space elimination from
com_cmdline.

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@573 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-12-29 15:10:18 +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 ca4124194f reverted revision 536 which made coop and deathmatch not to be set at
the same time

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@555 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-12-27 08:27:52 +00:00
Ozkan Sezer 42e55b3377 changed cvar callback functions to accept a cvar_t pointer arg. I may
have a use for that later.

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@545 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-12-24 14:04:01 +00:00
Ozkan Sezer ec9b77878b Made sure that deathmatch and coop are not set at the same time
(fix originally from QIP sources of Matthias Buecher, a.k.a. Maddes)

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@536 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-12-23 12:03:49 +00:00
Ozkan Sezer 9d809a3687 SDL input driver: updated from the uHexen2 project adding native keymap
and dead key support to the console, thanks to Sander van Dijk.

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@524 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-12-16 14:11:37 +00:00
Ozkan Sezer 870b40f7aa sys_sdl_unix.c, sys_sdl_win.c (Sys_ConsoleInput): Moved isDedicated check to...
host.c (Host_GetConsoleCommands): ... here, where it should be.

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@520 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-12-15 15:51:28 +00:00
Ozkan Sezer 2b919188d6 renamed Sys_FloatTime to Sys_DoubleTime (the thing always returned double
you know..) and adjusted all callers accordingly.  changed Sys_Sleep() to
take a milliseconds argument, added implementations for unix (usleep) and
windows (Sleep).

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@512 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-12-12 16:01:01 +00:00
Ozkan Sezer cccff603e4 made Sys_ConsoleInput() to return const
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@508 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-12-12 12:02:37 +00:00
Ozkan Sezer 729621c589 host.c (Host_ClearMemory): Do not check if host_hunklevel is
set before freeing the hunk allocations.  The order in Host_Init()
is clear and Host_ClearMemory must not be hit before host_hunklevel
is set. (otherwise, there _will_ be much trouble...)

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@467 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-07-05 06:50:23 +00:00
Ozkan Sezer 840d7376d5 host.c (Host_Init): Execute quake.rc _after_ setting host_hunklevel
and host_initialized.

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@466 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-07-05 06:45:31 +00:00
Ozkan Sezer 7dd3ee7a58 moved Host_Version_f from host_cmd.c to host.c.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@463 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-06-27 13:20:52 +00:00
Ozkan Sezer a85d8dcd6a made global host_parms a pointer, set in main(). adjusted places where
host_parms is used. made COM_Init() and Host_Init() to take no arguments.
made Sys_Init() to set host_parms->userdir: at present, it is set to
host_parms->basedir, to be changed properly when user directories are
implemented.

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@443 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-04-19 16:41:45 +00:00
Ozkan Sezer c53dd74e4d cvar'ize the game loop throttling by adding the new sys_throttle with
a default value of 0.02.  changing its value to 0 disables throttling.


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@427 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-02-27 07:05:18 +00:00
Ozkan Sezer f641321f97 removed the cdplayer facility added in 0.85.3
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@394 af15c1b1-3010-417e-b628-4374ebc0bcbd
2011-01-12 10:02:16 +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