2 hours agohost: Move server perf code to server frame code master
cloudwalk [Mon, 13 Jul 2020 16:00:13 +0000 (16:00 +0000)]
host: Move server perf code to server frame code

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12804 d7cf8633-e32d-0410-b094-e92efae38249

2 hours agohost: Move timer resets to client/server code
cloudwalk [Mon, 13 Jul 2020 16:00:13 +0000 (16:00 +0000)]
host: Move timer resets to client/server code

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12803 d7cf8633-e32d-0410-b094-e92efae38249

2 hours agohost: Move server/client-specific frametime limiting code outside of common code
cloudwalk [Mon, 13 Jul 2020 16:00:12 +0000 (16:00 +0000)]
host: Move server/client-specific frametime limiting code outside of common code

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12802 d7cf8633-e32d-0410-b094-e92efae38249

2 hours agohost: Use new global host.sleeptime instead of svs variable outside server code
cloudwalk [Mon, 13 Jul 2020 16:00:11 +0000 (16:00 +0000)]
host: Use new global host.sleeptime instead of svs variable outside server code

This, again, moves server code out of common code.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12801 d7cf8633-e32d-0410-b094-e92efae38249

2 hours agohost, csqc: Remove cl.csqc_paused. Use new global host.paused instead.
cloudwalk [Mon, 13 Jul 2020 16:00:11 +0000 (16:00 +0000)]
host, csqc: Remove cl.csqc_paused. Use new global host.paused instead.

This removes some client/server-only code in the client/server frames.
This also cleans up the cl struct a bit by only having one source of
knowing if we should pause for both CSQC and opening the console or menu

These changes will help eventually move the client and server frame code
to their own functions (CL_Frame and SV_Frame respectively).

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12800 d7cf8633-e32d-0410-b094-e92efae38249

2 hours agocsqc: Minor refactor of a few functions
cloudwalk [Mon, 13 Jul 2020 16:00:10 +0000 (16:00 +0000)]
csqc: Minor refactor of a few functions

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12799 d7cf8633-e32d-0410-b094-e92efae38249

2 hours agohost: Add "restless" variable to host_t. True means don't sleep (timedemo, etc)
cloudwalk [Mon, 13 Jul 2020 16:00:10 +0000 (16:00 +0000)]
host: Add "restless" variable to host_t. True means don't sleep (timedemo, etc)

This is meant to reduce client code in the common Host_Main.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12798 d7cf8633-e32d-0410-b094-e92efae38249

2 hours agobsp: Merge Q1/Q2 LoadSubmodels into one func. The differences were negligible
cloudwalk [Mon, 13 Jul 2020 16:00:09 +0000 (16:00 +0000)]
bsp: Merge Q1/Q2 LoadSubmodels into one func. The differences were negligible

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12797 d7cf8633-e32d-0410-b094-e92efae38249

2 hours agobsp: Rename a few more functions that are used by more than one BSP format
cloudwalk [Mon, 13 Jul 2020 16:00:09 +0000 (16:00 +0000)]
bsp: Rename a few more functions that are used by more than one BSP format

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12796 d7cf8633-e32d-0410-b094-e92efae38249

2 days agoImprove clang support. Add tcc support. Clang builds now perform as good as gcc
cloudwalk [Sat, 11 Jul 2020 01:51:42 +0000 (01:51 +0000)]
Improve clang support. Add tcc support. Clang builds now perform as good as gcc

tcc builds perform like crap, but it's nice to support a fourth
compiler. There is an issue on Linux with a Pulseaudio library not
linking correctly, however.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12795 d7cf8633-e32d-0410-b094-e92efae38249

4 days agoprvm: Implement integer and pointer opcodes
cloudwalk [Thu, 9 Jul 2020 16:58:43 +0000 (16:58 +0000)]
prvm: Implement integer and pointer opcodes

NOTE: At the time of this commit, gmqcc does not generate these opcodes.
Only fteqcc does. These may be unstable or incomplete. Do not use in
production yet.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12794 d7cf8633-e32d-0410-b094-e92efae38249

4 days agoRefactor the model loading code to use an array of structs for each format
cloudwalk [Thu, 9 Jul 2020 16:58:42 +0000 (16:58 +0000)]
Refactor the model loading code to use an array of structs for each format

Allows to cleanly and explicitly define a model and what the loader
should look for.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12793 d7cf8633-e32d-0410-b094-e92efae38249

