havoc [Thu, 1 Mar 2007 20:07:20 +0000 (20:07 +0000)]
implemented r_shadow_culltriangles cvar (on by default), this improves lighting performance by reducing the amount of geometry to render, it does not add any additional cpu w
ork because similar forms of culling were already used on shadow casting triangles (which are now replaced by this), this just applies the same already computed culling to the lighting as well as the shadowing
havoc [Wed, 28 Feb 2007 11:08:30 +0000 (11:08 +0000)]
eliminated RENDER_NOCULLFACE (now uses MATERIALFLAG_NOCULLFACE on a texture)
eliminated RENDER_TRANSPARENT (it was only used by the client code briefly, it did not need to be stored, it only turned off RENDER_SHADOW)
added TriangleOverlapsBox macro (and changed several pieces of code to use it)
changed some code to use the BoxInsideBox macro
havoc [Sat, 24 Feb 2007 07:12:56 +0000 (07:12 +0000)]
added optimized case in R_Q1BSP_GetLightInfo surface culling that skips checking individual triangle bounding boxes if the entire surface is inside the light bounding box (as is often the case)
havoc [Fri, 23 Feb 2007 13:07:36 +0000 (13:07 +0000)]
audited R_Mesh_Matrix calls and RSurf_ActiveEntity calls and moved them to more appropriate locations in some cases
split R_DrawSurfaces into R_DrawWorldSurfaces and R_DrawModelSurfaces to make profile reports more useful
split RSurf_ActiveEntity into RSurf_ActiveWorldEntity and RSurf_ActiveModelEntity to make profile reports more useful, and very slightly improve performance
havoc [Fri, 23 Feb 2007 11:43:03 +0000 (11:43 +0000)]
split model_brushq3_t num_lightmaps field into num_originallightmaps (for lightmapindex checking) and num_mergedlightmaps (for loops), this fixes lightmap indexing errors on deluxemapped maps
havoc [Fri, 23 Feb 2007 09:36:47 +0000 (09:36 +0000)]
patch from div0 that adds clientside culling of entities by TraceLineOfSight (like sv_cullentities_trace does), and merges the client and server code for this culling, this also adds traces for predicted player movement on the server to reduce the "items popping up" problem when running into a new room
havoc [Fri, 23 Feb 2007 09:19:36 +0000 (09:19 +0000)]
memset arrays before writing skeletal vertices into them (as the code did long ago), this is an 8% improvement in Mod_Alias_GetMesh_Vertices in my benchmarking (7.58 seconds in profile before, 6.95 seconds after)
havoc [Thu, 22 Feb 2007 15:22:37 +0000 (15:22 +0000)]
changed default mod_q3bsp_lightmapmergepower from 5 (4096x4096) to 4 (2048x2048), this means that the textures won't use more than 16MB each, which is a bit friendlier to 128MB cards than a 64MB texture (note: this is only the upper limit, if the map does not need this much lightmap space it already picks a smaller size)
havoc [Thu, 22 Feb 2007 14:37:43 +0000 (14:37 +0000)]
fixed bug that made some models invisible in nexuiz (if they have skin != 0 and skin 0 was never rendered yet on this model, they were using skin 0, which was often uninitialized)
havoc [Thu, 22 Feb 2007 08:44:01 +0000 (08:44 +0000)]
added some debugging code to RSurf_DrawBatch_WithLightmapSwitching to print out how many surfaces are rendered in each batch and each subbatch by lightmap (this revealed that q3map2's surface sorting is horrible)
havoc [Thu, 22 Feb 2007 04:42:10 +0000 (04:42 +0000)]
split RSurf_DrawBatch_Lightmap function into 4 main functions (previously there were only 3 modes, causing rendering problems) and 2 utility functions, this cleaned up the code somewhat
havoc [Thu, 22 Feb 2007 01:13:31 +0000 (01:13 +0000)]
reorganized surface batching to batch visible surfaces first, and then pass them to a function that breaks the list down by texture, also reorganized batching code to use a forward-search approach rather than state machine approach, this got a small (2%) speed gain in benchmarks
havoc [Thu, 22 Feb 2007 00:39:49 +0000 (00:39 +0000)]
some cleanup of GL20 code (removed rsurface_glsl_texture and rsurface_glsl_uselightmaptexture caching, because with the change to not batching by lightmap texture there are no longer redundant batches)
havoc [Wed, 21 Feb 2007 11:55:37 +0000 (11:55 +0000)]
modified surface renderer batching to batch all lightmapped surfaces with the same texture together, rather than a separate batch for each lightmap texture, this means that the lightmap switching overhead is lower than before, no apparent improvement in benchmarks though
havoc [Wed, 21 Feb 2007 04:38:56 +0000 (04:38 +0000)]
fixed bug that was causing seta commands to usually not save to config.cfg (due to the value being copied to their default when they are created, causing the default matching to prevent them from being saved before)
havoc [Tue, 20 Feb 2007 12:34:38 +0000 (12:34 +0000)]
added model->brush.TraceLineOfSight function, this traces the rendering hull and treats leafs with no pvs as solid (meaning it traces the structural rendering hull in q3bsp, ignoring detail brushes and patches), this function is now used by sv_cullentities_trace for higher performance, and it does not stop at solid transparent surfaces such as the chainlink fences in the nexuiz map toxic.bsp
havoc [Tue, 20 Feb 2007 08:07:48 +0000 (08:07 +0000)]
added mleaf_t->containscollisionsurfaces variable which indicates if the leafsurfaces array contains any q3 patches to collide against, checking this saves a substantial amount of time on collision detection in q3bsp (as few leafs actually contain patches, but many contain other kinds of surfaces)
added combinedsupercontents variable to mnode_t and mleaf_t, this was intended for collision culling but is not actually used (checks are implemented but commented out, because there was no measurable speed increase, and it could cause inconsistent results for startcontents when tracing objects larger than a point test - since point tests are always about contents there is no such culling performed in that case)
havoc [Mon, 19 Feb 2007 23:17:21 +0000 (23:17 +0000)]
moved cl.movesequence/cl.servermovesequence to cls. struct, this keeps the movesequence from level to level and fixes level change problems on old servers
havoc [Mon, 19 Feb 2007 23:05:27 +0000 (23:05 +0000)]
reenabled network culling of bmodels (optional however), this should improve network performance in some nexuiz levels, and a few quake levels, it means that blood and decals do not interact with bmodels in other rooms however
havoc [Mon, 19 Feb 2007 10:15:11 +0000 (10:15 +0000)]
reworked packet sending code a bit more, this is mostly just a cleanup, not a change in logic, except that cl_movement 0 now reports the correct ping time to the server, so local players get ping 0 as they used to
havoc [Mon, 19 Feb 2007 07:48:09 +0000 (07:48 +0000)]
changed FL_ONGROUND handling for pushers (lifts for example) so you now ride down lifts, rather than repeatedly falling and hitting the lift
cleaned up FL_ONGROUND handling for items riding pushers, so they now only lose their FL_ONGROUND status if the move is blocked
havoc [Mon, 19 Feb 2007 01:33:38 +0000 (01:33 +0000)]
this patch may break things and needs testing
major cleanup of csqc and ssqc builtin tables
minimized differences between csqc and ssqc builtin tables (everything that can be implemented in both is implemented in both)
added VM_SAFEPARMCOUNTRANGE to allow a function to have, for example, 2-4 parameters (where as VM_SAFEPARMCOUNT requires it to be an exact match)
added VM_SAFEPARMCOUNT or VM_SAFEPARMCOUNTRANGE to ALL builtins, this may break buggy qc (and it's possible that one or more of these checks are wrong)
replaced CL_TraceBox with CL_Move, this is a proper csqc-entity aware version akin to SV_Move, it has a ton of parameters due to support for network entity collisions as well (ideally this needs cleanup somehow but I have no idea how, as non-csqc network entities do not share the prvm_edict_t system and do not have entity numbers in the csqc world)
havoc [Mon, 19 Feb 2007 01:15:58 +0000 (01:15 +0000)]
fixed support of progs.dat files with important global and field names removed, such as omicron bot reporting that OP_STATE is not supported because it removed the field names
havoc [Mon, 19 Feb 2007 00:10:39 +0000 (00:10 +0000)]
removed vm_cl_extensions (now uses vm_sv_extensions)
cleaned up fieldoffsets/globaloffsets/funcoffsets fetching code (including removal of some duplicates) and sorted the contents of the structs to match the new order of the code
havoc [Sun, 18 Feb 2007 12:57:43 +0000 (12:57 +0000)]
added svc_trailparticles and svc_pointparticles, these are written by the trailparticles and pointparticles server builtins (matching the csqc ones), these can utilize any effect defined in effectinfo.txt without using csqc
havoc [Sun, 18 Feb 2007 12:47:17 +0000 (12:47 +0000)]
added generic collision functions Collision_ClipToGenericEntity, Collision_ClipToWorld, and Collision_CombineTraces to allow reduction of similar code in csqc and ssqc
havoc [Sun, 18 Feb 2007 12:45:26 +0000 (12:45 +0000)]
changed fieldoffsets and globaloffsets to be integer array indices instead of byte offsets, this basically means d->ofs is no longer multiplied by 4 in PRVM_ED_FindFieldOffset and PRVM_ED_FindGlobalOffset
havoc [Sun, 18 Feb 2007 12:41:11 +0000 (12:41 +0000)]
a cosmetic change as suggested by div0:
renamed PRVM_GETEDICTFIELDVALUE to PRVM_EDICTFIELDVALUE
renamed PRVM_GETGLOBALFIELDVALUE to PRVM_GLOBALFIELDVALUE
havoc [Sun, 18 Feb 2007 11:53:09 +0000 (11:53 +0000)]
fixed a bug with png loading on x86_64 platforms caused by libpng retardedness (it defines png_uint_32 as unsigned long, which is 64bit on such architectures, AND to make it worse this can be modified in pngconf.h on a per platform basis, so we detect the problem on big endian 64bit architectures and fix it there too)
black [Sat, 17 Feb 2007 11:27:09 +0000 (11:27 +0000)]
Hopefully this fixes a bug introduced with the latest cleanup by LH.
Changed the menu code to always show the old quake menu if forceqmenu is set
(even if it lacks the gfx files).
havoc [Thu, 15 Feb 2007 00:13:49 +0000 (00:13 +0000)]
cleaned up client qc, menu qc, and server qc VM initialization a bit so they have shared field/global/function lookup code,
changed world.c to not be server specific, moved server-specific functions to sv_phys.c
havoc [Wed, 14 Feb 2007 21:22:16 +0000 (21:22 +0000)]
added a check for level changes which blocks prediction for 100ms at the beginning of the new level, and clears ping time and other information
refactored input parsing to buffer moves in sv_readmoves array, this means that it can now always trust the last move in the packet, never ignored like earlier ones (which are clearly repeats of earlier input)
havoc [Mon, 12 Feb 2007 23:38:01 +0000 (23:38 +0000)]
added cl_nettimesyncmode cvar to choose the method of synchronizing cl.time, it defaults to resetting the cl.time to the previous packet's time, but only when it is out of bounds (meaning it increases it if it is falling behind, and snaps it back to the previous packet time if it exceeds this packet's time, which eliminates accumulated error)