]> git.rm.cloudns.org Git - xonotic/darkplaces.git/log
xonotic/darkplaces.git
4 years agoAdd process nice settings to the sys struct
cloudwalk [Sun, 21 Jun 2020 19:55:11 +0000 (19:55 +0000)]
Add process nice settings to the sys struct

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

4 years agoMerge Cmd_Init_Commands into Cmd_Init
cloudwalk [Sun, 21 Jun 2020 19:54:46 +0000 (19:54 +0000)]
Merge Cmd_Init_Commands into Cmd_Init

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

4 years agoRevert "Initialize console commands and cvars before anything else"
cloudwalk [Sun, 21 Jun 2020 19:54:20 +0000 (19:54 +0000)]
Revert "Initialize console commands and cvars before anything else"

This reverts commit c29be2ab7e92f63b899fcc6ac5a2db1ac6707f12.

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

4 years agoPut the loading plaque back in Host_Main for now, so resolution is unbroken
cloudwalk [Sat, 20 Jun 2020 15:40:08 +0000 (15:40 +0000)]
Put the loading plaque back in Host_Main for now, so resolution is unbroken

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

4 years agoAdd missing parens around inline assignment. Fixes +vid_* options in VID_Start
cloudwalk [Sat, 20 Jun 2020 14:52:15 +0000 (14:52 +0000)]
Add missing parens around inline assignment. Fixes +vid_* options in VID_Start

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

4 years agoInitialize console commands and cvars before anything else
cloudwalk [Sat, 20 Jun 2020 14:51:49 +0000 (14:51 +0000)]
Initialize console commands and cvars before anything else

The idea is to divide initialization into stages. I'm starting with
cvars and commands. Next will be memory allocations.

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

4 years agoRemove commented out code/unused prototype
cloudwalk [Sat, 20 Jun 2020 03:30:00 +0000 (03:30 +0000)]
Remove commented out code/unused prototype

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

4 years agoSplit off common CRC16 and MSG_ functions into separate files
cloudwalk [Sat, 20 Jun 2020 03:29:39 +0000 (03:29 +0000)]
Split off common CRC16 and MSG_ functions into separate files

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

4 years agoDefer menu initialization until after stuffcmds. Implemented MP_Start_f
cloudwalk [Sat, 20 Jun 2020 01:00:27 +0000 (01:00 +0000)]
Defer menu initialization until after stuffcmds. Implemented MP_Start_f

Also start loading plaque in CL_Init.

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

4 years agoRemove vid.samples checks when switching modes. Engine doesn't have MSAA anymore
cloudwalk [Sat, 20 Jun 2020 01:00:02 +0000 (01:00 +0000)]
Remove vid.samples checks when switching modes. Engine doesn't have MSAA anymore

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

4 years agoImplement command-line support for setting vid_borderless
cloudwalk [Sat, 20 Jun 2020 00:59:37 +0000 (00:59 +0000)]
Implement command-line support for setting vid_borderless

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

4 years agoAdd missing video capture ifdefs
cloudwalk [Fri, 19 Jun 2020 15:36:52 +0000 (15:36 +0000)]
Add missing video capture ifdefs

Fix from nico: https://gitlab.com/xonotic/darkplaces/-/merge_requests/93
Fixed up indentation in a few of the #ifdefs

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

4 years agoHost_Main improvements. Workaround to avoid crash with +map no longer needed.
cloudwalk [Fri, 19 Jun 2020 15:24:18 +0000 (15:24 +0000)]
Host_Main improvements. Workaround to avoid crash with +map no longer needed.

* FreeType2 now tries to load by default, regardless of game.
  This fixes font issues if this cvar is turned off after the subsystem
  is already initialized. This has no side effects in Quake as far as I
  can tell.

* Host_StartVideo has been moved to CL_Init where it honestly should be.
  This makes it easier to initialize the engine without a client
  compiled in. The FT2 fix allows initialization to happen early without
  screwing with the fonts.

* VID_Start will now parse +vid_width and +vid_height just the same as
  -width and -height, as well as +vid_fullscreen 1 and 0 for -fullscreen
  and -window respectively.

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

4 years agoFix black screen during any loading screen if the console is open
cloudwalk [Fri, 19 Jun 2020 12:27:06 +0000 (12:27 +0000)]
Fix black screen during any loading screen if the console is open

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