4 days agoRename model functions to make them more generic and obvious what they're for
cloudwalk [Thu, 9 Jul 2020 16:58:41 +0000 (16:58 +0000)]
Rename model functions to make them more generic and obvious what they're for

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12792 d7cf8633-e32d-0410-b094-e92efae38249

4 days agocommon: Add game "DOOMBRINGER"
cloudwalk [Thu, 9 Jul 2020 16:58:41 +0000 (16:58 +0000)]
common: Add game "DOOMBRINGER"

Patch submitted by kristus <kristustf@gmail.com>

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12791 d7cf8633-e32d-0410-b094-e92efae38249

6 days agoRevert "Fix texture load failure not printing"
cloudwalk [Tue, 7 Jul 2020 00:10:57 +0000 (00:10 +0000)]
Revert "Fix texture load failure not printing"

This reverts commit 6011b7190e2a711d1a46d0389d8c0c7ff7e5ef22.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12790 d7cf8633-e32d-0410-b094-e92efae38249

6 days agoUgly hack to fix skybox textures being loaded as MATERIALFLAG_WALL in Q1BSP
cloudwalk [Tue, 7 Jul 2020 00:07:53 +0000 (00:07 +0000)]
Ugly hack to fix skybox textures being loaded as MATERIALFLAG_WALL in Q1BSP

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12789 d7cf8633-e32d-0410-b094-e92efae38249

7 days agoFix loading of external Q1BSP textures. Does not fix skybox. Causes console spam
cloudwalk [Mon, 6 Jul 2020 12:45:55 +0000 (12:45 +0000)]
Fix loading of external Q1BSP textures. Does not fix skybox. Causes console spam

These two are separate known issues.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12788 d7cf8633-e32d-0410-b094-e92efae38249

8 days agoFix nasty typo in a dpsnprintf causing truncated cmds. Memory safety? PFFT (/s)
cloudwalk [Sun, 5 Jul 2020 12:38:38 +0000 (12:38 +0000)]
Fix nasty typo in a dpsnprintf causing truncated cmds. Memory safety? PFFT (/s)

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12787 d7cf8633-e32d-0410-b094-e92efae38249

9 days agoFix Windows build of sys_unix.c
cloudwalk [Sat, 4 Jul 2020 14:09:37 +0000 (14:09 +0000)]
Fix Windows build of sys_unix.c

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12786 d7cf8633-e32d-0410-b094-e92efae38249

9 days agoRename parameter of SV_SpawnServer for clarity
cloudwalk [Sat, 4 Jul 2020 14:09:36 +0000 (14:09 +0000)]
Rename parameter of SV_SpawnServer for clarity

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12785 d7cf8633-e32d-0410-b094-e92efae38249

9 days agoMake cl_video_libavw.c a regular C file like the rest. Create a .h counterpart
cloudwalk [Sat, 4 Jul 2020 14:09:36 +0000 (14:09 +0000)]
Make cl_video_libavw.c a regular C file like the rest. Create a .h counterpart

Also updated some variables since anything before MSVC 2013 is pretty
much obsolete, and the rationale for not using stdint.h is therefore out
of date.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12784 d7cf8633-e32d-0410-b094-e92efae38249

9 days agoRename sys_linux.c to sys_unix.c, which is more accurate.
cloudwalk [Sat, 4 Jul 2020 14:09:35 +0000 (14:09 +0000)]
Rename sys_linux.c to sys_unix.c, which is more accurate.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12783 d7cf8633-e32d-0410-b094-e92efae38249

9 days agoMove host_client to serverside, where it belongs.
cloudwalk [Sat, 4 Jul 2020 14:09:34 +0000 (14:09 +0000)]
Move host_client to serverside, where it belongs.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12782 d7cf8633-e32d-0410-b094-e92efae38249

9 days agoRename q3shaderinfo_t to shader_t, to be in line with other engines
cloudwalk [Sat, 4 Jul 2020 14:09:34 +0000 (14:09 +0000)]
Rename q3shaderinfo_t to shader_t, to be in line with other engines

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12781 d7cf8633-e32d-0410-b094-e92efae38249

9 days agoRename entframe files
cloudwalk [Sat, 4 Jul 2020 14:09:32 +0000 (14:09 +0000)]
Rename entframe files

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12780 d7cf8633-e32d-0410-b094-e92efae38249

