]> git.xonotic.org Git - xonotic/darkplaces.git/log
xonotic/darkplaces.git
3 years agoclient: Move host prototypes to host.h
cloudwalk [Tue, 29 Sep 2020 19:19:02 +0000 (19:19 +0000)]
client: Move host prototypes to host.h

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

3 years agoclient: Move r_refdef structs and renderer prototypes to render.h
cloudwalk [Tue, 29 Sep 2020 19:19:01 +0000 (19:19 +0000)]
client: Move r_refdef structs and renderer prototypes to render.h

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

3 years agomakefile: Delete precompiled headers (.gch) with clean
cloudwalk [Tue, 29 Sep 2020 00:34:51 +0000 (00:34 +0000)]
makefile: Delete precompiled headers (.gch) with clean

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

3 years agoAdd qdefs.h and qstats.h to split up quakedef.h. Make a lot of headers standalone...
cloudwalk [Tue, 29 Sep 2020 00:33:16 +0000 (00:33 +0000)]
Add qdefs.h and qstats.h to split up quakedef.h. Make a lot of headers standalone-compilable.

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

3 years ago.gitignore: Exclude precompiled headers (*.gch)
cloudwalk [Tue, 29 Sep 2020 00:33:15 +0000 (00:33 +0000)]
.gitignore: Exclude precompiled headers (*.gch)

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

3 years agolist: Add missing include guards.
cloudwalk [Tue, 29 Sep 2020 00:33:14 +0000 (00:33 +0000)]
list: Add missing include guards.

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

3 years agohost: Introduce host.h and use it, instead of quakedef.h
cloudwalk [Tue, 29 Sep 2020 00:33:14 +0000 (00:33 +0000)]
host: Introduce host.h and use it, instead of quakedef.h

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

3 years agohost: Make Host_Quit_f static. Avoid calling it directly.
cloudwalk [Tue, 29 Sep 2020 00:33:13 +0000 (00:33 +0000)]
host: Make Host_Quit_f static. Avoid calling it directly.

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

3 years agoserver: Move remaining server functions out of quakedef.h
cloudwalk [Tue, 29 Sep 2020 00:33:13 +0000 (00:33 +0000)]
server: Move remaining server functions out of quakedef.h

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

3 years agocl_main: Make reconnect's function static and remove its prototype.
cloudwalk [Tue, 29 Sep 2020 00:33:12 +0000 (00:33 +0000)]
cl_main: Make reconnect's function static and remove its prototype.

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

3 years agocmd: Update defer command to allocate the same as Cmd_ParseText
cloudwalk [Mon, 28 Sep 2020 14:48:42 +0000 (14:48 +0000)]
cmd: Update defer command to allocate the same as Cmd_ParseText

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

3 years agocl_main: Delete comment
cloudwalk [Sun, 27 Sep 2020 00:19:36 +0000 (00:19 +0000)]
cl_main: Delete comment

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

3 years agocl_main: Disconnect when connection is established, only if we're already connected
cloudwalk [Sun, 27 Sep 2020 00:14:27 +0000 (00:14 +0000)]
cl_main: Disconnect when connection is established, only if we're already connected

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

3 years agocl_main: Disconnect only if we're connected or playing a demo. Fixes Steel Storm...
cloudwalk [Sat, 26 Sep 2020 21:35:56 +0000 (21:35 +0000)]
cl_main: Disconnect only if we're connected or playing a demo. Fixes Steel Storm main menu music cutting out.

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

3 years agocmd: Fix buffer overflow in cbuf causing Steel Storm crash if the gamedir is the...
cloudwalk [Sat, 26 Sep 2020 21:11:37 +0000 (21:11 +0000)]
cmd: Fix buffer overflow in cbuf causing Steel Storm crash if the gamedir is the same as the homedir

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

3 years agoview: Restore all of the bobmodel cvars to their original defaults. They're ignored...
cloudwalk [Sat, 26 Sep 2020 21:11:36 +0000 (21:11 +0000)]
view: Restore all of the bobmodel cvars to their original defaults. They're ignored when classic is enabled.

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

