]> git.rm.cloudns.org Git - xonotic/darkplaces.git/log
xonotic/darkplaces.git
4 years agoDon't continue loading image if we already have it cached. Fix mapshot caching
cloudwalk [Mon, 25 May 2020 13:59:09 +0000 (13:59 +0000)]
Don't continue loading image if we already have it cached.  Fix mapshot caching

From Slava: "Previously engine wasn't using cached mapshots, so it was reloading
mapshot everytime."

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

4 years agoFix most Q3 & QL glow maps
cloudwalk [Mon, 25 May 2020 13:51:59 +0000 (13:51 +0000)]
Fix most Q3 & QL glow maps

From bones_was_here: "Very few glow maps work in unmodified Q3 maps as they do not use the _glow darkplaces convention, instead Q3 shaders specify the file name to use which is not currently supported.
Fortunately there is a naming convention started in id software's pak0 and continued in QL and most 3rd party maps.  It uses these forms: foo_texture.blend.ext and bar_texture_blend.ext
It's not possible to fix 100% of glow maps without parsing Q3 shaders and using the specified file name, but this is a big improvement.
This also fixes a few glow maps in nexcompat, which are originally Q3 textures that were not renamed to _glow."

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

4 years agoFix visual regression where parts of the Xonotic menu lacked transparency.
cloudwalk [Mon, 25 May 2020 12:51:08 +0000 (12:51 +0000)]
Fix visual regression where parts of the Xonotic menu lacked transparency.

Set ent->render.alpha to its old value of 0.999999f. This doesn't seem to break
anything else, or anything that was recently fixed. There's probably a better
fix, but this is simple and seems to work for now.

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

4 years agoForcibly disable the alphatocoverage feature because we don't currently use MSAA...
havoc [Mon, 25 May 2020 08:13:16 +0000 (08:13 +0000)]
Forcibly disable the alphatocoverage feature because we don't currently use MSAA antialiasing and it only works for that, resulting in broken rendering.

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