10 days agoConvert \ to / when loading texture from Q3 shader
cloudwalk [Thu, 2 Jul 2020 22:15:03 +0000 (22:15 +0000)]
Convert \ to / when loading texture from Q3 shader

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12779 d7cf8633-e32d-0410-b094-e92efae38249

10 days agoFix texture load failure not printing
cloudwalk [Thu, 2 Jul 2020 19:29:22 +0000 (19:29 +0000)]
Fix texture load failure not printing

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12778 d7cf8633-e32d-0410-b094-e92efae38249

11 days agoFix trailing space in "cmd" not connected message. Make a vabuf MAX_INPUTLINE
cloudwalk [Thu, 2 Jul 2020 17:19:38 +0000 (17:19 +0000)]
Fix trailing space in "cmd" not connected message. Make a vabuf MAX_INPUTLINE

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12777 d7cf8633-e32d-0410-b094-e92efae38249

11 days ago(Round 3 - Final) Break up protocol.c.
cloudwalk [Thu, 2 Jul 2020 17:19:37 +0000 (17:19 +0000)]
(Round 3 - Final) Break up protocol.c.

entframe functions are now on their own side of the engine.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12776 d7cf8633-e32d-0410-b094-e92efae38249

11 days agoDon't Mod_BuildTextureVectorsFromNormals if 2D. 5-10% performance improvement
cloudwalk [Thu, 2 Jul 2020 13:37:13 +0000 (13:37 +0000)]
Don't Mod_BuildTextureVectorsFromNormals if 2D. 5-10% performance improvement

This is likely not needed for 2D and there doesn't appear to be any
defects, visual or otherwise.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12775 d7cf8633-e32d-0410-b094-e92efae38249

11 days agoCreate a pointer to globals to reduce instructions needed to deref operand vars
cloudwalk [Thu, 2 Jul 2020 13:37:12 +0000 (13:37 +0000)]
Create a pointer to globals to reduce instructions needed to deref operand vars

This should improve performance in debug builds, but is otherwise
optimized in release.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12774 d7cf8633-e32d-0410-b094-e92efae38249

11 days ago(Round 2) Break up protocol.c
cloudwalk [Thu, 2 Jul 2020 04:09:29 +0000 (04:09 +0000)]
(Round 2) Break up protocol.c

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12773 d7cf8633-e32d-0410-b094-e92efae38249

11 days ago(Round 1) Break up protocol.c
cloudwalk [Wed, 1 Jul 2020 19:39:50 +0000 (19:39 +0000)]
(Round 1) Break up protocol.c

Different entframe functions for different protocols warrant separate
files for maintainability and readability purposes.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12772 d7cf8633-e32d-0410-b094-e92efae38249

11 days agoDon't let a full server frame occur before sending input events to the server
cloudwalk [Wed, 1 Jul 2020 18:58:22 +0000 (18:58 +0000)]
Don't let a full server frame occur before sending input events to the server

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12771 d7cf8633-e32d-0410-b094-e92efae38249

12 days agoTell clients to reconnect before loading the next map. Should fix lag/stutter
cloudwalk [Wed, 1 Jul 2020 16:18:20 +0000 (16:18 +0000)]
Tell clients to reconnect before loading the next map. Should fix lag/stutter

There is a noticable stutter/connection loss/lag when changing level in
some games, notably Xonotic. This is likely because the server already
started loading the world before telling clients to reconnect, which can
be an expensive process depending on the map.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12770 d7cf8633-e32d-0410-b094-e92efae38249

12 days agoImplement csqc "effect" builtin
cloudwalk [Wed, 1 Jul 2020 16:18:19 +0000 (16:18 +0000)]
Implement csqc "effect" builtin

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12769 d7cf8633-e32d-0410-b094-e92efae38249

12 days agoUse double for freetime in edict_engineprivate_t and prvm_edict_private_t
cloudwalk [Wed, 1 Jul 2020 16:18:18 +0000 (16:18 +0000)]
Use double for freetime in edict_engineprivate_t and prvm_edict_private_t

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12768 d7cf8633-e32d-0410-b094-e92efae38249

12 days agoFix rcon
cloudwalk [Wed, 1 Jul 2020 16:18:18 +0000 (16:18 +0000)]
Fix rcon

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12767 d7cf8633-e32d-0410-b094-e92efae38249