3 years agoview: Use bob_limit again. Ignore the cvar with classic.
cloudwalk [Sat, 26 Sep 2020 21:11:35 +0000 (21:11 +0000)]
view: Use bob_limit again. Ignore the cvar with classic.

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

3 years agoview: Remove unneeded var sets. Fixes view shifting a few pixels when paused
cloudwalk [Sat, 26 Sep 2020 21:11:35 +0000 (21:11 +0000)]
view: Remove unneeded var sets. Fixes view shifting a few pixels when paused

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

3 years agoview: Apply r_viewmodel_quake even when stationary
cloudwalk [Sat, 26 Sep 2020 21:11:34 +0000 (21:11 +0000)]
view: Apply r_viewmodel_quake even when stationary

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

3 years agothread: Un-include threads.h for now since MinGW apparently doesn't support it
cloudwalk [Sat, 26 Sep 2020 14:50:27 +0000 (14:50 +0000)]
thread: Un-include threads.h for now since MinGW apparently doesn't support it

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

3 years agoview: Cleanup. Fix compile warning.
cloudwalk [Sat, 26 Sep 2020 05:08:11 +0000 (05:08 +0000)]
view: Cleanup. Fix compile warning.

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

3 years agomenu: Fix "Apply" in video settings being offset to an invisible button
cloudwalk [Sat, 26 Sep 2020 04:59:58 +0000 (04:59 +0000)]
menu: Fix "Apply" in video settings being offset to an invisible button

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

3 years agoview: Refactor V_CalcRefDefUsing. Fully implement classic Quake-style weapon bob
cloudwalk [Sat, 26 Sep 2020 04:59:57 +0000 (04:59 +0000)]
view: Refactor V_CalcRefDefUsing. Fully implement classic Quake-style weapon bob

This is largely a port from Quakespasm and remains compatible with
the original Darkplaces weapon bob behavior. I removed some dead code
and split off the intermission block into its own function.

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

3 years agocommon: Fix -pedantic warning. Don't do pointer arithmetic on void pointers
cloudwalk [Sat, 26 Sep 2020 04:59:56 +0000 (04:59 +0000)]
common: Fix -pedantic warning. Don't do pointer arithmetic on void pointers

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

3 years agoserver: Eliminate references to cls.state in server code
cloudwalk [Sat, 26 Sep 2020 04:59:56 +0000 (04:59 +0000)]
server: Eliminate references to cls.state in server code

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

3 years agoserver: Give a lot of functions new homes
cloudwalk [Sat, 26 Sep 2020 04:59:55 +0000 (04:59 +0000)]
server: Give a lot of functions new homes

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

3 years agocl_main: When establishing connection, disconnect from current server only if we...
cloudwalk [Sat, 26 Sep 2020 04:59:54 +0000 (04:59 +0000)]
cl_main: When establishing connection, disconnect from current server only if we have a socket

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

3 years agocmd: Fix memory leak in cbuf. Use a dedicated mempool instead of the temp one
cloudwalk [Wed, 23 Sep 2020 13:49:33 +0000 (13:49 +0000)]
cmd: Fix memory leak in cbuf. Use a dedicated mempool instead of the temp one

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

3 years agoquakedef: Bump up netmessage and static entities limit. Fixes ad_sepulcher.
cloudwalk [Tue, 22 Sep 2020 04:19:59 +0000 (04:19 +0000)]
quakedef: Bump up netmessage and static entities limit. Fixes ad_sepulcher.

MAX_STATICENTITIES in particular now matches Quakespasm's limit.

Also fixed a typo.

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

3 years agoquakedef: Include thread.h, and include threads.h in thread.h
cloudwalk [Thu, 17 Sep 2020 17:50:43 +0000 (17:50 +0000)]
quakedef: Include thread.h, and include threads.h in thread.h

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