4 years agoAllow r_viewscale to be set to values higher than 1 for super-sample antialiasing...
havoc [Mon, 25 May 2020 08:11:22 +0000 (08:11 +0000)]
Allow r_viewscale to be set to values higher than 1 for super-sample antialiasing, also integrate vid_samples into this calculation to restore old behavior somewhat (super-sampling is more expensive than multisampling, so this isn't a great solution yet, but it brings back the quality).  Still need to implement a better SSAA filter for when the antialiasing is in effect.

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

4 years agoAdd csqc_polygons_defaultmaterial_nocullface cvar which defaults to 1 in nexuiz and...
havoc [Mon, 25 May 2020 08:10:04 +0000 (08:10 +0000)]
Add csqc_polygons_defaultmaterial_nocullface cvar which defaults to 1 in nexuiz and xonotic derived games, this restores the compatible behavior with older versions of the engine.  It defaults to 0 in other games (and would be recommended to set to 0 in those games when they make a new release) as it seems like that would be the better default for efficiency (and matches FTEQW engine).

Fixed a bug in CL_MeshEntities_FinalizeRenderEntity where it skipped finalize when the entity has no surfaces, but since it is still included in the render entities list it was rendering garbage when unused.

Use the "$whiteimage" texture for CSQC/UI polygons (VM_CL_R_PolygonBegin) that specify texture "", to be compatible with older versions.

Clarify the name of a parameter on Mod_Mesh_GetTexture prototype to match the implementation as it was misleading otherwise.

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

4 years agoAdd support for textures named "*white" and "$whiteimage" in the embedded image loade...
havoc [Mon, 25 May 2020 07:17:51 +0000 (07:17 +0000)]
Add support for textures named "*white" and "$whiteimage" in the embedded image loader, for better Q3 shader compatibility.

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

4 years agoReworked VM_CL_PolygonBegin/Vertex/End functions to do the commit to the mesh in...
havoc [Mon, 25 May 2020 04:18:02 +0000 (04:18 +0000)]
Reworked VM_CL_PolygonBegin/Vertex/End functions to do the commit to the mesh in PolygonEnd, this allows it to examine if alpha is used on vertices and request different variants of a material according to such discoveries.

Refactored CL_MeshEntities_AddToScene and CL_MeshEntities_Reset to be the more distinct stages of CL_MeshEntities_Scene_Clear (which is called in VM_CL_R_ClearScene), CL_MeshEntities_Scene_AddRenderEntity (which is called during VM_CL_R_AddEntities), and CL_MeshEntities_Scene_FinalizeRenderEntity (which is called during VM_CL_R_RenderScene) - this fixes issues with CSQC predraw functions adding polygons which were not subject to Finalize and thus not rendered.

Fixed Mod_LoadTextureFromQ3Shader handling of texture name "" to properly set basematerialflags, this fixes invisible polygons in some games such as Xonotic.

Refactored CL_Mesh_CSQC and CL_Mesh_Debug into CL_Mesh_Scene - not really a need for more than one mesh to overlay on the world.

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

4 years agoRefactored VM_SV_AddStat to allow overrides of all stats (0..255) in a more consisten...
havoc [Mon, 25 May 2020 04:10:27 +0000 (04:10 +0000)]
Refactored VM_SV_AddStat to allow overrides of all stats (0..255) in a more consistent way, added warnings if overriding engine stats.

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

4 years agoAdd MSVS2019 project and solution files.
havoc [Sun, 24 May 2020 17:43:08 +0000 (17:43 +0000)]
Add MSVS2019 project and solution files.

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

4 years agoFix FS_Seek for compressed file from PK3
cloudwalk [Sun, 24 May 2020 14:18:15 +0000 (14:18 +0000)]
Fix FS_Seek for compressed file from PK3

From Slava: "Currently FS_Seek works incorrectly with compressed files from PK3 but this issue isn't noticed because in most cases engine is using FS_LoadFile which reads file sequentially without seeking."

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

4 years agoRevert "Don't try to spawn if the worldmodel is missing. No way it's playable w/o it"
cloudwalk [Sun, 24 May 2020 13:31:40 +0000 (13:31 +0000)]
Revert "Don't try to spawn if the worldmodel is missing. No way it's playable w/o it"

This reverts commit 621bfbef71c6a151a6191ddbc0fabd0629e830ac.

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

4 years agoRework r_shadow_shadowmode to be more maintainable and understandable - it now caches...
havoc [Sun, 24 May 2020 07:06:25 +0000 (07:06 +0000)]
Rework r_shadow_shadowmode to be more maintainable and understandable - it now caches the values of r_shadow_shadowmapping and r_shadow_deferred, and is now updated when those change, rather than just at startup, and changing those now also causes a recompile of world lights (which always had different bounds when shadowing was on/off, toggling shadows had weird behavior as a result, so this is a bugfix).

This fixes a massive fps drain with settings that disabled shadows entirely by disabling shadowmapping (where r_shadow_shadowmapping 0 and r_shadow_deferred 0 together caused it to reallocate the shadowmap texture every frame and do other bad stuff)

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

4 years agoFix r_celoutlines description to not mention OpenGL 2.x as that's no longer relevant.
havoc [Sun, 24 May 2020 07:04:05 +0000 (07:04 +0000)]
Fix r_celoutlines description to not mention OpenGL 2.x as that's no longer relevant.

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

4 years agoFix a size_t comparison warning by doing the math better.
havoc [Sun, 24 May 2020 07:03:22 +0000 (07:03 +0000)]
Fix a size_t comparison warning by doing the math better.

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

4 years agoAdd curl to clientfromserver interpreter.
cloudwalk [Sun, 24 May 2020 03:42:43 +0000 (03:42 +0000)]
Add curl to clientfromserver interpreter.

Custom maps should now download on Xonotic.

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

4 years agoFix Windows-specific use-after-free causing crash after disconnecting
cloudwalk [Sat, 23 May 2020 22:22:30 +0000 (22:22 +0000)]
Fix Windows-specific use-after-free causing crash after disconnecting

This explicitly deregisters CSQC commands every time CSQC shuts down. This patch
also avoids Z_Malloc'ing the cmd names for each CSQC command and avoids forcing
a Cmd_AddCommand if the command exists.

CSQC was force-adding a command even if it already existed, and when it did,
it would pass a pointer from a mempool that would later get freed when
CSQC shuts down, and Windows' strcasecmp doesn't like dangling pointers.
The Z_Malloc wasn't much better because it could have caused a memory leak.
So the best solution was to only pass the pointer but make sure the commands
are freed when CSQC shuts down.

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

4 years agoPrint "Disconnected" only if actually disconnecting from a server
cloudwalk [Sat, 23 May 2020 06:29:34 +0000 (06:29 +0000)]
Print "Disconnected" only if actually disconnecting from a server

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

4 years agoSlight refactor of loading screen. Starting a local server is now flicker-free
cloudwalk [Sat, 23 May 2020 06:29:33 +0000 (06:29 +0000)]
Slight refactor of loading screen. Starting a local server is now flicker-free

Added SCR_EndLoadingPlaque and added a variable to avoid drawing other 2D
elements while the loading screen is active.

Removed unused parameter in SCR_DrawLoadingScreen

This is a bit of a hacky solution but works for now, pending a bigger refactor.

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

4 years agoPrint when disconnected
cloudwalk [Sat, 23 May 2020 06:29:33 +0000 (06:29 +0000)]
Print when disconnected

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

4 years agoRemove duplicate function call. CL_Disconnect already does this.
cloudwalk [Sat, 23 May 2020 06:29:33 +0000 (06:29 +0000)]
Remove duplicate function call. CL_Disconnect already does this.

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

4 years agoFix regression causing loading screen to flicker while in game
cloudwalk [Fri, 22 May 2020 01:54:30 +0000 (01:54 +0000)]
Fix regression causing loading screen to flicker while in game

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

4 years agoFix missing loading screen text. A redraw must always occur when pushing.
cloudwalk [Thu, 21 May 2020 18:57:50 +0000 (18:57 +0000)]
Fix missing loading screen text. A redraw must always occur when pushing.

A DrawQ_Finish call is also required. For loading text to work early in startup, Mod_Mesh_Create must be called early as well.

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

4 years agoMake Sys_Error message more generic. Quake -> Engine
cloudwalk [Thu, 21 May 2020 15:02:54 +0000 (15:02 +0000)]
Make Sys_Error message more generic. Quake -> Engine

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

4 years agoNew prvm_stringdebug cvar to print string-related warnings. Off by default.
cloudwalk [Wed, 20 May 2020 22:48:07 +0000 (22:48 +0000)]
New prvm_stringdebug cvar to print string-related warnings. Off by default.

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

4 years agoRevert "Set prvm_garbagecollection_enable to 0 by default."
cloudwalk [Wed, 20 May 2020 22:38:23 +0000 (22:38 +0000)]
Revert "Set prvm_garbagecollection_enable to 0 by default."

This reverts commit 138f6e1360565ecd406cb5777ac4c7d2c1c9bb62.

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

4 years agoAdd a few commands to clientfromserver interpreter. Needed for QW connections
cloudwalk [Wed, 20 May 2020 15:22:08 +0000 (15:22 +0000)]
Add a few commands to clientfromserver interpreter. Needed for QW connections

With that, Quakeworld connections should work again.

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

4 years agoRemove signon check for QW reconnect. Client now follows server into next map
cloudwalk [Wed, 20 May 2020 15:22:07 +0000 (15:22 +0000)]
Remove signon check for QW reconnect. Client now follows server into next map

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

4 years agoPrint different message for invalid sv->cl cmd. Improve consistency overall
cloudwalk [Wed, 20 May 2020 15:22:07 +0000 (15:22 +0000)]
Print different message for invalid sv->cl cmd. Improve consistency overall

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

4 years agoMake sure the server<->client interpreters run.
cloudwalk [Wed, 20 May 2020 15:22:06 +0000 (15:22 +0000)]
Make sure the server<->client interpreters run.

This will help fix QW connections but a few more fixes will be needed.

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

4 years agoMake connections atomic. Disconnect before trying to connect.
cloudwalk [Wed, 20 May 2020 15:22:06 +0000 (15:22 +0000)]
Make connections atomic. Disconnect before trying to connect.

Fixes an issue where a demo freezes in place if you try to connect while one is
running. This also has the side effect of eliminating a duplicate call to
CL_StopPlayback, which is called by both CL_EstablishConnection and
CL_Disconnect (which is itself called by NetConn_ConnectionEstablished).

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

4 years agoDon't try to spawn if the worldmodel is missing. No way it's playable w/o it
cloudwalk [Wed, 20 May 2020 15:22:05 +0000 (15:22 +0000)]
Don't try to spawn if the worldmodel is missing. No way it's playable w/o it

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

4 years agoSet prvm_garbagecollection_enable to 0 by default.
cloudwalk [Wed, 20 May 2020 15:22:05 +0000 (15:22 +0000)]
Set prvm_garbagecollection_enable to 0 by default.

Also made it CVAR_SAVE for convenience when testing, so one doesn't have to
remember to enable it every time. This is temporary.

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

4 years agoReset r_shadow_occlusion_buf on vid_restart. Fixes query buffer dangling pointer
cloudwalk [Tue, 19 May 2020 18:52:55 +0000 (18:52 +0000)]
Reset r_shadow_occlusion_buf on vid_restart. Fixes query buffer dangling pointer

Basically, when coronas appear when r_coronas_occlusionquery is 1, the engine
binds to a query buffer and stores a pointer to it in r_shadow_occlusion_buf.
Upon vid_restart, somewhere along the way, the buffer is cleared but the
original pointer is kept, resulting in a crash next time a corona appears.

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

4 years agoTemporary workaround for tempstring offset console spam in Xonotic.
cloudwalk [Tue, 19 May 2020 14:06:35 +0000 (14:06 +0000)]
Temporary workaround for tempstring offset console spam in Xonotic.

Check if garbage collection is enabled before calling PRVM_GetString when handling OP_STORE_S or OP_STOREP_S

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

4 years agoAdd gameversion_[min,max] to CVAR_SERVER.
cloudwalk [Mon, 18 May 2020 15:48:39 +0000 (15:48 +0000)]
Add gameversion_[min,max] to CVAR_SERVER.

Fixes broken version check that prevents the player from spawning in Xonotic.

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

4 years agoImplement chromatic aberration, configurable with r_colorfringe cvar.
cloudwalk [Mon, 18 May 2020 15:48:37 +0000 (15:48 +0000)]
Implement chromatic aberration, configurable with r_colorfringe cvar.
Do note that it is disabled by default and values higher than 0.025 will distort the image.

Taken from a merge request by cjayho.

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

4 years agoFix a few compile warnings. Remove unused locals.
cloudwalk [Mon, 18 May 2020 15:05:42 +0000 (15:05 +0000)]
Fix a few compile warnings. Remove unused locals.

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

4 years agoFix duplicate Cmd_AddCommand(s). Their funcs already forward to server.
cloudwalk [Mon, 18 May 2020 15:05:41 +0000 (15:05 +0000)]
Fix duplicate Cmd_AddCommand(s). Their funcs already forward to server.

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

4 years agoFix invalid offset spam when r_showbboxes_client is > 0
cloudwalk [Mon, 18 May 2020 14:26:20 +0000 (14:26 +0000)]
Fix invalid offset spam when r_showbboxes_client is > 0
This checks for server progs before touching viewmodelforclient as it's apparently not a client field.

From Mario (Xonotic)

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

4 years agoFix r_water_lowquality description
cloudwalk [Mon, 18 May 2020 14:22:16 +0000 (14:22 +0000)]
Fix r_water_lowquality description
From terencehill (Xonotic)

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

4 years agoDon't print warning when QC simply checks if a cachepic exists.
cloudwalk [Mon, 18 May 2020 14:09:42 +0000 (14:09 +0000)]
Don't print warning when QC simply checks if a cachepic exists.
From Mario (Xonotic).

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

4 years agoFix a few bugs detected by Cppcheck
cloudwalk [Mon, 18 May 2020 03:10:15 +0000 (03:10 +0000)]
Fix a few bugs detected by Cppcheck
(warning) Logical conjunction always evaluates to false: matchrule < 0 && matchrule > 5.
(style) Condition 'k<16' is always true
(style) Variable 'settings->bounceminimumintensity2' is reassigned a value before the old one has been used.

From terencehill

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

4 years agoSilence some noisy font-related prints. Make them debug prints.
cloudwalk [Sun, 17 May 2020 21:02:20 +0000 (21:02 +0000)]
Silence some noisy font-related prints. Make them debug prints.
From Mario.

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

4 years agoUse SDL_GameController instead of SDL_Joystick where possible
cloudwalk [Sun, 17 May 2020 20:53:49 +0000 (20:53 +0000)]
Use SDL_GameController instead of SDL_Joystick where possible

SDL_GameController provides mappings between axis and button indices and a
general layout that is similar to a XBox 360 controller. Since this layout is
common, these changes allow creating proper controller mappings for a large
variety of gamepad/OS combinations out of the box.

Change initially provided by EACFreddy. Fixed multiple crashes due to a stale
pointer. Also made a Con_Printf a DPrintf and removed ifdefs for SDL2 since
master doesn't support SDL1 anymore.

There's a strange stick drift problem. It might be my controller but
it'll have to be investigated further.

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

4 years agoMake use of CACHEPICFLAG_FAILONMISSING flag for conback if missing content
cloudwalk [Sat, 16 May 2020 20:12:43 +0000 (20:12 +0000)]
Make use of CACHEPICFLAG_FAILONMISSING flag for conback if missing content

This makes the console readable if game content is missing, by rendering
solid black, just like before.

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

4 years agoIn Q3 shader, generate white texture for *white too.
cloudwalk [Sat, 16 May 2020 19:55:55 +0000 (19:55 +0000)]
In Q3 shader, generate white texture for *white too.

This adds an extra strcmp to check for #white, and by extension, *white.

Patch contributed by Mario from Xonotic team.

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

4 years agoClear the skybox textures on map load. Use memset to clear skyname.
cloudwalk [Sat, 16 May 2020 19:37:37 +0000 (19:37 +0000)]
Clear the skybox textures on map load. Use memset to clear skyname.

This fixes an issue where the skybox textures of the first map you load
stick around in subsequent maps. There was a missing call to
R_SkinFrame_PurgeSkinFrame. Also use memset to clear skyname for good
measure. This may not have actually been part of the bug but it's harmless
and it wasn't clearing the entire array previously.

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

4 years agoAdd "cmd" command to cmd_clientfromserver interpreter because QW signon
havoc [Fri, 17 Apr 2020 02:01:23 +0000 (02:01 +0000)]
Add "cmd" command to cmd_clientfromserver interpreter because QW signon
process uses this, thanks to Spoike for pointing out this oversight.

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

4 years agoFix the corona bug. The render bug only though.
divverent [Mon, 23 Mar 2020 20:37:56 +0000 (20:37 +0000)]
Fix the corona bug. The render bug only though.

This is done by reviving alphamod and colormod arguments of
RSurf_ActiveCustomEntity.

The current implementation is a bit rough and needlessly copies the
worldentity; the struct isn't huge though and it's only done when
actually colormodding (and thus only for coronas, r_editlights, a few
sprites and nomodels).

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

4 years agoSimplify R_DrawCustomSurface by calling R_DrawCustomSurface_Texture.
divverent [Mon, 23 Mar 2020 20:37:55 +0000 (20:37 +0000)]
Simplify R_DrawCustomSurface by calling R_DrawCustomSurface_Texture.

Also, removed some stuff that's redundant with R_GetCurrentTexture.

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

4 years agoAdd a Quake Live-style mouse acceleration mode.
divverent [Sun, 15 Mar 2020 01:45:25 +0000 (01:45 +0000)]
Add a Quake Live-style mouse acceleration mode.

Its cvars are m_accel_power*, and the cvar meanings are as close as possible
to the ezQuake implementation (as its source is available). Names differ though
due to conflicts with the current linear acceleration mode.

Original code by Frank <franparpe@franparpe.org>, cleanups by Rudolf Polzer <divVerent@xonotic.org>.

From: Frank <franparpe@franparpe.org>

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

4 years agoAnother flag bites the dust. This time: -ffinite-math-only.
divverent [Sat, 22 Feb 2020 03:47:48 +0000 (03:47 +0000)]
Another flag bites the dust. This time: -ffinite-math-only.

Since GCC 5, with this flag set, NaN compares equal to zero in some cases but
not others. Causes e.g. "attempted division by zero" error spam from this QC
code:

float x = nan("");
if (x == 0) {
  return 0;
}
return 1.0 / x;

Yes, those NaNs should not be happening in the first place, but suddenly
passing some but not all equality checks to zero seems rather dangerous.

Reference: issue #2412 (not a fix for it; the QC code has a problem too but
this change helps track it down properly).

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

