]> git.rm.cloudns.org Git - xonotic/darkplaces.git/log
xonotic/darkplaces.git
4 years agoMerge branch 'master' into Cloudwalk/protocol_redesign
Cloudwalk [Mon, 5 Oct 2020 18:41:44 +0000 (14:41 -0400)]
Merge branch 'master' into Cloudwalk/protocol_redesign

4 years agopmove: Stub more fields in the header.
cloudwalk [Mon, 5 Oct 2020 18:03:46 +0000 (18:03 +0000)]
pmove: Stub more fields in the header.

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

4 years agohost: Initialize all hooks to NULL to avoid problems on dedicated servers
cloudwalk [Mon, 5 Oct 2020 18:03:46 +0000 (18:03 +0000)]
host: Initialize all hooks to NULL to avoid problems on dedicated servers

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

4 years agohost: Add two hooks for disconnecting and toggling the menu
cloudwalk [Mon, 5 Oct 2020 18:03:45 +0000 (18:03 +0000)]
host: Add two hooks for disconnecting and toggling the menu

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

4 years agoEliminate a few client-only files from the dedicated build
cloudwalk [Mon, 5 Oct 2020 18:03:45 +0000 (18:03 +0000)]
Eliminate a few client-only files from the dedicated build

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

4 years agosvvm_cmds: Remove dead code
cloudwalk [Mon, 5 Oct 2020 18:03:44 +0000 (18:03 +0000)]
svvm_cmds: Remove dead code

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

4 years agozone: Print only memstats with the memstats command. Fixes dependence on the renderer...
cloudwalk [Mon, 5 Oct 2020 18:03:43 +0000 (18:03 +0000)]
zone: Print only memstats with the memstats command. Fixes dependence on the renderer to compile zone.c

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

4 years agosv_user: Remove commented out dead code.
cloudwalk [Mon, 5 Oct 2020 18:03:43 +0000 (18:03 +0000)]
sv_user: Remove commented out dead code.

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

4 years agosv_user: Rename SV_ClientThink to SV_PlayerPhysics to clarify its purpose
cloudwalk [Mon, 5 Oct 2020 18:03:42 +0000 (18:03 +0000)]
sv_user: Rename SV_ClientThink to SV_PlayerPhysics to clarify its purpose

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

4 years agoRevert "model_brush: Set mod_bsp_portalize to 0 by default for now. It hurts performa...
cloudwalk [Fri, 2 Oct 2020 04:07:06 +0000 (04:07 +0000)]
Revert "model_brush: Set mod_bsp_portalize to 0 by default for now. It hurts performance even if r_useportalculling is < 2"

This reverts commit 89a8bc7d7b02bcb9778d500c351c886d4fcfe694.

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

4 years agosv_main: Fix segfault and logic bugs when saving.
cloudwalk [Fri, 2 Oct 2020 02:26:44 +0000 (02:26 +0000)]
sv_main: Fix segfault and logic bugs when saving.

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

4 years agocl_particles: Tweak the smoke, blood, and rocket launcher particle parameters to...
cloudwalk [Fri, 2 Oct 2020 01:56:53 +0000 (01:56 +0000)]
cl_particles: Tweak the smoke, blood, and rocket launcher particle parameters to look more like Quake.

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

4 years agomodel_brush: Set mod_bsp_portalize to 0 by default for now. It hurts performance...
cloudwalk [Fri, 2 Oct 2020 01:56:52 +0000 (01:56 +0000)]
model_brush: Set mod_bsp_portalize to 0 by default for now. It hurts performance even if r_useportalculling is < 2

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

4 years agopmove: Initial implementation of pmove.h. Stub some structs. To be continued(?)
cloudwalk [Fri, 2 Oct 2020 01:56:52 +0000 (01:56 +0000)]
pmove: Initial implementation of pmove.h. Stub some structs. To be continued(?)

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

4 years agoclient: Move usercmd_t to protocol.h since both client and server use it
cloudwalk [Fri, 2 Oct 2020 01:56:51 +0000 (01:56 +0000)]
client: Move usercmd_t to protocol.h since both client and server use it

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

4 years agomodel_shared: Rename dp_model_t to model_t, to avoid confusion with the dpm format
cloudwalk [Fri, 2 Oct 2020 01:56:50 +0000 (01:56 +0000)]
model_shared: Rename dp_model_t to model_t, to avoid confusion with the dpm format

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