12 days ago(Round 7) host_cmd.c is no more. Last remaining cmds/cvars moved.
cloudwalk [Wed, 1 Jul 2020 01:58:39 +0000 (01:58 +0000)]
(Round 7) host_cmd.c is no more. Last remaining cmds/cvars moved.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12766 d7cf8633-e32d-0410-b094-e92efae38249

12 days agoReset tempstringsbuf when progs are reset. Fixes possible memory leak in CSQC(?)
cloudwalk [Tue, 30 Jun 2020 19:21:50 +0000 (19:21 +0000)]
Reset tempstringsbuf when progs are reset. Fixes possible memory leak in CSQC(?)

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12765 d7cf8633-e32d-0410-b094-e92efae38249

13 days agoAlphabetical order fix
cloudwalk [Tue, 30 Jun 2020 17:31:30 +0000 (17:31 +0000)]
Alphabetical order fix

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12764 d7cf8633-e32d-0410-b094-e92efae38249

13 days agoAdd cl_cmd.c to vs projects
cloudwalk [Tue, 30 Jun 2020 17:29:50 +0000 (17:29 +0000)]
Add cl_cmd.c to vs projects

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12763 d7cf8633-e32d-0410-b094-e92efae38249

13 days ago(Round 6) Break up host_cmd.c
cloudwalk [Tue, 30 Jun 2020 17:28:21 +0000 (17:28 +0000)]
(Round 6) Break up host_cmd.c

Introduce cl_cmd.c. Move several commands and cvars to it.
Renamed Cmd_ForwardToServer prefixes to CL_ and moved them to cl_cmd.c

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12762 d7cf8633-e32d-0410-b094-e92efae38249

13 days agoFix broken recoil with r_stereo
cloudwalk [Tue, 30 Jun 2020 15:00:02 +0000 (15:00 +0000)]
Fix broken recoil with r_stereo

Patch by Gustaf Alhäll

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12761 d7cf8633-e32d-0410-b094-e92efae38249

13 days agoAdd PEDANTIC and CONFIG_PEDANTIC to compile as standard c11 if desired.
cloudwalk [Tue, 30 Jun 2020 15:00:02 +0000 (15:00 +0000)]
Add PEDANTIC and CONFIG_PEDANTIC to compile as standard c11 if desired.

make <target> [-jN] PEDANTIC=1

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12760 d7cf8633-e32d-0410-b094-e92efae38249

13 days agoDisable PRVM_64 until it can be developed further. Improves perf. in some cases
cloudwalk [Tue, 30 Jun 2020 15:00:01 +0000 (15:00 +0000)]
Disable PRVM_64 until it can be developed further. Improves perf. in some cases

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12759 d7cf8633-e32d-0410-b094-e92efae38249

13 days agoFix remaining warnings
cloudwalk [Tue, 30 Jun 2020 05:10:51 +0000 (05:10 +0000)]
Fix remaining warnings

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12758 d7cf8633-e32d-0410-b094-e92efae38249

13 days agoAdd EOF newlines
cloudwalk [Tue, 30 Jun 2020 05:10:49 +0000 (05:10 +0000)]
Add EOF newlines

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12757 d7cf8633-e32d-0410-b094-e92efae38249

13 days agoComply with ISO C11. Engine will now compile with -pedantic, w/o extra warnings
cloudwalk [Tue, 30 Jun 2020 05:10:48 +0000 (05:10 +0000)]
Comply with ISO C11. Engine will now compile with -pedantic, w/o extra warnings

But don't actually use -std=c11 because computed gotos is a gcc
extension that makes the QCVM 30 percent faster in all situations.
c11 obviously disables gcc extensions. But this is a nice thing to
achieve as far as portability is concerned.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12756 d7cf8633-e32d-0410-b094-e92efae38249

13 days agoAdd -Winline flag
cloudwalk [Tue, 30 Jun 2020 05:10:47 +0000 (05:10 +0000)]
Add -Winline flag

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12755 d7cf8633-e32d-0410-b094-e92efae38249

2 weeks agoImplement standards-compliant chat input editing functionality
cloudwalk [Mon, 29 Jun 2020 03:21:08 +0000 (03:21 +0000)]
Implement standards-compliant chat input editing functionality

Contributed by terencehill.

This, among other things, implements Key_Parse_CommonKeys, which
replaces Key_Console and unifies key handling code.