4 years agoFix snd_null prototype for a function which broke the dedicated server
havoc [Thu, 6 Feb 2020 15:31:04 +0000 (15:31 +0000)]
Fix snd_null prototype for a function which broke the dedicated server
build.

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

4 years agoImplemented garbage collection of lost references to strzone strings in the PRVM...
havoc [Thu, 6 Feb 2020 14:43:18 +0000 (14:43 +0000)]
Implemented garbage collection of lost references to strzone strings in the PRVM, this is controlled by several prvm_garbagecollection_* cvars, and can notify when this occurs.

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

4 years agoAnother file without svn:eol-style.
divverent [Wed, 29 Jan 2020 22:47:34 +0000 (22:47 +0000)]
Another file without svn:eol-style.

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

4 years agoSet svn:eol-style=native property on taskqueue.[ch]
havoc [Wed, 29 Jan 2020 22:45:31 +0000 (22:45 +0000)]
Set svn:eol-style=native property on taskqueue.[ch]

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

4 years agoFix line endings on taskqueue.[ch]
havoc [Wed, 29 Jan 2020 22:41:19 +0000 (22:41 +0000)]
Fix line endings on taskqueue.[ch]

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

4 years agoAdd the missing cmd_userdefined_all and cmd_userdefined_null needed by the previous...
havoc [Thu, 23 Jan 2020 21:47:02 +0000 (21:47 +0000)]
Add the missing cmd_userdefined_all and cmd_userdefined_null needed by the previous change.

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