3 years agohost: Gracefully Sys_Error if we encounter any error during init
cloudwalk [Thu, 17 Sep 2020 16:09:19 +0000 (16:09 +0000)]
host: Gracefully Sys_Error if we encounter any error during init

The engine is left in an inconsistent state and it's not particularly
safe to continue on.

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

3 years agocmd: Recycle input node before it executes. Avoids memory leak and infinite loop...
cloudwalk [Thu, 17 Sep 2020 15:24:55 +0000 (15:24 +0000)]
cmd: Recycle input node before it executes. Avoids memory leak and infinite loop on the most recent node if a Host_Error occurs during execution.

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

3 years agoFix remaining clang compile warnings
cloudwalk [Thu, 17 Sep 2020 15:24:54 +0000 (15:24 +0000)]
Fix remaining clang compile warnings

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

3 years agocom_ents4: Fix possible logic bug with two for loops
cloudwalk [Thu, 17 Sep 2020 12:36:53 +0000 (12:36 +0000)]
com_ents4: Fix possible logic bug with two for loops

This is very likely what was originally intended as the second loop
would be resetting i, which the first loop is already iterating...

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

3 years agoRevert "cmd: Reduce duplicate code with command lookup"
cloudwalk [Thu, 17 Sep 2020 12:31:14 +0000 (12:31 +0000)]
Revert "cmd: Reduce duplicate code with command lookup"

This reverts commit 47015126a6457cafc71849edb16d2cac80c34c5c.

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

3 years agoRestore old video init behavior, pending better solution. Fixes Steel Storm crash...
cloudwalk [Thu, 17 Sep 2020 05:18:04 +0000 (05:18 +0000)]
Restore old video init behavior, pending better solution. Fixes Steel Storm crash and broken texture overrides in Quake Epsilon.

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

3 years agosys_shared: Fix malformed ifdefs breaking 32 bit builds
cloudwalk [Thu, 17 Sep 2020 05:18:03 +0000 (05:18 +0000)]
sys_shared: Fix malformed ifdefs breaking 32 bit builds

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

3 years agocmd: Rename cbuf_t to cmd_buf_t
cloudwalk [Thu, 17 Sep 2020 05:18:03 +0000 (05:18 +0000)]
cmd: Rename cbuf_t to cmd_buf_t

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

3 years agomakefile: Support statically linking SDL2 on all platforms
cloudwalk [Thu, 17 Sep 2020 05:18:02 +0000 (05:18 +0000)]
makefile: Support statically linking SDL2 on all platforms

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

3 years agocl_main: Don't connect on level change if already connected to local server. Fixes...
cloudwalk [Thu, 17 Sep 2020 05:18:02 +0000 (05:18 +0000)]
cl_main: Don't connect on level change if already connected to local server. Fixes Quake inventory not carrying between levels

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

3 years agocmd: Add missing List_IsEmpty check
cloudwalk [Thu, 17 Sep 2020 05:18:01 +0000 (05:18 +0000)]
cmd: Add missing List_IsEmpty check

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

3 years agoUnify the command and cvar flags, under the CF_ prefix.
cloudwalk [Thu, 17 Sep 2020 05:17:59 +0000 (05:17 +0000)]
Unify the command and cvar flags, under the CF_ prefix.

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

3 years agocmd: Remove now-unused cmddeferred_t
cloudwalk [Thu, 17 Sep 2020 05:17:56 +0000 (05:17 +0000)]
cmd: Remove now-unused cmddeferred_t

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

3 years agocmd: Re-re-re-re-implement the command parser. Allocate text only as needed.
cloudwalk [Thu, 17 Sep 2020 05:17:55 +0000 (05:17 +0000)]
cmd: Re-re-re-re-implement the command parser. Allocate text only as needed.

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

3 years agoRename qboolean to qbool
cloudwalk [Thu, 17 Sep 2020 05:17:53 +0000 (05:17 +0000)]
Rename qboolean to qbool

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