It's now possible to:
* move cursor to an arbitrary position with rightarrow/leftarrow and insert text
* paste text with ctrl-v
* enable insert mode with the Insert key
* clear the whole message with ctrl-u
* move to the beginning/end of the message with home/end
* move to the previous/next word with ctrl-rightarrow/leftarrow
* move to the previous/next character ignoring colors with shift-rightarrow/leftarrow

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12754 d7cf8633-e32d-0410-b094-e92efae38249

2 weeks agoMove abortframe to top of host_t to avoid struct alignment warning with MSVC
cloudwalk [Mon, 29 Jun 2020 03:21:08 +0000 (03:21 +0000)]
Move abortframe to top of host_t to avoid struct alignment warning with MSVC

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12753 d7cf8633-e32d-0410-b094-e92efae38249

2 weeks agoAdd -Wc++-compat flag and fix its sole warning. This *should* be safe.
cloudwalk [Mon, 29 Jun 2020 03:21:07 +0000 (03:21 +0000)]
Add -Wc++-compat flag and fix its sole warning. This *should* be safe.

Famous last words...

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12752 d7cf8633-e32d-0410-b094-e92efae38249

2 weeks agoUse PRIx64 in C++-friendly form
cloudwalk [Mon, 29 Jun 2020 03:21:07 +0000 (03:21 +0000)]
Use PRIx64 in C++-friendly form

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12751 d7cf8633-e32d-0410-b094-e92efae38249

2 weeks agoAdd -Wshadow cflag and eliminate its warnings, including with g++
cloudwalk [Mon, 29 Jun 2020 03:21:06 +0000 (03:21 +0000)]
Add -Wshadow cflag and eliminate its warnings, including with g++

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12750 d7cf8633-e32d-0410-b094-e92efae38249

2 weeks agoRename render_modellight_lightdir to render_modellight_lightdir_world and add a _loca...
havoc [Mon, 29 Jun 2020 00:16:58 +0000 (00:16 +0000)]
Rename render_modellight_lightdir to render_modellight_lightdir_world and add a _local variant, which is transformed into entity space, so that rotating entities are lit correctly.

Thanks to kristus for persistently reporting this bug until it was understood.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12749 d7cf8633-e32d-0410-b094-e92efae38249

2 weeks agoFix compiling in VS2019 - wrong include syntax for local includes.
havoc [Mon, 29 Jun 2020 00:09:50 +0000 (00:09 +0000)]
Fix compiling in VS2019 - wrong include syntax for local includes.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12748 d7cf8633-e32d-0410-b094-e92efae38249

2 weeks agoFix snd_xmp.c compiling in VS2019 - can't have empty structs.
havoc [Mon, 29 Jun 2020 00:07:39 +0000 (00:07 +0000)]
Fix snd_xmp.c compiling in VS2019 - can't have empty structs.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12747 d7cf8633-e32d-0410-b094-e92efae38249

2 weeks agoFix some warnings found by cppcheck
cloudwalk [Sat, 27 Jun 2020 21:32:00 +0000 (21:32 +0000)]
Fix some warnings found by cppcheck

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12746 d7cf8633-e32d-0410-b094-e92efae38249

2 weeks agoFix playermodel fallback failing on Xonotic, allowing invisible playermodel
cloudwalk [Sat, 27 Jun 2020 21:31:59 +0000 (21:31 +0000)]
Fix playermodel fallback failing on Xonotic, allowing invisible playermodel

Added CVAR_SERVER flag to playermodel (and playerskin for good measure).

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12745 d7cf8633-e32d-0410-b094-e92efae38249

2 weeks agoRemove Con_Warnf and Errorf. Use macros to change color and identify the message
cloudwalk [Sat, 27 Jun 2020 04:29:43 +0000 (04:29 +0000)]
Remove Con_Warnf and Errorf. Use macros to change color and identify the message

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12744 d7cf8633-e32d-0410-b094-e92efae38249

2 weeks agoImplement RGBstring_to_colorindex to simplify code (terencehill)
cloudwalk [Sat, 27 Jun 2020 02:27:22 +0000 (02:27 +0000)]
Implement RGBstring_to_colorindex to simplify code (terencehill)

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12743 d7cf8633-e32d-0410-b094-e92efae38249

2 weeks agoFix client version of ambientsound
cloudwalk [Sat, 27 Jun 2020 02:27:22 +0000 (02:27 +0000)]
Fix client version of ambientsound