4 years agoMove tracking of aliases and csqc function overrides to a separate cmd_userdefined_t...
havoc [Thu, 23 Jan 2020 20:47:27 +0000 (20:47 +0000)]
Move tracking of aliases and csqc function overrides to a separate cmd_userdefined_t structure, this way it can be shared between cmd_client and cmd_clientfromserver.

This restores functionality so that stuffcmd in svqc can create aliases that are usable in the client, and can invoke csqc commands, but still have restrictions on engine commands.

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

4 years agoRemove old decal system, cl_decals_newsystem has been on by default for 10 years...
havoc [Thu, 23 Jan 2020 09:19:18 +0000 (09:19 +0000)]
Remove old decal system, cl_decals_newsystem has been on by default for 10 years now, it was time to remove the old code.

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

4 years agoRedesigned TaskQueue to have a queue and distributor model so that threads can keep...
havoc [Thu, 23 Jan 2020 08:19:11 +0000 (08:19 +0000)]
Redesigned TaskQueue to have a queue and distributor model so that threads can keep their own queues of work to do without locking to check for more work.  Tasks are not executed until TaskQueue_WaitForTaskDone calls TaskQueue_DistributeTasks.

Added a fast path to TaskQueue_DistributeTasks for tasks that are waiting on other tasks to finish first, they are simply dequeued and re-enqueued immediately, and tend to just live on the distributor queue.