4 years agomodel_shared: Move skinframe struct to r_textures.h
cloudwalk [Fri, 2 Oct 2020 01:56:49 +0000 (01:56 +0000)]
model_shared: Move skinframe struct to r_textures.h

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

4 years agomdfour: Switch to stdint.
cloudwalk [Fri, 2 Oct 2020 01:56:48 +0000 (01:56 +0000)]
mdfour: Switch to stdint.

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

4 years agoRemove unneeded #includes in some headers. Make some headers standalone.
cloudwalk [Fri, 2 Oct 2020 01:56:48 +0000 (01:56 +0000)]
Remove unneeded #includes in some headers. Make some headers standalone.

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

4 years agomodel: Split up headers. Introduce headers for each BSP format.
cloudwalk [Fri, 2 Oct 2020 01:56:47 +0000 (01:56 +0000)]
model: Split up headers. Introduce headers for each BSP format.

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

4 years agofs: Stub a struct that'll be used later.
cloudwalk [Fri, 2 Oct 2020 01:56:46 +0000 (01:56 +0000)]
fs: Stub a struct that'll be used later.

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

4 years agofs: Use stdint type for fs_offset_t
cloudwalk [Fri, 2 Oct 2020 01:56:46 +0000 (01:56 +0000)]
fs: Use stdint type for fs_offset_t

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

4 years agoclient: Add r_stats.[ch]. Move render stats code to it.
cloudwalk [Fri, 2 Oct 2020 01:56:45 +0000 (01:56 +0000)]
client: Add r_stats.[ch]. Move render stats code to it.

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

4 years agocmd: Fix integer overflow of cbuf->size when using defer.
cloudwalk [Wed, 30 Sep 2020 12:54:18 +0000 (12:54 +0000)]
cmd: Fix integer overflow of cbuf->size when using defer.

The size variable is used to track the size of the text buffers for
each node for allocation purposes. These never get smaller, and
the cbuf->size variable decrements based on length rather than
size. Eventually this causes an integer overflow.

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

4 years agomodel_brush: Add a note for a performance deficit. No code changes.
cloudwalk [Tue, 29 Sep 2020 19:19:10 +0000 (19:19 +0000)]
model_brush: Add a note for a performance deficit. No code changes.

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

4 years agosv_save: Add new hooks to reduce client code in server savegame code.
cloudwalk [Tue, 29 Sep 2020 19:19:09 +0000 (19:19 +0000)]
sv_save: Add new hooks to reduce client code in server savegame code.

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

4 years agosv_ccmds: Move what are actually client commands to the client.
cloudwalk [Tue, 29 Sep 2020 19:19:08 +0000 (19:19 +0000)]
sv_ccmds: Move what are actually client commands to the client.

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

4 years agoquakedef: Add darkplaces.h and include it in as many files as I can. Split up and...
cloudwalk [Tue, 29 Sep 2020 19:19:07 +0000 (19:19 +0000)]
quakedef: Add darkplaces.h and include it in as many files as I can. Split up and clean up quakedef.h

A client and server agnostic master definitions file is nice to have and
this may speed up compile times and make refactoring easier later on.

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

4 years agoclient: Add cl_particles.h and move cl_particles definitions to it.
cloudwalk [Tue, 29 Sep 2020 19:19:06 +0000 (19:19 +0000)]
client: Add cl_particles.h and move cl_particles definitions to it.

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

4 years agoclient: Add cl_parse.h and move cl_parse prototypes to it
cloudwalk [Tue, 29 Sep 2020 19:19:05 +0000 (19:19 +0000)]
client: Add cl_parse.h and move cl_parse prototypes to it

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

4 years agoclient: Move SCR prototype to screen.h
cloudwalk [Tue, 29 Sep 2020 19:19:05 +0000 (19:19 +0000)]
client: Move SCR prototype to screen.h

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

4 years agoclient: Move keys prototypes to keys.h
cloudwalk [Tue, 29 Sep 2020 19:19:04 +0000 (19:19 +0000)]
client: Move keys prototypes to keys.h

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

4 years agoclient: Add cap.h and move capture struct to it.
cloudwalk [Tue, 29 Sep 2020 19:19:04 +0000 (19:19 +0000)]
client: Add cap.h and move capture struct to it.

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