It was getting values from the wrong parameter fields. They should be

Fix by terencehill

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12742 d7cf8633-e32d-0410-b094-e92efae38249

2 weeks agoCorrect typo in builtin description comment, found by terencehill
cloudwalk [Sat, 27 Jun 2020 02:27:21 +0000 (02:27 +0000)]
Correct typo in builtin description comment, found by terencehill

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12741 d7cf8633-e32d-0410-b094-e92efae38249

2 weeks agoFix buffer position check
cloudwalk [Sat, 27 Jun 2020 02:27:21 +0000 (02:27 +0000)]
Fix buffer position check

Fix by terencehill

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12740 d7cf8633-e32d-0410-b094-e92efae38249

2 weeks agoAdd missing builtin to menudefs.qc, discovered by terencehill
cloudwalk [Sat, 27 Jun 2020 02:27:20 +0000 (02:27 +0000)]
Add missing builtin to menudefs.qc, discovered by terencehill

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12739 d7cf8633-e32d-0410-b094-e92efae38249

2 weeks agoIn Nicks_CompleteCountPossible, use MAX_SCOREBOARDNAME for buffer size
cloudwalk [Sat, 27 Jun 2020 02:27:20 +0000 (02:27 +0000)]
In Nicks_CompleteCountPossible, use MAX_SCOREBOARDNAME for buffer size

Prevents potential buffer overflow.

Fix by terencehill

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12738 d7cf8633-e32d-0410-b094-e92efae38249

2 weeks agoDynamically specify float precision when QC sets cvars. Fixes rounding errors
cloudwalk [Sat, 27 Jun 2020 02:27:19 +0000 (02:27 +0000)]
Dynamically specify float precision when QC sets cvars. Fixes rounding errors

Fix by terencehill

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12737 d7cf8633-e32d-0410-b094-e92efae38249

2 weeks agoWrap cvar callback around ifdef
cloudwalk [Sat, 27 Jun 2020 02:27:19 +0000 (02:27 +0000)]
Wrap cvar callback around ifdef

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12736 d7cf8633-e32d-0410-b094-e92efae38249

2 weeks agoCall cvar callbacks after the cvar is set. Potentially fixes heap corruption.
cloudwalk [Sat, 27 Jun 2020 02:27:18 +0000 (02:27 +0000)]
Call cvar callbacks after the cvar is set. Potentially fixes heap corruption.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12735 d7cf8633-e32d-0410-b094-e92efae38249

2 weeks agoFix null pointer crash when unsetting a cvar.
cloudwalk [Thu, 25 Jun 2020 15:18:15 +0000 (15:18 +0000)]
Fix null pointer crash when unsetting a cvar.

When fixing up cvars to use the new "hash" table, I got the logic in
Cvar_FindVarLink wrong. That has been fixed.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12734 d7cf8633-e32d-0410-b094-e92efae38249

2 weeks agoRevert "Use double for cvar values. Fixes a number of bugs caused by atof precision...
cloudwalk [Thu, 25 Jun 2020 14:34:45 +0000 (14:34 +0000)]
Revert "Use double for cvar values. Fixes a number of bugs caused by atof precision loss"

This reverts commit eed1ea81a1b9b9c04fad76b3f1bfeec6ea9c44db.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12733 d7cf8633-e32d-0410-b094-e92efae38249

2 weeks agoUse double for cvar values. Fixes a number of bugs caused by atof precision loss
cloudwalk [Wed, 24 Jun 2020 16:48:10 +0000 (16:48 +0000)]
Use double for cvar values. Fixes a number of bugs caused by atof precision loss

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12732 d7cf8633-e32d-0410-b094-e92efae38249

2 weeks agoTypo
cloudwalk [Wed, 24 Jun 2020 15:47:37 +0000 (15:47 +0000)]

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12731 d7cf8633-e32d-0410-b094-e92efae38249

2 weeks agoActually fix color not being applied correctly
cloudwalk [Wed, 24 Jun 2020 15:39:07 +0000 (15:39 +0000)]
Actually fix color not being applied correctly

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12730 d7cf8633-e32d-0410-b094-e92efae38249

2 weeks agoFix color not applying correctly
cloudwalk [Wed, 24 Jun 2020 15:19:56 +0000 (15:19 +0000)]
Fix color not applying correctly

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12729 d7cf8633-e32d-0410-b094-e92efae38249