4 years agoIn Host_Main, clarify the purpose of a few of the timers by renaming them
cloudwalk [Fri, 19 Jun 2020 12:26:41 +0000 (12:26 +0000)]
In Host_Main, clarify the purpose of a few of the timers by renaming them

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

4 years agoIn Host_Main, remove timer check. sv_timer and cl_timer are always > 0
cloudwalk [Fri, 19 Jun 2020 12:26:16 +0000 (12:26 +0000)]
In Host_Main, remove timer check. sv_timer and cl_timer are always > 0

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

4 years agoIn Host_Main, loop until host.state == host_shutdown instead of infinitely.
cloudwalk [Fri, 19 Jun 2020 12:25:50 +0000 (12:25 +0000)]
In Host_Main, loop until host.state == host_shutdown instead of infinitely.

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

4 years agoAdd libxmp files to VS projects
cloudwalk [Thu, 18 Jun 2020 16:58:08 +0000 (16:58 +0000)]
Add libxmp files to VS projects

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

4 years agolibxmp: minor fixes and cleanup
cloudwalk [Thu, 18 Jun 2020 16:57:43 +0000 (16:57 +0000)]
libxmp: minor fixes and cleanup

* fix a missing ifdef
* adjust developer console output
* check the library version when linking to shared lib too
* comment a unused API function

Patch from nico: https://gitlab.com/xonotic/darkplaces/-/merge_requests/92

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

4 years agoDisable readonly on two cvars so recent improvements actually work
cloudwalk [Thu, 18 Jun 2020 16:57:18 +0000 (16:57 +0000)]
Disable readonly on two cvars so recent improvements actually work

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

4 years agoOrganize system and host globals into structs. Implement host state tracking
cloudwalk [Thu, 18 Jun 2020 16:57:13 +0000 (16:57 +0000)]
Organize system and host globals into structs. Implement host state tracking

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

4 years agoImplement the find command. Basically apropos but three less characters to type
cloudwalk [Wed, 17 Jun 2020 23:50:14 +0000 (23:50 +0000)]
Implement the find command. Basically apropos but three less characters to type

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

4 years agoAdd *.code-workspace to .gitignore
cloudwalk [Wed, 17 Jun 2020 23:35:53 +0000 (23:35 +0000)]
Add *.code-workspace to .gitignore

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

4 years agoFix dumb mistake allowing cheats to be used despite sv_cheats being 0...
cloudwalk [Wed, 17 Jun 2020 16:55:25 +0000 (16:55 +0000)]
Fix dumb mistake allowing cheats to be used despite sv_cheats being 0...

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

4 years agoAuto-register serverfromclient commands to forward to the server on the client
cloudwalk [Wed, 17 Jun 2020 16:55:23 +0000 (16:55 +0000)]
Auto-register serverfromclient commands to forward to the server on the client

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

4 years agoIterate through interpreters and compare with stored bitmasks to add commands
cloudwalk [Wed, 17 Jun 2020 01:30:38 +0000 (01:30 +0000)]
Iterate through interpreters and compare with stored bitmasks to add commands

This is much, much simpler. This also fixes an issue where quite a few
of the userinfo commands couldn't be used while disconnected.

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

4 years agoPrepend unbindall to config.cfg to override default.cfg binds
cloudwalk [Tue, 16 Jun 2020 16:37:27 +0000 (16:37 +0000)]
Prepend unbindall to config.cfg to override default.cfg binds

The engine will now respect the user's binds, even if they're all blank.

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

4 years agoCorrect wrong function names in the VM_SAFEPARMCOUNT calls, found by terencehill
cloudwalk [Tue, 16 Jun 2020 14:52:30 +0000 (14:52 +0000)]
Correct wrong function names in the VM_SAFEPARMCOUNT calls, found by terencehill

These didn't break the built-ins, because they just applied to error
messages.

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

4 years agoImplement "forcenearest" particle effect key, ported from wrath-darkplaces
cloudwalk [Tue, 16 Jun 2020 14:52:29 +0000 (14:52 +0000)]
Implement "forcenearest" particle effect key, ported from wrath-darkplaces

Fixed compile warning too.

Ported by Mario: https://gitlab.com/xonotic/darkplaces/-/merge_requests/79

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