3 years agocmd: Rename cbuf_cmd_t to cmd_input_t to clarify its purpose and make it generic
cloudwalk [Thu, 17 Sep 2020 05:17:49 +0000 (05:17 +0000)]
cmd: Rename cbuf_cmd_t to cmd_input_t to clarify its purpose and make it generic

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

3 years agocbuf: Replace the ugly bitmask thing with an actual return value.
cloudwalk [Thu, 17 Sep 2020 05:17:49 +0000 (05:17 +0000)]
cbuf: Replace the ugly bitmask thing with an actual return value.

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

3 years agoworld: Port the areagrid to the new generic linked list
cloudwalk [Tue, 8 Sep 2020 13:19:28 +0000 (13:19 +0000)]
world: Port the areagrid to the new generic linked list

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

3 years agocommon: Wrap ContainerOf around parentheses to allow direct struct access
cloudwalk [Tue, 8 Sep 2020 13:19:28 +0000 (13:19 +0000)]
common: Wrap ContainerOf around parentheses to allow direct struct access

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

3 years agocom_list: Rename Delete to Delete_Init and implement the actual Delete
cloudwalk [Tue, 8 Sep 2020 13:19:27 +0000 (13:19 +0000)]
com_list: Rename Delete to Delete_Init and implement the actual Delete

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

3 years agocmd: Rename cmdalias_t to cmd_alias_t for consistency.
cloudwalk [Tue, 8 Sep 2020 13:19:27 +0000 (13:19 +0000)]
cmd: Rename cmdalias_t to cmd_alias_t for consistency.

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

3 years agocvar: Remove commented code in the header, unlikely to ever be used.
cloudwalk [Tue, 8 Sep 2020 13:19:26 +0000 (13:19 +0000)]
cvar: Remove commented code in the header, unlikely to ever be used.

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

3 years agoRename COM_CheckParm to Sys_CheckParm and move it to sys_shared.c
cloudwalk [Tue, 8 Sep 2020 13:19:25 +0000 (13:19 +0000)]
Rename COM_CheckParm to Sys_CheckParm and move it to sys_shared.c

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

3 years agocmd: Re-re-re-implement the cbuf. This time using the new generic linked list.
cloudwalk [Mon, 7 Sep 2020 23:57:35 +0000 (23:57 +0000)]
cmd: Re-re-re-implement the cbuf. This time using the new generic linked list.

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

3 years agoImplement Linux kernel-inspired generic cyclic doubly linked list interface
cloudwalk [Mon, 7 Sep 2020 23:57:34 +0000 (23:57 +0000)]
Implement Linux kernel-inspired generic cyclic doubly linked list interface

It's incomplete, leaving out several helpers. These will be added later
if the need arises.

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

3 years agoRename src_command to src_local, to clarify its meaning
cloudwalk [Mon, 7 Sep 2020 23:57:33 +0000 (23:57 +0000)]
Rename src_command to src_local, to clarify its meaning

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

3 years agocmd: Reduce duplicate code with command lookup
cloudwalk [Wed, 19 Aug 2020 14:24:03 +0000 (14:24 +0000)]
cmd: Reduce duplicate code with command lookup

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

3 years agogl_rmain: Perform lightmap updates only on visible surfaces. Fixes AD perf
cloudwalk [Tue, 18 Aug 2020 16:36:30 +0000 (16:36 +0000)]
gl_rmain: Perform lightmap updates only on visible surfaces. Fixes AD perf

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

3 years agocmd: Fix double free/use-after-free bugs in defer. Fixed infinite loop in defer cmd...
cloudwalk [Sun, 16 Aug 2020 17:28:26 +0000 (17:28 +0000)]
cmd: Fix double free/use-after-free bugs in defer. Fixed infinite loop in defer cmd without args.

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

3 years agocmd: Refactored the cbuf system to fix a bug and clean things up a bit
cloudwalk [Sun, 16 Aug 2020 17:28:25 +0000 (17:28 +0000)]
cmd: Refactored the cbuf system to fix a bug and clean things up a bit