2 weeks agoFix remnants of fog being applied to UIs
cloudwalk [Wed, 24 Jun 2020 14:15:20 +0000 (14:15 +0000)]
Fix remnants of fog being applied to UIs

Thanks to nico for reporting this

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12728 d7cf8633-e32d-0410-b094-e92efae38249

2 weeks agoDon't apply gl_lightmaps to UI elements
cloudwalk [Wed, 24 Jun 2020 13:47:02 +0000 (13:47 +0000)]
Don't apply gl_lightmaps to UI elements

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12727 d7cf8633-e32d-0410-b094-e92efae38249

2 weeks agoRemove hack in changelevel
cloudwalk [Wed, 24 Jun 2020 13:47:01 +0000 (13:47 +0000)]
Remove hack in changelevel

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12726 d7cf8633-e32d-0410-b094-e92efae38249

2 weeks ago(Round 5) Break up host_cmd.c
cloudwalk [Wed, 24 Jun 2020 13:47:01 +0000 (13:47 +0000)]
(Round 5) Break up host_cmd.c

name, color, rate, and rate_burstsize commands

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12725 d7cf8633-e32d-0410-b094-e92efae38249

2 weeks agoDon't lerp nailgun and super nailgun. Trades smoothness for better muzzle flash
cloudwalk [Wed, 24 Jun 2020 01:03:59 +0000 (01:03 +0000)]
Don't lerp nailgun and super nailgun. Trades smoothness for better muzzle flash

Added a cvar to define models that should not be lerped. Taken from

Todo: Use a proper EF_ flag

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12724 d7cf8633-e32d-0410-b094-e92efae38249

2 weeks agoImplement classic Quake-style weapon bobbing. Enable by default for Quake.
cloudwalk [Wed, 24 Jun 2020 01:03:33 +0000 (01:03 +0000)]
Implement classic Quake-style weapon bobbing. Enable by default for Quake.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12723 d7cf8633-e32d-0410-b094-e92efae38249

2 weeks agoEradicated the CVAR_NQUSERINFOHACK flag, for good
cloudwalk [Tue, 23 Jun 2020 03:54:38 +0000 (03:54 +0000)]
Eradicated the CVAR_NQUSERINFOHACK flag, for good

This is a massive commit, admittedly. But pretty much every single
change goes together and this could not be split up, unfortunately.

I implemented a few new functions and turned a lot of the userinfo keys
into cvars, just like their QW counterparts. CMD_INITWAIT is also gone
and replaced by CMD_USERINFO to denote special server-from-client
commands that specifically change a userinfo string of a given client.

I'm sure there's a cleaner way to do this, especially the holy callback
trinity I implemented to avoid an infinite loop when synchronizing
topcolor and bottomcolor with _cl_color and vice versa. But, if this
gets rid of decade old legacy cruft, and makes it all easier to maintain
down the road, that's a plus for me.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12722 d7cf8633-e32d-0410-b094-e92efae38249

2 weeks ago(Round 4) Break up host_cmd.c
cloudwalk [Tue, 23 Jun 2020 03:54:29 +0000 (03:54 +0000)]
(Round 4) Break up host_cmd.c

reconnect and disconnect commands

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12721 d7cf8633-e32d-0410-b094-e92efae38249

3 weeks ago(Round 3) Break up host_cmd.c
cloudwalk [Mon, 22 Jun 2020 15:36:12 +0000 (15:36 +0000)]
(Round 3) Break up host_cmd.c

The quit and version commands.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12720 d7cf8633-e32d-0410-b094-e92efae38249

3 weeks ago(Round 2) Break up host_cmd.c
cloudwalk [Mon, 22 Jun 2020 15:31:55 +0000 (15:31 +0000)]
(Round 2) Break up host_cmd.c

This time, demo code. Some parts of demo code were littered in cl_main.c
as well, and have been moved.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12719 d7cf8633-e32d-0410-b094-e92efae38249

3 weeks ago(Round 1) Break up host_cmd.c
cloudwalk [Mon, 22 Jun 2020 15:16:13 +0000 (15:16 +0000)]
(Round 1) Break up host_cmd.c

Massive move operation of pretty much every single SV_ function.
There are some functions that are dual server and client in purpose that
need to be broken up, but that will require manual effort other than
mere copying.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12718 d7cf8633-e32d-0410-b094-e92efae38249

