]> de.git.xonotic.org Git - xonotic/darkplaces.git/log
xonotic/darkplaces.git
4 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

4 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

4 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

4 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

4 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

4 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

4 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

4 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

4 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

4 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

4 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

4 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

4 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

4 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

4 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

4 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

4 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

4 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

4 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

4 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

4 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

4 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

4 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

4 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

4 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

4 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

4 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

4 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

4 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

4 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

4 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

4 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

4 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

4 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

4 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

4 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

4 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

4 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

4 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

4 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

4 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

4 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

4 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

4 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

4 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

4 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

4 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

4 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

4 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

4 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

4 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

4 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

4 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

4 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

4 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

4 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

4 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

4 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

4 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

4 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

4 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

4 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

4 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

4 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

4 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

4 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

4 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

4 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

4 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

4 years agoMisc console print improvements. Increase verbosity
cloudwalk [Wed, 22 Jul 2020 18:35:59 +0000 (18:35 +0000)]
Misc console print improvements. Increase verbosity

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

4 years agocl_cmd: Make _cl_color not read-only. That was annoying.
cloudwalk [Wed, 22 Jul 2020 13:59:58 +0000 (13:59 +0000)]
cl_cmd: Make _cl_color not read-only. That was annoying.

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

4 years agoFix OpenSolaris build. Add platform ID for a few other platforms
cloudwalk [Wed, 22 Jul 2020 13:58:22 +0000 (13:58 +0000)]
Fix OpenSolaris build. Add platform ID for a few other platforms

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

4 years agoExperimental restoration of GLES2 support. It *might* compile.
cloudwalk [Wed, 22 Jul 2020 13:58:22 +0000 (13:58 +0000)]
Experimental restoration of GLES2 support. It *might* compile.

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

4 years agogl_draw: Silence a spammy print
cloudwalk [Tue, 21 Jul 2020 19:19:23 +0000 (19:19 +0000)]
gl_draw: Silence a spammy print

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

4 years agoIncrease console verbosity so it feels like the engine is actually doing things
cloudwalk [Tue, 21 Jul 2020 19:11:44 +0000 (19:11 +0000)]
Increase console verbosity so it feels like the engine is actually doing things

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

4 years agocl_screen: Rename shownetgraph to net_graph. Keep shownetgraph as nickname
cloudwalk [Tue, 21 Jul 2020 16:39:14 +0000 (16:39 +0000)]
cl_screen: Rename shownetgraph to net_graph. Keep shownetgraph as nickname

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

4 years agogl_rmain: Get the notexture texture from a single source
cloudwalk [Tue, 21 Jul 2020 16:39:13 +0000 (16:39 +0000)]
gl_rmain: Get the notexture texture from a single source

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

4 years agoprvm_execprogram.h: Tuck a loose DISPATCH_OPCODE() under its opcode
cloudwalk [Tue, 21 Jul 2020 16:39:13 +0000 (16:39 +0000)]
prvm_execprogram.h: Tuck a loose DISPATCH_OPCODE() under its opcode

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

4 years agohost: Stray whitespace
cloudwalk [Tue, 21 Jul 2020 16:39:12 +0000 (16:39 +0000)]
host: Stray whitespace

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

4 years agohost: Minor comment improvements
cloudwalk [Mon, 20 Jul 2020 17:35:03 +0000 (17:35 +0000)]
host: Minor comment improvements

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

4 years agovid_sdl: Set host.state = host_shutdown to exit by breaking the main loop
cloudwalk [Mon, 20 Jul 2020 17:35:02 +0000 (17:35 +0000)]
vid_sdl: Set host.state = host_shutdown to exit by breaking the main loop

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

4 years agohost: Return to main() if the loop breaks and Sys_Quit from there
cloudwalk [Mon, 20 Jul 2020 17:35:02 +0000 (17:35 +0000)]
host: Return to main() if the loop breaks and Sys_Quit from there

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

4 years agohost: Check !host.restless instead of !cls.demoplayback for rand() call
cloudwalk [Mon, 20 Jul 2020 17:35:01 +0000 (17:35 +0000)]
host: Check !host.restless instead of !cls.demoplayback for rand() call

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

4 years agohost: Implement callback for host_framerate instead of checking it every frame
cloudwalk [Mon, 20 Jul 2020 17:35:01 +0000 (17:35 +0000)]
host: Implement callback for host_framerate instead of checking it every frame

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

4 years agocl_main: Get new input events even if we're supposed to sleep
cloudwalk [Mon, 20 Jul 2020 17:35:01 +0000 (17:35 +0000)]
cl_main: Get new input events even if we're supposed to sleep

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