The bug was the cbuf erronously assuming the pending command would
always be the head of the main list, which is only true with
Cbuf_InsertText, resulting in broken behavior if an appended command
was left incomplete.

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

3 years agohost: Host_StartVideo *before* Host_AddConfigText. Fixes Steel Storm crash... again.
cloudwalk [Sat, 15 Aug 2020 01:53:00 +0000 (01:53 +0000)]
host: Host_StartVideo *before* Host_AddConfigText. Fixes Steel Storm crash... again.

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

3 years agomodel_brush: Delete var sets that were preventing Q1BSP derivatives from loading...
cloudwalk [Fri, 14 Aug 2020 14:46:09 +0000 (14:46 +0000)]
model_brush: Delete var sets that were preventing Q1BSP derivatives from loading. Fixes Arcane Dimensions.

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

3 years agoFix compile warnings with PRVM_64
cloudwalk [Fri, 14 Aug 2020 14:46:09 +0000 (14:46 +0000)]
Fix compile warnings with PRVM_64

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

3 years agoprvm: Initial experimental implementation of support for 32-bit progs offsets
cloudwalk [Fri, 14 Aug 2020 14:46:07 +0000 (14:46 +0000)]
prvm: Initial experimental implementation of support for 32-bit progs offsets

This implementation is may be incomplete and also includes some fixes
to some opcodes. This shouldn't break anything in its current state.

Thanks to Spoike for the patch. He also left a few comments on some
compatibility issues DP ought to fix, which can be found by grepping
"spike FIXME".

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

3 years agosv_ccmds: Remove some more client-specific forward-to-server code
cloudwalk [Wed, 12 Aug 2020 14:54:10 +0000 (14:54 +0000)]
sv_ccmds: Remove some more client-specific forward-to-server code

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

3 years agohost: Implement a hook struct in host_t. Use a hook to connect to local server
cloudwalk [Wed, 12 Aug 2020 14:54:10 +0000 (14:54 +0000)]
host: Implement a hook struct in host_t. Use a hook to connect to local server

This eliminates some client-specific code in the server.

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

3 years agohost: Fix function name in print string.
cloudwalk [Wed, 12 Aug 2020 14:54:09 +0000 (14:54 +0000)]
host: Fix function name in print string.

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

3 years agoMake V_CalcRoll a common function. Add sv_rollangle and sv_rollspeed cvars.
cloudwalk [Wed, 12 Aug 2020 14:54:09 +0000 (14:54 +0000)]
Make V_CalcRoll a common function. Add sv_rollangle and sv_rollspeed cvars.

This allows V_Init to move to client code.

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

3 years agosys: Initialize the memory subsystem in main()
cloudwalk [Wed, 12 Aug 2020 14:54:08 +0000 (14:54 +0000)]
sys: Initialize the memory subsystem in main()

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

3 years agosv_main: Use modelname when warning of no such map
cloudwalk [Mon, 10 Aug 2020 11:46:44 +0000 (11:46 +0000)]
sv_main: Use modelname when warning of no such map

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

3 years agosv_ccmds: Remove redundant forwarding code from pause command
cloudwalk [Mon, 10 Aug 2020 11:46:43 +0000 (11:46 +0000)]
sv_ccmds: Remove redundant forwarding code from pause command

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

3 years agoutf8lib: Remove MSVC exception for stdint.h
cloudwalk [Mon, 10 Aug 2020 11:46:42 +0000 (11:46 +0000)]
utf8lib: Remove MSVC exception for stdint.h

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

3 years agoserver: Consistency fix
cloudwalk [Mon, 10 Aug 2020 11:46:42 +0000 (11:46 +0000)]
server: Consistency fix

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

3 years agomatrixlib: Define pi only once. Other definition is in mathlib.h
cloudwalk [Mon, 10 Aug 2020 11:46:41 +0000 (11:46 +0000)]
matrixlib: Define pi only once. Other definition is in mathlib.h

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