3 weeks agoFirst massive rename and move
cloudwalk [Mon, 22 Jun 2020 15:15:49 +0000 (15:15 +0000)]
First massive rename and move

A lot of these functions belong on their respective side of the engine.
host.c and host_cmd.c appear to be a dumping ground for misc functions
that Quakeworld engines have a proper place for. This is part of the
moving operation. There's still plenty more functions that need to be
put in their respective places.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12717 d7cf8633-e32d-0410-b094-e92efae38249

3 weeks agoMove Sys_InitConsole to Con_Init
cloudwalk [Mon, 22 Jun 2020 15:15:22 +0000 (15:15 +0000)]
Move Sys_InitConsole to Con_Init

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12716 d7cf8633-e32d-0410-b094-e92efae38249

3 weeks agoConsolidate FS_Init and associated code
cloudwalk [Mon, 22 Jun 2020 15:14:57 +0000 (15:14 +0000)]
Consolidate FS_Init and associated code

This is a minor cleanup to make refactoring Host_Init
slightly easier later.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12715 d7cf8633-e32d-0410-b094-e92efae38249

3 weeks agoChange prefix of cmds in host_cmd.c to match the side of the engine they belong
cloudwalk [Mon, 22 Jun 2020 15:14:32 +0000 (15:14 +0000)]
Change prefix of cmds in host_cmd.c to match the side of the engine they belong

SV commands get the SV_ prefix. CL commands get CL_.

They will be moved later.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12714 d7cf8633-e32d-0410-b094-e92efae38249

3 weeks agoPartially revert r12699 pending better solution
cloudwalk [Sun, 21 Jun 2020 20:39:05 +0000 (20:39 +0000)]
Partially revert r12699 pending better solution

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12713 d7cf8633-e32d-0410-b094-e92efae38249

3 weeks agoNot sure how these didn't make it into the last commit
cloudwalk [Sun, 21 Jun 2020 20:29:19 +0000 (20:29 +0000)]
Not sure how these didn't make it into the last commit

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12712 d7cf8633-e32d-0410-b094-e92efae38249

3 weeks agoAdd process nice settings to the sys struct
cloudwalk [Sun, 21 Jun 2020 19:55:11 +0000 (19:55 +0000)]
Add process nice settings to the sys struct

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12711 d7cf8633-e32d-0410-b094-e92efae38249

3 weeks agoMerge Cmd_Init_Commands into Cmd_Init
cloudwalk [Sun, 21 Jun 2020 19:54:46 +0000 (19:54 +0000)]
Merge Cmd_Init_Commands into Cmd_Init

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12710 d7cf8633-e32d-0410-b094-e92efae38249

3 weeks agoRevert "Initialize console commands and cvars before anything else"
cloudwalk [Sun, 21 Jun 2020 19:54:20 +0000 (19:54 +0000)]
Revert "Initialize console commands and cvars before anything else"

This reverts commit c29be2ab7e92f63b899fcc6ac5a2db1ac6707f12.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12709 d7cf8633-e32d-0410-b094-e92efae38249

3 weeks agoPut the loading plaque back in Host_Main for now, so resolution is unbroken
cloudwalk [Sat, 20 Jun 2020 15:40:08 +0000 (15:40 +0000)]
Put the loading plaque back in Host_Main for now, so resolution is unbroken

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12708 d7cf8633-e32d-0410-b094-e92efae38249

3 weeks agoAdd missing parens around inline assignment. Fixes +vid_* options in VID_Start
cloudwalk [Sat, 20 Jun 2020 14:52:15 +0000 (14:52 +0000)]
Add missing parens around inline assignment. Fixes +vid_* options in VID_Start

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12707 d7cf8633-e32d-0410-b094-e92efae38249

3 weeks agoInitialize console commands and cvars before anything else
cloudwalk [Sat, 20 Jun 2020 14:51:49 +0000 (14:51 +0000)]
Initialize console commands and cvars before anything else

The idea is to divide initialization into stages. I'm starting with
cvars and commands. Next will be memory allocations.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12706 d7cf8633-e32d-0410-b094-e92efae38249

3 weeks agoRemove commented out code/unused prototype
cloudwalk [Sat, 20 Jun 2020 03:30:00 +0000 (03:30 +0000)]
Remove commented out code/unused prototype

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12705 d7cf8633-e32d-0410-b094-e92efae38249