4 years agomakefile: Add -Wwrite-strings. This is also a -Wall warning under g++
cloudwalk [Mon, 20 Jul 2020 14:56:37 +0000 (14:56 +0000)]
makefile: Add -Wwrite-strings. This is also a -Wall warning under g++

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

4 years agoRevert "makefile: Add -Wc++11-compat-reserved-user-defined-literal"
cloudwalk [Mon, 20 Jul 2020 14:56:37 +0000 (14:56 +0000)]
Revert "makefile: Add -Wc++11-compat-reserved-user-defined-literal"

This reverts commit 8cca05ca8d1e9b28c00afd25ec7d80b0ffe4f68f.

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

4 years agomakefile: Add -Wc++11-compat-reserved-user-defined-literal
cloudwalk [Mon, 20 Jul 2020 14:39:55 +0000 (14:39 +0000)]
makefile: Add -Wc++11-compat-reserved-user-defined-literal

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

4 years agoFix compile warnings from gcc and g++
cloudwalk [Mon, 20 Jul 2020 14:38:18 +0000 (14:38 +0000)]
Fix compile warnings from gcc and g++

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

4 years agohost: Major refactor
cloudwalk [Mon, 20 Jul 2020 14:27:33 +0000 (14:27 +0000)]
host: Major refactor

* Split up Host_Main. Implemented Host_Frame (which is now most of what
  Host_Main was), and moved timekeeping and sleep code to the new
  Host_Main.
* Moved all server frame code to the new SV_Frame.
* Fixed sleep behavior. A dedicated server should sleep again.
* General cleanup. New functions to split things up and keep things
  readable.

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

4 years agohost: Remove sv_fixedframeratesingleplayer
cloudwalk [Mon, 20 Jul 2020 14:27:33 +0000 (14:27 +0000)]
host: Remove sv_fixedframeratesingleplayer

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

4 years agosv_main: Rename sv_ratelimitlocalplayer to host_limitlocal. Old name still works
cloudwalk [Mon, 20 Jul 2020 14:27:32 +0000 (14:27 +0000)]
sv_main: Rename sv_ratelimitlocalplayer to host_limitlocal. Old name still works

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

4 years agosv_ccmds: In status cmd, re-add Con_Printf code so dedicated can see it again
cloudwalk [Sun, 19 Jul 2020 12:26:40 +0000 (12:26 +0000)]
sv_ccmds: In status cmd, re-add Con_Printf code so dedicated can see it again

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

4 years agoprvm_edict: Minor edit to string
cloudwalk [Sat, 18 Jul 2020 19:45:09 +0000 (19:45 +0000)]
prvm_edict: Minor edit to string

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

4 years agocmd: Use reentrant mutex for cbufs. Fixes deadlock when expanding aliases in some...
cloudwalk [Sat, 18 Jul 2020 19:45:09 +0000 (19:45 +0000)]
cmd: Use reentrant mutex for cbufs. Fixes deadlock when expanding aliases in some situations

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

4 years agoAdd .ccls-cache to .gitignore
cloudwalk [Sat, 18 Jul 2020 19:45:08 +0000 (19:45 +0000)]
Add .ccls-cache to .gitignore

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

4 years agoclient: Implement CL_Frame. Move client cvars out of host to cl_main
cloudwalk [Sat, 18 Jul 2020 19:45:08 +0000 (19:45 +0000)]
client: Implement CL_Frame. Move client cvars out of host to cl_main

The client now performs its frame in its own side of the engine. This
will make client/server separation easier later on.

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

4 years agomenu: Don't abort the frame if the menu crashes during init, so video can start
cloudwalk [Fri, 17 Jul 2020 23:38:51 +0000 (23:38 +0000)]
menu: Don't abort the frame if the menu crashes during init, so video can start

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

4 years agogl_rmain: Disable water (and warpzones) when r_lockvisibility or r_lockpvs are 1
cloudwalk [Fri, 17 Jul 2020 13:59:34 +0000 (13:59 +0000)]
gl_rmain: Disable water (and warpzones) when r_lockvisibility or r_lockpvs are 1

Fixes an issue where it would render the reflection of water, or the
opposite side of the warpzone, instead of where the actual frustum is.

There's probably a better solution but this should be fine for now.

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

4 years agogl_rmain: Don't set frustum when r_lockvisibility or r_lockpvs are 1
cloudwalk [Fri, 17 Jul 2020 13:59:34 +0000 (13:59 +0000)]
gl_rmain: Don't set frustum when r_lockvisibility or r_lockpvs are 1

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