3 years agocap_ogg: Remove MSVC ifdefs for stdint.h
cloudwalk [Mon, 10 Aug 2020 11:46:41 +0000 (11:46 +0000)]
cap_ogg: Remove MSVC ifdefs for stdint.h

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

3 years agomodel_brush: Demote a Host_Error to Con_Printf warn for irregular lightmap sizes
cloudwalk [Sun, 9 Aug 2020 18:38:05 +0000 (18:38 +0000)]
model_brush: Demote a Host_Error to Con_Printf warn for irregular lightmap sizes

This is probably not the proper solution, but certain maps that ioquake3
can load just fine, will at least load in DP now.

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

3 years agosbar: Implement cl_showspeed_factor, a multiplier of cm for cl_showspeed.
cloudwalk [Sun, 9 Aug 2020 18:38:05 +0000 (18:38 +0000)]
sbar: Implement cl_showspeed_factor, a multiplier of cm for cl_showspeed.

Also removed game-specific multipliers. These can be specified manually
as the player or mod author sees fit. In Xonotic, the scale varies per
map, and the scale of the player model can be adjusted with a cvar.

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

3 years agosv_ccmds: Perform actual name change from a single function. Announce in chat.
cloudwalk [Sun, 9 Aug 2020 18:38:04 +0000 (18:38 +0000)]
sv_ccmds: Perform actual name change from a single function. Announce in chat.

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

3 years agocmd: Reimplement console buffer system as a cyclic doubly linked list
cloudwalk [Sun, 9 Aug 2020 18:38:03 +0000 (18:38 +0000)]
cmd: Reimplement console buffer system as a cyclic doubly linked list

This implements cbuf_t, cbuf_cmd_t, and an assorted array of helper
functions for handling the linked list(s). This also ports the defer
command to use the new system.

Each list node allocated will not be freed, except deferred commands,
mainly to avoid a Z_Malloc and Z_Free every time a player uses the
controls. Nodes are recycled in a separate linked list. This should be
okay as the memory usage is quite negligible

This new system has several advantages, namely, multiple command
interpreters may share the same console buffer on the same thread, and
each command will be executed in order, eliminating any potential bugs
related to execution order (which have already happened).

I haven't noticed any performance decrease and the new system works
exactly as the old one did.

Enjoy!

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

3 years agocmd: Delete stray function prototype that never actually got a definition
cloudwalk [Thu, 6 Aug 2020 12:18:41 +0000 (12:18 +0000)]
cmd: Delete stray function prototype that never actually got a definition

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

3 years agosv_ents: Move shared function to com_ents
cloudwalk [Mon, 3 Aug 2020 19:25:45 +0000 (19:25 +0000)]
sv_ents: Move shared function to com_ents

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

3 years agocom_game: Add missing copyright header
cloudwalk [Mon, 3 Aug 2020 19:25:44 +0000 (19:25 +0000)]
com_game: Add missing copyright header

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

3 years agocommon: Split off the gameinfo stuff to com_game.c
cloudwalk [Mon, 27 Jul 2020 14:52:03 +0000 (14:52 +0000)]
common: Split off the gameinfo stuff to com_game.c

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

3 years agocl_screen: Fix compile warning
cloudwalk [Sun, 26 Jul 2020 16:01:31 +0000 (16:01 +0000)]
cl_screen: Fix compile warning

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

3 years agoImplement "ent_remove" command. Removes entity where you're aiming or by edict
cloudwalk [Sun, 26 Jul 2020 16:00:13 +0000 (16:00 +0000)]
Implement "ent_remove" command. Removes entity where you're aiming or by edict

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

3 years agosv_ccmds: Partially rewrite ent_create command to be entirely serverside
cloudwalk [Sun, 26 Jul 2020 16:00:12 +0000 (16:00 +0000)]
sv_ccmds: Partially rewrite ent_create command to be entirely serverside