4 years agoImplement XMP module sound support
cloudwalk [Tue, 16 Jun 2020 13:41:46 +0000 (13:41 +0000)]
Implement XMP module sound support

This implements support for libxmp in the engine. It will dlopen by
default and is therefore not a strict dependency.

Implementation by nyov: https://gitlab.com/xonotic/darkplaces/-/merge_requests/8
Updated for darkplaces trunk/master by nico: https://gitlab.com/xonotic/darkplaces/-/merge_requests/88

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

4 years agoClean up makefiles a bit. Remove leftovers of stuff no longer in the engine
cloudwalk [Tue, 16 Jun 2020 12:39:51 +0000 (12:39 +0000)]
Clean up makefiles a bit. Remove leftovers of stuff no longer in the engine

Slightly clean up the makefiles. 3DRAS and D3D don't exist in the engine
anymore.

Fix from nico: https://gitlab.com/xonotic/darkplaces/-/merge_requests/91

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

4 years agoMove variable paintbuffer_unswapped into CONFIG_VIDEO_CAPTURE, unused without it
cloudwalk [Mon, 15 Jun 2020 17:53:37 +0000 (17:53 +0000)]
Move variable paintbuffer_unswapped into CONFIG_VIDEO_CAPTURE, unused without it

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

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

4 years agoProperly implement borderless windowed mode support
cloudwalk [Mon, 15 Jun 2020 17:22:33 +0000 (17:22 +0000)]
Properly implement borderless windowed mode support

Several new cvars control behavior. It can ignore the Windows taskbar
and compatibility with overlays (Steam, Discord, etc) should be fine
with SDL_HINT_MOUSE_FOCUS_CLICKTHROUGH.

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

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

4 years agoAdd cvar to disable engine stats >= 220. Suppresses warnings in Xonotic
cloudwalk [Mon, 15 Jun 2020 17:22:32 +0000 (17:22 +0000)]
Add cvar to disable engine stats >= 220. Suppresses warnings in Xonotic

This is transitional until proper infrastructure to handle stats in a
generic fashion is implemented. This stuff doesn't really belong in the
engine if the eventual goal is to move native gamecode out of it.

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

4 years agoPlay chat sound defined by cvars rather than hardcoded strings
cloudwalk [Mon, 15 Jun 2020 02:11:31 +0000 (02:11 +0000)]
Play chat sound defined by cvars rather than hardcoded strings

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

4 years agoDon't enable moncontrol if non-glibc on Linux. Fixes linking against musl
cloudwalk [Mon, 15 Jun 2020 00:47:35 +0000 (00:47 +0000)]
Don't enable moncontrol if non-glibc on Linux. Fixes linking against musl

Partially from https://gitlab.com/xonotic/darkplaces/-/merge_requests/86

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

4 years agoAvoid setting "r_transparent_sortmindist" to 0 every frame if already 0
cloudwalk [Mon, 15 Jun 2020 00:47:34 +0000 (00:47 +0000)]
Avoid setting "r_transparent_sortmindist" to 0 every frame if already 0

If an integer is less than 1, it can only be 0. This should fix console
spam with developer_extra 1.

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

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