4 years agoclient: Add view.h. Move view prototypes to it.
cloudwalk [Tue, 29 Sep 2020 19:19:03 +0000 (19:19 +0000)]
client: Add view.h. Move view prototypes to it.

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

4 years agoclient: Move sbar prototypes to sbar.h
cloudwalk [Tue, 29 Sep 2020 19:19:02 +0000 (19:19 +0000)]
client: Move sbar prototypes to sbar.h

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

4 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

4 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

4 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

4 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

4 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

4 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

4 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

4 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

4 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

4 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

4 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

4 years agoMerge branch 'master' into Cloudwalk/protocol_redesign
David Knapp [Sun, 27 Sep 2020 01:39:31 +0000 (21:39 -0400)]
Merge branch 'master' into Cloudwalk/protocol_redesign

4 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

4 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

4 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

4 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

4 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

4 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

4 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

4 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

4 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

4 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

4 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

4 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

4 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

4 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

4 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

4 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

4 years agoprotocol: Add ReadFrame pointer to protocol_t and set it
Cloudwalk [Fri, 25 Sep 2020 17:39:54 +0000 (13:39 -0400)]
protocol: Add ReadFrame pointer to protocol_t and set it

4 years agoprotocol: Change protocol_netmsg_t to contain the number of netmessages
Cloudwalk [Thu, 24 Sep 2020 14:56:16 +0000 (10:56 -0400)]
protocol: Change protocol_netmsg_t to contain the number of netmessages

4 years agosv_main: Set server protocol before the server progs initializes, fixing crash
Cloudwalk [Wed, 23 Sep 2020 14:05:09 +0000 (10:05 -0400)]
sv_main: Set server protocol before the server progs initializes, fixing crash

4 years agoprotocol: Add max_edicts field to protocol_t. Set server limit_edicts from it
Cloudwalk [Wed, 23 Sep 2020 14:02:04 +0000 (10:02 -0400)]
protocol: Add max_edicts field to protocol_t. Set server limit_edicts from it

4 years agoMerge branch 'master' into Cloudwalk/protocol_redesign
Cloudwalk [Wed, 23 Sep 2020 13:50:09 +0000 (09:50 -0400)]
Merge branch 'master' into Cloudwalk/protocol_redesign

4 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

4 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

4 years agoFix compatibility with DP's own server with NEHAHRABJP2 and 3 protocols.
Cloudwalk [Tue, 22 Sep 2020 04:13:12 +0000 (00:13 -0400)]
Fix compatibility with DP's own server with NEHAHRABJP2 and 3 protocols.

Actually adhere to the protocols with regards to modelindex and
soundindex widths.

4 years agoprotocol: strncmp until length of input, so BJP2 and 3 are selectable
Cloudwalk [Tue, 22 Sep 2020 03:56:42 +0000 (23:56 -0400)]
protocol: strncmp until length of input, so BJP2 and 3 are selectable

4 years agocl_cmd: Remove redundant code
Cloudwalk [Tue, 22 Sep 2020 02:40:39 +0000 (22:40 -0400)]
cl_cmd: Remove redundant code

4 years agocl_parse: Fix Nehahra unmarked demo hack. Check protocol by number explicitly.
Cloudwalk [Tue, 22 Sep 2020 02:37:46 +0000 (22:37 -0400)]
cl_parse: Fix Nehahra unmarked demo hack. Check protocol by number explicitly.

4 years agoInitial commit of protocol redesign
Cloudwalk [Tue, 22 Sep 2020 02:34:48 +0000 (22:34 -0400)]
Initial commit of protocol redesign

The Quake protocol family is now implemented on a per-struct basis
using the new protocol_t struct. It's a container for protocol info such
as name, number, and soon max edicts, max models, max frames, max
sounds, etc. For now, it also contains function pointers to MSG_
functions.

The MSG_ functions (specifically the Read and WriteCoord, Angle, Vector
functions have been made generic, and these function pointers point to
them instead of using protocol-based branching.

The protocol net messages themselves are now a jump table, not unlike
the QC builtins interface. This will make things cleaner and scalable
for implementing Quake protocols that might be dramatically different
from NQ and QW.

4 years agonetconn: Rename NetConn_SendUnreliableMessage to NetConn_Transmit
Cloudwalk [Mon, 21 Sep 2020 12:25:42 +0000 (08:25 -0400)]
netconn: Rename NetConn_SendUnreliableMessage to NetConn_Transmit

4 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

4 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

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