]> git.rm.cloudns.org Git - xonotic/darkplaces.git/log
xonotic/darkplaces.git
4 years agohost: Shutdown client-only subsystems in CL_Shutdown.
cloudwalk [Wed, 15 Jul 2020 02:44:18 +0000 (02:44 +0000)]
host: Shutdown client-only subsystems in CL_Shutdown.

This fixes an issue where darkplaces_history.txt was being generated on
dedicated servers but wasn't actually being used.

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

4 years agosv_ccmds: In status cmd, print IPs to loopback client
cloudwalk [Wed, 15 Jul 2020 02:44:18 +0000 (02:44 +0000)]
sv_ccmds: In status cmd, print IPs to loopback client

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

4 years agohost: Remove redundant check
cloudwalk [Wed, 15 Jul 2020 02:44:17 +0000 (02:44 +0000)]
host: Remove redundant check

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

4 years agohost: Sleep at the end of the frame. Receive packets during server frame.
cloudwalk [Wed, 15 Jul 2020 02:44:16 +0000 (02:44 +0000)]
host: Sleep at the end of the frame. Receive packets during server frame.

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

4 years agohost: Remove redundant check. Only the bigger of these are going to be picked
cloudwalk [Wed, 15 Jul 2020 02:44:16 +0000 (02:44 +0000)]
host: Remove redundant check. Only the bigger of these are going to be picked

cl_timer shouldn't move at all under a dedicated server and sv_timer
shouldn't move if not hosting a server.

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

4 years agohost: Adjust timers at the end of each client or server frame, and other tweaks
cloudwalk [Wed, 15 Jul 2020 02:44:15 +0000 (02:44 +0000)]
host: Adjust timers at the end of each client or server frame, and other tweaks

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

4 years agosys_shared: Remove #ifdef for VERY old and obsolete compiler...
cloudwalk [Wed, 15 Jul 2020 02:44:15 +0000 (02:44 +0000)]
sys_shared: Remove #ifdef for VERY old and obsolete compiler...

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

4 years agoprvm: Fix multiple int opcode issues reported by Spoike
cloudwalk [Wed, 15 Jul 2020 02:44:14 +0000 (02:44 +0000)]
prvm: Fix multiple int opcode issues reported by Spoike

A lot of these are boolean opcodes and should return a bool (int).

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

4 years agohost: Move server perf code to server frame code
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

4 years 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

4 years 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

4 years 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

4 years 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

4 years 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

4 years 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

4 years 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

4 years 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

4 years 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 years 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 years 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 years 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 years 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

4 years 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

4 years 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

4 years 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

4 years 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

4 years 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

4 years 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

4 years 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

4 years 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

4 years 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

4 years 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

4 years 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

4 years 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

4 years 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

4 years 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

4 years 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

4 years 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

4 years 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

4 years 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

4 years 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

4 years 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

4 years 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

4 years 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

4 years 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

4 years 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

4 years 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

4 years 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

4 years 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

4 years 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

4 years 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

4 years 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
https://gitlab.com/xonotic/darkplaces/-/merge_requests/50

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

4 years 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.

Usage:
make <target> [-jN] PEDANTIC=1

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

4 years 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

4 years 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

4 years 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

4 years 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

4 years 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

4 years 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

4 years 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

4 years 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

4 years 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

4 years 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

4 years 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

4 years 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

4 years 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

4 years 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

4 years 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

4 years 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

4 years 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

4 years 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
switched.

Fix by terencehill

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

4 years 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

4 years 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

4 years 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

4 years 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

4 years 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

4 years 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

4 years 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

4 years 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

4 years 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

4 years 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

4 years agoTypo
cloudwalk [Wed, 24 Jun 2020 15:47:37 +0000 (15:47 +0000)]
Typo

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

4 years 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

4 years 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

4 years 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

4 years 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

4 years 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

4 years 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

4 years 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
Quakespasm.

Todo: Use a proper EF_ flag

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

4 years 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

4 years 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

4 years 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

4 years 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

4 years 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

4 years 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

4 years 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

4 years 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

4 years 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

4 years 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

4 years 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