TaskQueue thread count is now dynamically adjusted based on tasks being queued per frame, and has a minimum and maximum thread count.

TaskQueue threads now sleep when idle, this may not be ideal, but did substantially lower the cpu usage so that it doesn't make other applications relatively unresponsive like it did before.

Removed taskqueue_task_t->started field and some other unused fields.

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

4 years agoMove the taskqueue_state.numthreads update so that the creation loop works again.
havoc [Thu, 23 Jan 2020 03:03:44 +0000 (03:03 +0000)]
Move the taskqueue_state.numthreads update so that the creation loop works again.

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

4 years agoLower the default value of taskqueue_maxthreads from 32 to 4, as the threads are...
havoc [Thu, 23 Jan 2020 03:02:09 +0000 (03:02 +0000)]
Lower the default value of taskqueue_maxthreads from 32 to 4, as the threads are just spinning - better solution coming.

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

4 years agoFix one typo on rcon_secure_maxdiff - added CVAR_SAVE accidentally during the massive...
havoc [Wed, 22 Jan 2020 10:58:02 +0000 (10:58 +0000)]
Fix one typo on rcon_secure_maxdiff - added CVAR_SAVE accidentally during the massive manual edits.

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

4 years agoChanged loading screen to continue during a connection attempt if the console or...
havoc [Wed, 22 Jan 2020 10:33:30 +0000 (10:33 +0000)]
Changed loading screen to continue during a connection attempt if the console or menu is not forced.

