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)
havoc [Sun, 11 Feb 2007 17:44:59 +0000 (17:44 +0000)]
modified Mod_LoadSkinFrame to set base = r_texture_notexture on failure, this reduced fallback code elsewhere
reworked Mod_BuildAliasSkinsFromSkinFiles, it no longer tries fallbacks if a skin texture fails to load
fixed a crash on missing meshes in a skin file (which are intentionally nodraw, just like in Quake3)
havoc [Sat, 10 Feb 2007 22:43:41 +0000 (22:43 +0000)]
added r_bloom_brighten modification in graphics options menu, this was already displayed but wasn't working, messing up all options after it
updated graphics options item count from 19 to 20
havoc [Fri, 9 Feb 2007 01:19:05 +0000 (01:19 +0000)]
fix Q3BSP map loader's sky surface detection so that it doesn't assume all submodels have sky if the base model does, this improves rendering performance a bit (by not scanning for sky in submodels that claim to have it but don't)
havoc [Thu, 8 Feb 2007 15:57:21 +0000 (15:57 +0000)]
removed CL_UpdateEntities call in CSQC rendering code
changed r_refdef.lights from dlight_t * to rtlight_t (no longer a pointer)
modified CL_UpdateLights to setup the r_refdef.lights[] entry instead of merely pointing to the rtlight_t in the dlight_t struct
changed csqc dlight handling to comply with the spec (R_ClearScene resets r_refdef.numlights, then VM_R_AddEntities adds all engine-based entities and lights)
moved single-frame dlight spawning for rocket glow and such from CL_UpdateNetworkEntity to CL_LinkNetworkEntity (which is called by VM_R_AddEntities)
replaced all single-frame uses of CL_AllocDLight with R_RTLight_Update(&r_refdef.lights[r_refdef.numlights++], ...) calls, this includes lights such as muzzleflash, rocket glow, .glow_size lights, tenebrae dlights, etc
renamed CL_AllocDlight to CL_AllocLightFlash
renamed CL_DecayLights to CL_DecayLightFlashes
renamed CL_UpdateLights to CL_RelinkLightFlashes
renamed CL_ParticleEffect to CL_ParticleTrail and added spawndlight/spawnparticles boolean parameters, then added a CL_ParticleEffect which calls this with true for both
removed cubemapnum field from dlight_t