It will now use serverside functionality to generate the view matrix
used to trace a line. Client involvement is no longer necessary.

Also removed CL_TraceLine_FromViewOrigin

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

3 years agocl_screen: Fix logic error preventing unpause if jumping to local MP from SP
cloudwalk [Sun, 26 Jul 2020 16:00:11 +0000 (16:00 +0000)]
cl_screen: Fix logic error preventing unpause if jumping to local MP from SP

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

3 years agoImplement "ent_remove_all" command. Removes all entities of classname in map
cloudwalk [Sat, 25 Jul 2020 15:09:56 +0000 (15:09 +0000)]
Implement "ent_remove_all" command. Removes all entities of classname in map

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

3 years agoent_create: Fix potential memory leaks. Misc improvements
cloudwalk [Fri, 24 Jul 2020 16:13:08 +0000 (16:13 +0000)]
ent_create: Fix potential memory leaks. Misc improvements

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

3 years agoImplement "ent_create" command. Creates an entity where you're aiming.
cloudwalk [Fri, 24 Jul 2020 16:00:54 +0000 (16:00 +0000)]
Implement "ent_create" command. Creates an entity where you're aiming.

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

3 years agoprvm_edict: Refactor PRVM_ED_LoadFromFile. Split up spawn code into functions
cloudwalk [Fri, 24 Jul 2020 16:00:54 +0000 (16:00 +0000)]
prvm_edict: Refactor PRVM_ED_LoadFromFile. Split up spawn code into functions

Also use PRVM_ED_FindGlobalEval

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

3 years agoprvm_edict: Implement PRVM_ED_FindGlobalEval
cloudwalk [Fri, 24 Jul 2020 16:00:53 +0000 (16:00 +0000)]
prvm_edict: Implement PRVM_ED_FindGlobalEval

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

3 years agocl_collision: Implement CL_TraceLine_FromViewOrigin
cloudwalk [Fri, 24 Jul 2020 16:00:53 +0000 (16:00 +0000)]
cl_collision: Implement CL_TraceLine_FromViewOrigin

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

3 years agocmd: Improve automatic assignment of command functions
cloudwalk [Fri, 24 Jul 2020 16:00:52 +0000 (16:00 +0000)]
cmd: Improve automatic assignment of command functions

See the new comment in cmd.h

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

3 years agoimage_png: Fix library load order. Fixes broken external textures in some games
cloudwalk [Fri, 24 Jul 2020 16:00:52 +0000 (16:00 +0000)]
image_png: Fix library load order. Fixes broken external textures in some games

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

3 years agosv_main: Minor formatting and commenting improvement/refactor of SV_Frame
cloudwalk [Thu, 23 Jul 2020 04:17:11 +0000 (04:17 +0000)]
sv_main: Minor formatting and commenting improvement/refactor of SV_Frame

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

3 years agosv_main: Receive packets even if we're gonna sleep, matching old behavior
cloudwalk [Thu, 23 Jul 2020 03:20:15 +0000 (03:20 +0000)]
sv_main: Receive packets even if we're gonna sleep, matching old behavior

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

3 years agohost: Maintain sleep delta by making variable static, matching old behavior
cloudwalk [Thu, 23 Jul 2020 03:20:14 +0000 (03:20 +0000)]
host: Maintain sleep delta by making variable static, matching old behavior

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

3 years agosv_main: Do perf calculations even if we're gonna sleep. Restores old behavior
cloudwalk [Wed, 22 Jul 2020 18:36:01 +0000 (18:36 +0000)]
sv_main: Do perf calculations even if we're gonna sleep. Restores old behavior

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

3 years agogl_rmain: Nerf bloom intensity. It won't burn your retinas as badly now.
cloudwalk [Wed, 22 Jul 2020 18:36:00 +0000 (18:36 +0000)]
gl_rmain: Nerf bloom intensity. It won't burn your retinas as badly now.

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