4 years agoTurned on the defogger (Don't apply fog to UI. Check notrippy == true)
cloudwalk [Mon, 15 Jun 2020 00:20:45 +0000 (00:20 +0000)]
Turned on the defogger (Don't apply fog to UI. Check notrippy == true)

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

4 years agoUse stdint.h types instead of self-defined dp[u]int
cloudwalk [Mon, 15 Jun 2020 00:20:44 +0000 (00:20 +0000)]
Use stdint.h types instead of self-defined dp[u]int

Mainly for consistency and type safety, and to clean up qtypes.h a bit
more.

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

4 years agoClean up qtypes.h a bit by including stdbool.h no matter what, removing checks
cloudwalk [Mon, 15 Jun 2020 00:20:44 +0000 (00:20 +0000)]
Clean up qtypes.h a bit by including stdbool.h no matter what, removing checks

Every major compiler includes it, including VS2013 and higher, so the
vast, vast majority of people shouldn't be affected by this. Every major
compiler's stdbool.h also checks for C++ anyway. These checks are
redundant.

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

4 years agoRemove remnants of hook system from vs projects
cloudwalk [Mon, 15 Jun 2020 00:20:43 +0000 (00:20 +0000)]
Remove remnants of hook system from vs projects

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

4 years agoDisable sound for cvar notify. Use \003 mask, meant for notifications in chat
cloudwalk [Mon, 15 Jun 2020 00:20:43 +0000 (00:20 +0000)]
Disable sound for cvar notify. Use \003 mask, meant for notifications in chat

Ironically, I took a cue from Source Engine enabling this by default,
but realized later that not even Source plays a chat sound for cvar
notifications, which people rightfully complained about, due to being
spammy and annoying.

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

4 years agoCorrect the value of CMD_SHARED. Fixes map command
cloudwalk [Sun, 14 Jun 2020 13:15:38 +0000 (13:15 +0000)]
Correct the value of CMD_SHARED. Fixes map command

...and other CMD_SHARED commands.

Updated the bitmasks but forgot to update the value of CMD_SHARED to
reflect the change. The client can only see CMD_CLIENT commands.
It was only adding to CMD_SERVER. Oops.

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

4 years agoInitial implementation of command flag system
cloudwalk [Thu, 11 Jun 2020 15:59:58 +0000 (15:59 +0000)]
Initial implementation of command flag system

This should reduce code duplication and allows other cool things.
This is part of the solution to a bug where "stuffcmds" stopped working
because of changes to the initialization order in Host_Init. More work
needs to be done but this should be fine for now.

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

4 years agoDelete the cmd_clientfromserver interpreter. Use cmd_client instead
cloudwalk [Thu, 11 Jun 2020 14:46:58 +0000 (14:46 +0000)]
Delete the cmd_clientfromserver interpreter. Use cmd_client instead

This should eliminate an entire class of bugs related to commands
missing from the appropriate interpreter.

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

4 years agoFix misspelling
cloudwalk [Thu, 11 Jun 2020 13:47:23 +0000 (13:47 +0000)]
Fix misspelling

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

4 years agoCorrect typo
cloudwalk [Wed, 10 Jun 2020 22:56:07 +0000 (22:56 +0000)]
Correct typo

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

4 years agoCode style improvements
cloudwalk [Wed, 10 Jun 2020 13:33:21 +0000 (13:33 +0000)]
Code style improvements

Partially from https://gitlab.com/xonotic/darkplaces/-/merge_requests/85

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

4 years agoForbid use of ctrl+alt combo in console. Fixes altgr usage on some layouts
cloudwalk [Wed, 10 Jun 2020 05:19:24 +0000 (05:19 +0000)]
Forbid use of ctrl+alt combo in console. Fixes altgr usage on some layouts

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

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

4 years agoClamp clipboard data to MAX_INPUTLINE. Fixes heap overflow with console input
cloudwalk [Wed, 10 Jun 2020 05:08:41 +0000 (05:08 +0000)]
Clamp clipboard data to MAX_INPUTLINE. Fixes heap overflow with console input

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

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

4 years agoGive cvar aliases purple color
cloudwalk [Tue, 9 Jun 2020 15:39:59 +0000 (15:39 +0000)]
Give cvar aliases purple color

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

4 years agoRearrange cvar help to fix compatibility with some regex parsing of cvar help
cloudwalk [Tue, 9 Jun 2020 14:58:45 +0000 (14:58 +0000)]
Rearrange cvar help to fix compatibility with some regex parsing of cvar help

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

4 years agoPrint cvar aliases in apropos and cvarlist output properly
cloudwalk [Tue, 9 Jun 2020 14:58:45 +0000 (14:58 +0000)]
Print cvar aliases in apropos and cvarlist output properly

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

4 years agoDelete empty files
cloudwalk [Mon, 8 Jun 2020 22:59:23 +0000 (22:59 +0000)]
Delete empty files

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

4 years agoAdd missing modulo in cvar hashtable lookup
cloudwalk [Mon, 8 Jun 2020 22:12:18 +0000 (22:12 +0000)]
Add missing modulo in cvar hashtable lookup

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

4 years agoStray tab begone
cloudwalk [Mon, 8 Jun 2020 21:55:18 +0000 (21:55 +0000)]
Stray tab begone

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

4 years agoFix scope screwup preventing apropos from printing cvars
cloudwalk [Mon, 8 Jun 2020 21:36:07 +0000 (21:36 +0000)]
Fix scope screwup preventing apropos from printing cvars

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

4 years agoAdd topcolor to clientfromserver so quake15 stops spamming the console
cloudwalk [Mon, 8 Jun 2020 15:33:27 +0000 (15:33 +0000)]
Add topcolor to clientfromserver so quake15 stops spamming the console

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

4 years agoFix (workaround?) crashes with quake15 mod
cloudwalk [Mon, 8 Jun 2020 15:33:26 +0000 (15:33 +0000)]
Fix (workaround?) crashes with quake15 mod

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

4 years agoReimpl. the cvar alias system. Reimpl. the cvar hash table as a distinct type
cloudwalk [Mon, 8 Jun 2020 14:46:12 +0000 (14:46 +0000)]
Reimpl. the cvar alias system. Reimpl. the cvar hash table as a distinct type

It is now type-safe, cleaner, and doesn't require new static cvar_t's
for each alias. The hash table being implemented as a distinct type
allows multiple hashes to point to the same cvar without having to
create a new cvar_t for each alias.

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

4 years agoRevert the cvar alias system, as a checkpoint pending an overhaul
cloudwalk [Mon, 8 Jun 2020 14:46:11 +0000 (14:46 +0000)]
Revert the cvar alias system, as a checkpoint pending an overhaul

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

4 years agoDon't use an enum as a type directly. Helps fix C++ compilation.
cloudwalk [Mon, 8 Jun 2020 14:46:10 +0000 (14:46 +0000)]
Don't use an enum as a type directly. Helps fix C++ compilation.

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

4 years agoAdd a few explicit typecasts to help fix C++ compilation
cloudwalk [Mon, 8 Jun 2020 14:46:10 +0000 (14:46 +0000)]
Add a few explicit typecasts to help fix C++ compilation

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

4 years agoRemove hook system. Was a fun little experiment but is too bulky and impractical
cloudwalk [Mon, 8 Jun 2020 14:46:09 +0000 (14:46 +0000)]
Remove hook system. Was a fun little experiment but is too bulky and impractical

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

4 years agoFix apropos crash when it reaches cvar alias
cloudwalk [Sat, 6 Jun 2020 18:11:34 +0000 (18:11 +0000)]
Fix apropos crash when it reaches cvar alias

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

4 years agoRename a few of the fake loss and fake latency cvars
cloudwalk [Sat, 6 Jun 2020 18:11:34 +0000 (18:11 +0000)]
Rename a few of the fake loss and fake latency cvars

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

4 years agoRename all of the show* cvars to a more consistent convention. Made them aliases
cloudwalk [Sat, 6 Jun 2020 18:11:33 +0000 (18:11 +0000)]
Rename all of the show* cvars to a more consistent convention. Made them aliases

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

4 years agoFix crash when autocompleting a cvar alias
cloudwalk [Sat, 6 Jun 2020 18:11:32 +0000 (18:11 +0000)]
Fix crash when autocompleting a cvar alias

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

4 years agoInitial implementation of cvar aliases, with slowmo as a starting example
cloudwalk [Sat, 6 Jun 2020 18:11:31 +0000 (18:11 +0000)]
Initial implementation of cvar aliases, with slowmo as a starting example

This allows cvars to be renamed, and keep the old cvar by pointing it to
the new one. Pretty much every cvar finding function has been adapted to
return a the aliased cvar or the alias itself depending on context.

For example, if a value is needed, it'll dereference the alias. If the
cvar is needed to be listed somewhere or to check if the cvar merely
exists, it will not. Other than that, it's pretty straightforward.

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

4 years agoRevert "Disable occlusion query on Intel. Can be force-enabled. Hopefully temporary"
cloudwalk [Sat, 6 Jun 2020 14:02:55 +0000 (14:02 +0000)]
Revert "Disable occlusion query on Intel. Can be force-enabled. Hopefully temporary"

This reverts commit d26e81de699c51e5be2b630649e7f853aadea2cd.

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

4 years agoDisable occlusion query on Intel. Can be force-enabled. Hopefully temporary
cloudwalk [Sat, 6 Jun 2020 01:35:55 +0000 (01:35 +0000)]
Disable occlusion query on Intel. Can be force-enabled. Hopefully temporary

The previous occlusion query crash is still occurring on Intel
for reasons totally elusive to me. I'm tempted to think it's a driver
bug, but honestly I'm not sure.

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

4 years agoDraw coronas with the same cscale whether gl_flashblend or not. Fixes brightness
cloudwalk [Fri, 5 Jun 2020 14:55:28 +0000 (14:55 +0000)]
Draw coronas with the same cscale whether gl_flashblend or not. Fixes brightness

This should fix the ridiculously high brightness of coronas in pretty
much every game, when gl_flashblend is 1. This brings it closer to what
coronas looked like in 2014.

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

4 years agoChange tabs into spaces for a console print so it does not show weird glyphs ingame
cloudwalk [Fri, 5 Jun 2020 13:42:52 +0000 (13:42 +0000)]
Change tabs into spaces for a console print so it does not show weird glyphs ingame

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

4 years agoFix a few compile warnings from clang
cloudwalk [Thu, 4 Jun 2020 17:32:19 +0000 (17:32 +0000)]
Fix a few compile warnings from clang

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

4 years agoFix ugly typo in a Z_Malloc
cloudwalk [Thu, 4 Jun 2020 17:32:18 +0000 (17:32 +0000)]
Fix ugly typo in a Z_Malloc

It was allocating the size of the string starting from +2 offset rather
than adding 2 bytes. Oops.

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

4 years agoDisable unsupported compiler optimization if CC=clang
cloudwalk [Thu, 4 Jun 2020 16:03:45 +0000 (16:03 +0000)]
Disable unsupported compiler optimization if CC=clang

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

4 years agoImplement cvar callback for slowmo
cloudwalk [Thu, 4 Jun 2020 15:39:39 +0000 (15:39 +0000)]
Implement cvar callback for slowmo

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

4 years agoMake sure the rest of CL_Init only runs on client, matching previous behavior
cloudwalk [Thu, 4 Jun 2020 14:57:35 +0000 (14:57 +0000)]
Make sure the rest of CL_Init only runs on client, matching previous behavior

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

4 years agoHeap-allocate sessionid cvar's string to avoid stack corruption
cloudwalk [Thu, 4 Jun 2020 14:49:55 +0000 (14:49 +0000)]
Heap-allocate sessionid cvar's string to avoid stack corruption

Previously it was trying to shove the address of a local variable, which
is bad.

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

4 years agoFix the +map crash once and for all. Defer stuffcmds until it's safe to run.
cloudwalk [Thu, 4 Jun 2020 12:11:20 +0000 (12:11 +0000)]
Fix the +map crash once and for all. Defer stuffcmds until it's safe to run.

Check if the literal quake.rc file exists rather than using stuffcmds as
an indicator of its existence, and use a new qboolean host_init to defer
stuffcmds.

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

4 years agoFix broken fonts in Xonotic. Start video after quake.rc is parsed.
cloudwalk [Wed, 3 Jun 2020 20:16:03 +0000 (20:16 +0000)]
Fix broken fonts in Xonotic. Start video after quake.rc is parsed.

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

4 years agoImplement a callback for sv_cheats to disable all lingering cheats when set 0
cloudwalk [Wed, 3 Jun 2020 15:28:18 +0000 (15:28 +0000)]
Implement a callback for sv_cheats to disable all lingering cheats when set 0

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

4 years agoImplement cvar callback functionality
cloudwalk [Wed, 3 Jun 2020 15:28:17 +0000 (15:28 +0000)]
Implement cvar callback functionality

With these, cvars can run arbitrary functions to bounds-check themselves or
perform some other task such as cleanup. Use the function Cvar_RegisterCallback.

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

4 years agoFix crash when using +map on cmdline by starting video before parsing configs
cloudwalk [Wed, 3 Jun 2020 15:28:17 +0000 (15:28 +0000)]
Fix crash when using +map on cmdline by starting video before parsing configs

Also removed redundant loading screen call, to avoid resolution weirdness

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

4 years agoFix gamedir command by removing the forced video subsystem shutdown, it was trying...
havoc [Wed, 3 Jun 2020 02:26:30 +0000 (02:26 +0000)]
Fix gamedir command by removing the forced video subsystem shutdown, it was trying to load the loading screen without a running video subsystem and erroring out on the texturearray having mempool == NULL.

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

4 years agoAdd missing server commands to cmd_client so a listen server can use them
cloudwalk [Tue, 2 Jun 2020 14:08:51 +0000 (14:08 +0000)]
Add missing server commands to cmd_client so a listen server can use them

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

4 years agoIn findfloat and findchainfloat, use prvm_vec_t like the rest of the VM
cloudwalk [Tue, 2 Jun 2020 14:03:07 +0000 (14:03 +0000)]
In findfloat and findchainfloat, use prvm_vec_t like the rest of the VM

This caused Xonotic vehicles to delete every CSQC entity on the map due
to a bad comparison between a double and a float.

Big, big thanks to Mario for finding this, yet again.

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

4 years agoAdd missed check for prvm_garbagecollection_enable in LOAD_S opcode
cloudwalk [Tue, 2 Jun 2020 14:03:06 +0000 (14:03 +0000)]
Add missed check for prvm_garbagecollection_enable in LOAD_S opcode

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

4 years agoFix compiler warning
cloudwalk [Tue, 2 Jun 2020 14:03:06 +0000 (14:03 +0000)]
Fix compiler warning

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

4 years agoAdd hook.[ch] to VS2017 project.
havoc [Mon, 1 Jun 2020 08:40:05 +0000 (08:40 +0000)]
Add hook.[ch] to VS2017 project.

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

4 years agoRefactor external texture loading for Q1BSP to set the texture dimensions correctly...
havoc [Mon, 1 Jun 2020 07:12:22 +0000 (07:12 +0000)]
Refactor external texture loading for Q1BSP to set the texture dimensions correctly and also remove some dead code.

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

4 years agoFix a bug with r_batch_debugdynamicvertexpath in R_DrawTextureSurfaceList_Sky where...
havoc [Mon, 1 Jun 2020 03:02:26 +0000 (03:02 +0000)]
Fix a bug with r_batch_debugdynamicvertexpath in R_DrawTextureSurfaceList_Sky where it was trying to use the surface->num_firstvertex rather than the batch info.

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

4 years agoTry to load the uppercase variants of various image files as well
cloudwalk [Sun, 31 May 2020 23:39:30 +0000 (23:39 +0000)]
Try to load the uppercase variants of various image files as well

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

4 years agoWarn if texture is missing in Mod_Mesh_GetTexture
cloudwalk [Sun, 31 May 2020 23:39:29 +0000 (23:39 +0000)]
Warn if texture is missing in Mod_Mesh_GetTexture

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

4 years agoDon't let envmap run if we're not in-game. Fixes crash
cloudwalk [Sun, 31 May 2020 22:26:33 +0000 (22:26 +0000)]
Don't let envmap run if we're not in-game. Fixes crash

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

4 years agoFix broken scissoring with the skybox when r_viewscale > 2
cloudwalk [Sun, 31 May 2020 22:09:46 +0000 (22:09 +0000)]
Fix broken scissoring with the skybox when r_viewscale > 2

Adjusted to the correct resolutions. This happened when deferred shadows
and shadowmapping were both turned off.

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

4 years agoFix multiple bugs with r_viewscale in r_shadow_deferred and r_bloom - they were relyi...
havoc [Sun, 31 May 2020 05:41:15 +0000 (05:41 +0000)]
Fix multiple bugs with r_viewscale in r_shadow_deferred and r_bloom - they were relying on vid.width/vid.height rather than r_fb.screentexturewidth/r_fb.screentextureheight.

Thanks to Cloudwalk for debugging this a fair bit already.

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

4 years agoAdd hook.[ch] to vs2019 project.
havoc [Sun, 31 May 2020 04:43:42 +0000 (04:43 +0000)]
Add hook.[ch] to vs2019 project.

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

4 years agoAdd Cvar_PrintHelp to unify cvar info printing and reduce code duplication
cloudwalk [Sat, 30 May 2020 19:59:12 +0000 (19:59 +0000)]
Add Cvar_PrintHelp to unify cvar info printing and reduce code duplication

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

4 years agoClean up Host_Init a bit by moving other client init routines to CL_Init
cloudwalk [Sat, 30 May 2020 19:59:12 +0000 (19:59 +0000)]
Clean up Host_Init a bit by moving other client init routines to CL_Init

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