Changed scr_conforcewhiledisconnected 1 to not force the console during a connection attempt, kept the old behavior as scr_conforcewhiledisconnected 2.

If console is already open, the loading screen while connecting is not forced.

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

4 years agoChange default value of scr_loadingscreen_background to 0. It's not clear to me...
havoc [Wed, 22 Jan 2020 09:39:43 +0000 (09:39 +0000)]
Change default value of scr_loadingscreen_background to 0.  It's not clear to me if anyone wants this to be 1, some of the bigger games using the engine set it to 0 already.

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

4 years agoFix drawflag handling in Mod_Mesh_GetTexture by duplicating texture_t when drawflag...
havoc [Wed, 22 Jan 2020 09:25:29 +0000 (09:25 +0000)]
Fix drawflag handling in Mod_Mesh_GetTexture by duplicating texture_t when drawflag overrides differ (it still uses the same skinframe_t so it's not duplicating the actual texture).

This fixes a menu issue in Steel Storm: Burning Retribution where the black text over a hover button was being rendered as MATERIALFLAG_ADD due to DRAWFLAG_ADD being used earlier in the frame on the same font image, which made the text invisible.

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

4 years agoGet rid of texture_t->currentlayers, this is a legacy piece of data that isn't actual...
havoc [Wed, 22 Jan 2020 09:24:19 +0000 (09:24 +0000)]
Get rid of texture_t->currentlayers, this is a legacy piece of data that isn't actually needed - derive the depthmask and blendfunc in other ways.

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

4 years agoSet RENDER_NOSELFSHADOW on the MESH_UI entity to avoid applying the 3D scene's shadow...
havoc [Wed, 22 Jan 2020 09:16:48 +0000 (09:16 +0000)]
Set RENDER_NOSELFSHADOW on the MESH_UI entity to avoid applying the 3D scene's shadows to the UI.

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

4 years agoDisable combining of surfaces in R_PolygonBegin, it makes assumptions that break...
havoc [Wed, 22 Jan 2020 07:21:11 +0000 (07:21 +0000)]
Disable combining of surfaces in R_PolygonBegin, it makes assumptions that break things, and the underlying surface draw will still combine these for us (albeit more slowly).

Thanks to Cloudwalk for the tip, and divVerent and others for debugging in depth.

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

4 years agocvars are now instanced in &cvars_all as a tracking mechanism, there is also &cvars_n...
havoc [Wed, 22 Jan 2020 04:15:01 +0000 (04:15 +0000)]
cvars are now instanced in &cvars_all as a tracking mechanism, there is also &cvars_null if one wishes for no expansion to occur (e.g. client commands received on the server are very untrusted).

cvars now have CVAR_CLIENT and CVAR_SERVER flags, dedicated server can only see CVAR_SERVER variables whereas client can see both because it could start a server.

cvars created via VMs will have the corresponding flag set (client vm and menu vm can see both CVAR_CLIENT and CVAR_SERVER, server vm can only see CVAR_SERVER - may cause issues with singleplayer mods, we'll see).

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

4 years agoSplit the global cmd interpreter into 4 separate ones for specific uses (client conso...
havoc [Tue, 21 Jan 2020 08:36:34 +0000 (08:36 +0000)]
Split the global cmd interpreter into 4 separate ones for specific uses (client console, server console, client commands received from server, server commands received from clients), this is intended to make clients more robust against malicious servers by restricting which commands make sense.

This also hides some network protocol implementation details from the console command interpreter, and makes the command list a lot shorter in dedicated servers.

Changed Cbuf_LockThreadMutex/Cbuf_UnlockThreadMutex to Cbuf_Lock/Cbuf_Unlock and they now use a spinlock internally.

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

4 years agoAdd the needed functions for TaskQueue in thread_null.c and add taskqueue.c
havoc [Sat, 18 Jan 2020 17:05:06 +0000 (17:05 +0000)]
Add the needed functions for TaskQueue in thread_null.c and add taskqueue.c
to makefile.

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

4 years agoAdded appropriate prototypes to taskqueue.h, added call to TaskQueue_Shutdown in...
havoc [Sat, 18 Jan 2020 05:29:46 +0000 (05:29 +0000)]
Added appropriate prototypes to taskqueue.h, added call to TaskQueue_Shutdown in host.c.

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

4 years agoForgot to call TaskQueue_Init during startup, woops.
havoc [Sat, 18 Jan 2020 05:26:11 +0000 (05:26 +0000)]
Forgot to call TaskQueue_Init during startup, woops.

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

4 years agoAdded taskqueue.[ch].
havoc [Sat, 18 Jan 2020 05:14:06 +0000 (05:14 +0000)]
Added taskqueue.[ch].

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

4 years agoSplit out TaskQueue into its own taskqueue.[ch] module, it doesn't depend on SDL2...
havoc [Sat, 18 Jan 2020 04:55:42 +0000 (04:55 +0000)]
Split out TaskQueue into its own taskqueue.[ch] module, it doesn't depend on SDL2 itself.

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

4 years agoR_CanSeeBox no longer uses collision_cache for the random traces, only the fixed...
havoc [Fri, 17 Jan 2020 06:24:40 +0000 (06:24 +0000)]
R_CanSeeBox no longer uses collision_cache for the random traces, only the fixed positions (corners, etc), random rays were simply wasting resources in the collision_cache.

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

4 years agoOverhauled r_shadow_bouncegrid, it performs much faster, makes use of as many threads...
havoc [Fri, 17 Jan 2020 06:22:09 +0000 (06:22 +0000)]
Overhauled r_shadow_bouncegrid, it performs much faster, makes use of as many threads as you wish, and has a nicer calculation for light path accumulation.

r_shadow_bouncegrid now does refractive index calculations on water surfaces, it's not very obvious yet because the traceline doesn't return texture information (if it did, there would be cool caustics effects in dynamic mode).

Implemented TaskQueue system for simple threaded tasks (fibers but less featureful), this is used by r_shadow_bouncegrid but will be used by other parts of the engine in future, also added Thread_Atomic* functions.

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

4 years agoRemoved r_shadow_bouncegrid_bounceanglediffuse functionality, this was annoying to...
havoc [Wed, 15 Jan 2020 12:55:32 +0000 (12:55 +0000)]
Removed r_shadow_bouncegrid_bounceanglediffuse functionality, this was annoying to support and did not actually look good.

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

4 years agoOverhauled bouncegrid light splatting for performance reasons - instead of a series...
havoc [Wed, 15 Jan 2020 12:53:04 +0000 (12:53 +0000)]
Overhauled bouncegrid light splatting for performance reasons - instead of a series of radial dots being accumulated in the texture, it is spherical distance from line segment calculations performed at each pixel, optimized to process pixels in order (filtering down the list of splat paths in each loop).  This is a big framerate increase (as raytracing was not the bottleneck at all), and could be threaded in theory.

This required rebalancing the way that spacing interacts with quality, and the conespread parameter has been eliminated (as measuring distance to a non-uniform capsule seems especially challenging, but maybe that could be added back someday), so all parameters have changed a bit.

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

4 years agoFix UI rendering to not use the bouncegrid texture; it looked interesting on the...
havoc [Wed, 15 Jan 2020 09:01:10 +0000 (09:01 +0000)]
Fix UI rendering to not use the bouncegrid texture; it looked interesting on the console text but was definitely a bug - now tracks a ui parameter on several surface drawing functions, and triggers the notrippy path in the material rendering as one wouldn't want r_trippy affecting UI either.

Fix a bug that caused bouncegrid to render black if any light was culled by traces (return that was supposed to be a continue).

Changed default values for these cvars to make bouncegrid emphasize the bounced light more, but also reduce the intensity:
r_shadow_bouncegrid_dynamic_directionalshading : 0 -> 1
r_shadow_bouncegrid_dynamic_lightradiusscale : 2 -> 5
r_shadow_bouncegrid_dynamic_maxbounce : 2 -> 5
r_shadow_bouncegrid_static_lightradiusscale 2 -> 5
r_shadow_bouncegrid_intensity 4 -> 1

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

4 years agoFix texture binding issues that were breaking r_shadow_bouncegrid.
havoc [Wed, 15 Jan 2020 08:53:10 +0000 (08:53 +0000)]
Fix texture binding issues that were breaking r_shadow_bouncegrid.

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

4 years agoFix a few warnings.
havoc [Wed, 15 Jan 2020 08:52:21 +0000 (08:52 +0000)]
Fix a few warnings.

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

4 years agoCorrect names in credits and make them more consistent.
havoc [Thu, 9 Jan 2020 05:55:06 +0000 (05:55 +0000)]
Correct names in credits and make them more consistent.
Remove ghdigital from dpmaster servers as it hasn't been running for a long time.

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

4 years agoCorrect names in credits and make them more consistent.
havoc [Thu, 9 Jan 2020 05:52:57 +0000 (05:52 +0000)]
Correct names in credits and make them more consistent.
Remove ghdigital master server as it has not been running for a long
time.

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

4 years agoCorrected names in credits to be more accurate and consistent.
havoc [Thu, 9 Jan 2020 05:37:52 +0000 (05:37 +0000)]
Corrected names in credits to be more accurate and consistent.

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

4 years agoFix PRVM_ValueString and PRVM_UglyValueString to check for out of bounds
havoc [Tue, 7 Jan 2020 10:25:49 +0000 (10:25 +0000)]
Fix PRVM_ValueString and PRVM_UglyValueString to check for out of bounds
dereference on a value provided by VM code, and also a NULL pointer
check for another field type.

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

4 years agoExplicitly request the desired GL profile type.
divverent [Tue, 31 Dec 2019 03:44:08 +0000 (03:44 +0000)]
Explicitly request the desired GL profile type.

Might make GLES2 mode work on desktop Linux with GLES2 supporting drivers.

Also make the debug mode work in GLES2 too (if supported, that is; if not SDL is documented to ignore it anyway).

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

4 years agoFixed compile warnings - Corrected formatting of 'if' statements
divverent [Tue, 31 Dec 2019 01:22:55 +0000 (01:22 +0000)]
Fixed compile warnings - Corrected formatting of 'if' statements

From: David Knapp <mazecraze96@gmail.com>

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

5 years agoFix issue with noise during startup
divverent [Fri, 20 Sep 2019 15:27:46 +0000 (15:27 +0000)]
Fix issue with noise during startup

After migrating to SDL2 interfaces there is noise during startup fix
this by initializng buffer as specification requires.

Per SDL_AudioCallback spec:
The callback must completely initialize the buffer; as of SDL 2.0, this buffer is not initialized before the callback is called. If there is nothing to play, the callback should fill the buffer with silence.

Signed-off-by: Amadeusz Sławiński <amade@asmblr.net>
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12480 d7cf8633-e32d-0410-b094-e92efae38249

5 years agoTravis: Force XInput and XRandR support.
divverent [Fri, 13 Sep 2019 00:46:52 +0000 (00:46 +0000)]
Travis: Force XInput and XRandR support.

May fix "window gets withdrawn on startup on Linux fullscreen".

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

5 years agoUpdate Xonotic's SDL version to 2.0.10
divverent [Fri, 23 Aug 2019 23:58:55 +0000 (23:58 +0000)]
Update Xonotic's SDL version to 2.0.10

From: Mario <mario@smbclan.net>

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

5 years ago+ Compiling fix
motorsep [Sun, 26 May 2019 22:05:03 +0000 (22:05 +0000)]
+ Compiling fix

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

5 years agoImplement SDL2 AUDIO_F32 format and use it as the default, since it has become the...
havoc [Sun, 26 May 2019 03:04:36 +0000 (03:04 +0000)]
Implement SDL2 AUDIO_F32 format and use it as the default, since it has become the preferred format of more platforms these days, and SDL2 uses it internally.

Improved the fallback mechanism on SDL2 audio setup - by removing it; SDL2 will tell us what changes it makes for the format, and it will convert the rest automatically.

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

5 years agoRemove a few unused locals.
havoc [Sun, 26 May 2019 03:01:54 +0000 (03:01 +0000)]
Remove a few unused locals.

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

5 years agoRemove code for r_equalize_entities*.
divverent [Mon, 4 Feb 2019 15:09:01 +0000 (15:09 +0000)]
Remove code for r_equalize_entities*.

r_fullbright_directed and slapping EF_FULLBRIGHT on these entities works a lot
better. I believe other than Xonotic nobody uses this, and Xonotic used it only
to make some fullbright stuff prettier and that's been removed for a few months
now.

After this change, older Xonotic versions will complain about nonexisting flag
at startup, but I bet no player will even notice the difference - all it changes
is that EF_FULLBRIGHT entities will appear less directionally, and
r_fullbright_directed 1 will fix this in a better way (already set in current
Xonotic).

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

5 years agoRemove code for r_fakelight.
divverent [Mon, 4 Feb 2019 15:08:59 +0000 (15:08 +0000)]
Remove code for r_fakelight.

We have r_fullbright_directed now, which uses no shader permutation bit and has
a very similar effect.

Yay, less shaders!

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

5 years agoAvoid passing NULLs to glBufferSubData.
divverent [Sun, 3 Feb 2019 02:53:32 +0000 (02:53 +0000)]
Avoid passing NULLs to glBufferSubData.

Fixes crash at startup with Linux intel drivers. Can't tell why it doesn't crash
llvmpipe too.

Sorry, I'm not sure if skipping the entire logic of R_BufferData_Store in this
case is right. It does seem to be though.

If this change is a bad idea, please revert.

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