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

3 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

3 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

3 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

3 years agogl_rsurf: Check r_lockvisibility only once
cloudwalk [Fri, 17 Jul 2020 05:50:50 +0000 (05:50 +0000)]
gl_rsurf: Check r_lockvisibility only once

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

3 years agogl_rsurf: Don't cull geometry that leaves the view frustum with r_lockvisibility
cloudwalk [Fri, 17 Jul 2020 05:25:23 +0000 (05:25 +0000)]
gl_rsurf: Don't cull geometry that leaves the view frustum with r_lockvisibility

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

3 years agogl_rsurf: Set default of r_useportalculling to 1
cloudwalk [Fri, 17 Jul 2020 04:44:58 +0000 (04:44 +0000)]
gl_rsurf: Set default of r_useportalculling to 1

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

3 years agoFix search_packfile_begin builtin number in the menu VM, also fix checkextension...
cloudwalk [Thu, 16 Jul 2020 14:45:10 +0000 (14:45 +0000)]
Fix search_packfile_begin builtin number in the menu VM, also fix checkextension not working in the menu

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

3 years agoFix some duplicate and missing builtin entries in csprogsdefs.qc
cloudwalk [Thu, 16 Jul 2020 14:45:08 +0000 (14:45 +0000)]
Fix some duplicate and missing builtin entries in csprogsdefs.qc

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

3 years agodpdefs: Don't declare __fullspawndata. Avoids allocation if a mod doesn't use it
cloudwalk [Thu, 16 Jul 2020 10:48:23 +0000 (10:48 +0000)]
dpdefs: Don't declare __fullspawndata. Avoids allocation if a mod doesn't use it

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

3 years agoprvm_edict: For __fullspawndata, set the "start" pointer before '{' is parsed
cloudwalk [Thu, 16 Jul 2020 10:48:22 +0000 (10:48 +0000)]
prvm_edict: For __fullspawndata, set the "start" pointer before '{' is parsed

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

3 years agoprogs: Implement new extension DP_QC_FS_SEARCH_PACKFILE
cloudwalk [Wed, 15 Jul 2020 14:59:11 +0000 (14:59 +0000)]
progs: Implement new extension DP_QC_FS_SEARCH_PACKFILE

Adds an optional parameter to the search_begin builtin function that
allows specifying a package file to look in, skipping any results that
aren't inside the package. Useful for mods aiming to provide
compatibility with Quake 3's .arena files, as they don't match the .bsp
filename.

Patch from Mario: https://gitlab.com/xonotic/darkplaces/-/merge_requests/100

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

3 years agoDon't save scr_loadingscreen_picture to config (matches other loading screen cvars...
cloudwalk [Wed, 15 Jul 2020 14:59:10 +0000 (14:59 +0000)]
Don't save scr_loadingscreen_picture to config (matches other loading screen cvars), as per wrath-darkplaces

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

3 years agoSome minor tweaks to CACHEPICFLAG_LINEAR and the nasty -game name rejection message...
cloudwalk [Wed, 15 Jul 2020 14:59:09 +0000 (14:59 +0000)]
Some minor tweaks to CACHEPICFLAG_LINEAR and the nasty -game name rejection message to ease the processes of backporting and modernization

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

3 years agoDon't show beam list overflow spam warnings normally
cloudwalk [Wed, 15 Jul 2020 14:59:09 +0000 (14:59 +0000)]
Don't show beam list overflow spam warnings normally

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

3 years agoFix a potential memory leak with wavefront sounds
cloudwalk [Wed, 15 Jul 2020 14:59:09 +0000 (14:59 +0000)]
Fix a potential memory leak with wavefront sounds

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

3 years agoImplement pausesound command, ported from wrath-darkplaces
cloudwalk [Wed, 15 Jul 2020 14:59:08 +0000 (14:59 +0000)]
Implement pausesound command, ported from wrath-darkplaces

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

3 years agoIncrease MAX_CACHED_PICS to 2048, as per wrath-darkplaces
cloudwalk [Wed, 15 Jul 2020 14:59:08 +0000 (14:59 +0000)]
Increase MAX_CACHED_PICS to 2048, as per wrath-darkplaces

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

3 years agoSave cl_maxfps_alwayssleep changes to config
cloudwalk [Wed, 15 Jul 2020 14:59:07 +0000 (14:59 +0000)]
Save cl_maxfps_alwayssleep changes to config

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

3 years agoDon't crash the game if a "nasty" -game name is rejected, matches behavior of missing...
cloudwalk [Wed, 15 Jul 2020 14:59:07 +0000 (14:59 +0000)]
Don't crash the game if a "nasty" -game name is rejected, matches behavior of missing -game name

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

3 years agoAdd support for CACHEPICFLAG_LINEAR (currently unused), ported from wrath-darkplaces
cloudwalk [Wed, 15 Jul 2020 14:59:06 +0000 (14:59 +0000)]
Add support for CACHEPICFLAG_LINEAR (currently unused), ported from wrath-darkplaces

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

3 years agolibxmp: Misc improvements (nico)
cloudwalk [Wed, 15 Jul 2020 13:55:21 +0000 (13:55 +0000)]
libxmp: Misc improvements (nico)

* Don't use global CFLAGS for libxmp in makefile
* Add S_GetSoundWidth() function, currently not used (yet)
* Clamp samplerate to engine min/max
* Lower the excessive stereo separation

https://gitlab.com/xonotic/darkplaces/-/merge_requests/94

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

3 years agozone: Fix backed file alloc for BSD. Check for -1 in addition to NULL on mmap data...
cloudwalk [Wed, 15 Jul 2020 13:55:20 +0000 (13:55 +0000)]
zone: Fix backed file alloc for BSD. Check for -1 in addition to NULL on mmap data (David CARLIER)

https://gitlab.com/xonotic/darkplaces/-/merge_requests/55

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

3 years agoprogs: Correct drawline and sound builtin parameters (terencehill)
cloudwalk [Wed, 15 Jul 2020 13:55:19 +0000 (13:55 +0000)]
progs: Correct drawline and sound builtin parameters (terencehill)

https://gitlab.com/xonotic/darkplaces/-/merge_requests/99

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

3 years agoprvm_edict: Implement __fullspawndata. Testing only; don't use in production yet
cloudwalk [Wed, 15 Jul 2020 02:44:19 +0000 (02:44 +0000)]
prvm_edict: Implement __fullspawndata. Testing only; don't use in production yet

http://icculus.org/finger/marco?date=2019-01-25&time=05-38-02

The idea of exposing these key/value pairs to QC is great but perhaps a
a better, cleaner method could be used down the road. But this has to be
kept for FTE compatibility.

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

3 years agohost: Shutdown client-only subsystems in CL_Shutdown.
cloudwalk [Wed, 15 Jul 2020 02:44:18 +0000 (02:44 +0000)]
host: Shutdown client-only subsystems in CL_Shutdown.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Patch submitted by kristus <kristustf@gmail.com>

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

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

This reverts commit 6011b7190e2a711d1a46d0389d8c0c7ff7e5ef22.

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

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

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

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

These two are separate known issues.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Patch by Gustaf Alhäll
https://gitlab.com/xonotic/darkplaces/-/merge_requests/50

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Contributed by terencehill.

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

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

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

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

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

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

Famous last words...

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Fix by terencehill

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

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

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

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

Fix by terencehill

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

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

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

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

Prevents potential buffer overflow.

Fix by terencehill

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