18 years agofixed a bug with Host_Startdemos_f that caused it to never shorten the list of demos...
havoc [Sat, 17 May 2003 10:29:35 +0000 (10:29 +0000)]
fixed a bug with Host_Startdemos_f that caused it to never shorten the list of demos (it forgot to clear the remaining slots)

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

18 years agocorrected call to Image_HasAlpha to be Image_CheckAlpha
havoc [Fri, 16 May 2003 11:34:56 +0000 (11:34 +0000)]
corrected call to Image_HasAlpha to be Image_CheckAlpha

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

18 years agoreplaced a loop that checked for alpha pixels with a call to Image_HasAlpha
havoc [Fri, 16 May 2003 11:10:32 +0000 (11:10 +0000)]
replaced a loop that checked for alpha pixels with a call to Image_HasAlpha
fixed a memory leak on s->maskpixels (due to memory pools this leak was probably not too bad)

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

18 years agoadded DP_GFX_SKYBOX and DP_CL_LOADSKY extensions
havoc [Fri, 16 May 2003 11:09:23 +0000 (11:09 +0000)]
added DP_GFX_SKYBOX and DP_CL_LOADSKY extensions

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

18 years agonew entity protocol has been canceled due to a fatal design flaw only detected today...
havoc [Tue, 29 Apr 2003 16:04:40 +0000 (16:04 +0000)]
new entity protocol has been canceled due to a fatal design flaw only detected today (insufficient data on history of entities)
added explanation of old entity protocol and how it will be revised to use partial entity updates (without breaking compatibility with old clients!)

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

18 years agoreverted dynamic allocation of sv.edicts because there are FAR too many broken pointe...
havoc [Sat, 26 Apr 2003 10:21:02 +0000 (10:21 +0000)]
reverted dynamic allocation of sv.edicts because there are FAR too many broken pointer cases, however shrinking the edict_t to just a couple pointers and dynamically allocating the data they point to, keeps memory usage way down

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

18 years agoincreased default gl_mesh_maxverts to 65536, and also increased the limit to that
havoc [Sat, 26 Apr 2003 10:19:21 +0000 (10:19 +0000)]
increased default gl_mesh_maxverts to 65536, and also increased the limit to that

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

18 years agocleaned up UDP_Init a bit
havoc [Sat, 26 Apr 2003 10:03:42 +0000 (10:03 +0000)]
cleaned up UDP_Init a bit

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

18 years agosv.edicts (and related things) are now dynamically reallocated as more edicts are...
havoc [Fri, 25 Apr 2003 14:43:10 +0000 (14:43 +0000)]
sv.edicts (and related things) are now dynamically reallocated as more edicts are used
no edict_t *'s exist in any persistent structures anymore, using edict numbers in all such cases (as it turns out the only such structs were client_t in server.h and link_t in progs.h)
edicts are unlinked before reallocation and relinked after reallocation to keep the link_t pointers valid

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

18 years agoUDP_Init now tries to bind to INADDR_ANY and various others in sequence
havoc [Fri, 25 Apr 2003 14:39:22 +0000 (14:39 +0000)]
UDP_Init now tries to bind to INADDR_ANY and various others in sequence

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

18 years agopk3 is now case insensitive to match quake3 behavior (however pak is still case sensi...
havoc [Fri, 25 Apr 2003 12:44:22 +0000 (12:44 +0000)]
pk3 is now case insensitive to match quake3 behavior (however pak is still case sensitive)
FS_FileExtension has been basically rewritten, it was taking the first . in the filename (which might even be part of a directory name)

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

18 years agoincreased runaway loop counter 10x (now 10 million opcodes before runaway error
havoc [Wed, 23 Apr 2003 11:48:05 +0000 (11:48 +0000)]
increased runaway loop counter 10x (now 10 million opcodes before runaway error

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

18 years agoalways do r_shadow_realtime_dlight if r_shadow_realtime_world is on
havoc [Mon, 21 Apr 2003 11:27:09 +0000 (11:27 +0000)]
always do r_shadow_realtime_dlight if r_shadow_realtime_world is on

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

18 years agonudge dlights out of walls if they're too close
havoc [Mon, 21 Apr 2003 11:26:22 +0000 (11:26 +0000)]
nudge dlights out of walls if they're too close

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

18 years agoadded TEXF_CLAMP flag on model and sprite textures (software quake did not support...
havoc [Mon, 21 Apr 2003 10:05:18 +0000 (10:05 +0000)]
added TEXF_CLAMP flag on model and sprite textures (software quake did not support out of bounds texcoords, so repeat is clearly unnecessary and even undesirable)

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

18 years agothanks to "backslash" for submitting a patch to support Intellimouse Explorer's two...
havoc [Sun, 20 Apr 2003 05:48:03 +0000 (05:48 +0000)]
thanks to "backslash" for submitting a patch to support Intellimouse Explorer's two extra buttons (side buttons), I expanded the patch to support up to 10 mouse buttons (plus mwheelup/mwheeldown) in both GLX and WGL ports.

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

18 years agofix flipped sprites
havoc [Sun, 20 Apr 2003 05:39:54 +0000 (05:39 +0000)]
fix flipped sprites

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

18 years agoreorganized aliaslayer_t handling to fix a few bugs
havoc [Fri, 18 Apr 2003 12:11:30 +0000 (12:11 +0000)]
reorganized aliaslayer_t handling to fix a few bugs
fixed md2 models
fixed skinless models

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

18 years agovery minor correction to a comment
havoc [Fri, 18 Apr 2003 12:03:57 +0000 (12:03 +0000)]
very minor correction to a comment

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

18 years agoinlined the only call of R_ModelLightPoint (in R_LightModel)
havoc [Fri, 18 Apr 2003 12:03:09 +0000 (12:03 +0000)]
inlined the only call of R_ModelLightPoint (in R_LightModel)

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

18 years agogreatly improved pointfile command, it now shows a huge beam crosshair at the site...
havoc [Fri, 18 Apr 2003 12:01:12 +0000 (12:01 +0000)]
greatly improved pointfile command, it now shows a huge beam crosshair at the site of the leak entity

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

18 years agoparser can now handle recursive commands (although this still doesn't work with the...
havoc [Fri, 18 Apr 2003 11:59:16 +0000 (11:59 +0000)]
parser can now handle recursive commands (although this still doesn't work with the whole Cmd_Argv/Cmd_Argc stuff)

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

18 years agoFixed bug in record command (it was running a map command before getting the demo...
havoc [Fri, 18 Apr 2003 11:58:05 +0000 (11:58 +0000)]
Fixed bug in record command (it was running a map command before getting the demo name, which gets replaced by the map command parameter, causing the demo to always be named the same as the map)

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

18 years agofix model lighting (pitch was backwards)
havoc [Fri, 18 Apr 2003 11:53:26 +0000 (11:53 +0000)]
fix model lighting (pitch was backwards)

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

18 years agoadded some extensions I forgot to put in the list before
havoc [Mon, 14 Apr 2003 22:23:12 +0000 (22:23 +0000)]
added some extensions I forgot to put in the list before

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

18 years agoremoved special cases for transfusion in server search messages (now prints gamename)
havoc [Mon, 14 Apr 2003 12:18:45 +0000 (12:18 +0000)]
removed special cases for transfusion in server search messages (now prints gamename)

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

18 years agoexpanded stats reporting (when in developer mode) of how many entities were processed...
havoc [Mon, 14 Apr 2003 03:04:10 +0000 (03:04 +0000)]
expanded stats reporting (when in developer mode) of how many entities were processed during loading (now displays parsed/inhibited/spawned/died)

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

18 years agoexpanded UDP_Read and UDP_Write error messages to include the function parameters
havoc [Sun, 13 Apr 2003 10:45:08 +0000 (10:45 +0000)]
expanded UDP_Read and UDP_Write error messages to include the function parameters

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

18 years agoMod_FindNonSolidLocation fixed for no map case (again)
havoc [Thu, 10 Apr 2003 04:03:59 +0000 (04:03 +0000)]
Mod_FindNonSolidLocation fixed for no map case (again)

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

18 years agofix two more fs_gamedir mixups (loading saved games should now work, as well as video...
havoc [Tue, 8 Apr 2003 08:11:45 +0000 (08:11 +0000)]
fix two more fs_gamedir mixups (loading saved games should now work, as well as video playback)

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

18 years agoadded DP_QUAKE3_MODEL extension (thanks to Elric for pointing out the need for this)
havoc [Tue, 8 Apr 2003 08:02:01 +0000 (08:02 +0000)]
added DP_QUAKE3_MODEL extension (thanks to Elric for pointing out the need for this)

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

18 years agodisable use of scissor when stencil is not available (sure seems like a driver bug...
havoc [Mon, 7 Apr 2003 06:40:44 +0000 (06:40 +0000)]
disable use of scissor when stencil is not available (sure seems like a driver bug, scissor should work)

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

18 years agosome more minor cleanups
havoc [Mon, 7 Apr 2003 05:31:37 +0000 (05:31 +0000)]
some more minor cleanups
bug with dlights when not using stencil has not been found yet

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

18 years agofixed M_ScanSaves to use FS_Open properly
havoc [Mon, 7 Apr 2003 01:45:34 +0000 (01:45 +0000)]
fixed M_ScanSaves to use FS_Open properly

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

18 years agofixed name of dpavi.wav file to work correctly with FS_Open (this is in commented...
havoc [Mon, 7 Apr 2003 01:44:56 +0000 (01:44 +0000)]
fixed name of dpavi.wav file to work correctly with FS_Open (this is in commented out code though so it doesn't matter)

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

18 years agoforgot to make a couple changes before committing this
havoc [Mon, 7 Apr 2003 01:43:11 +0000 (01:43 +0000)]
forgot to make a couple changes before committing this

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

18 years agosplit r_shadow_realtime into r_shadow_realtime_world (which requires stencil) and...
havoc [Mon, 7 Apr 2003 01:28:47 +0000 (01:28 +0000)]
split r_shadow_realtime into r_shadow_realtime_world (which requires stencil) and r_shadow_realtime_dlight (which works without stencil)
one bug remains with scissoring dlights without stencil, I'll try to figure out this problem soon

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

18 years agoredesigned surfmesh allocation in brush model loader, in preparation for some more...
havoc [Sun, 6 Apr 2003 19:24:33 +0000 (19:24 +0000)]
redesigned surfmesh allocation in brush model loader, in preparation for some more drastic changes

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

18 years agorelease build optimizations changed - removed -funroll-loops, added -O9
havoc [Sun, 6 Apr 2003 19:23:34 +0000 (19:23 +0000)]
release build optimizations changed - removed -funroll-loops, added -O9

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

18 years agorevised EntityFrame4 function prototypes (no I still haven't coded this)
havoc [Sun, 6 Apr 2003 00:23:21 +0000 (00:23 +0000)]
revised EntityFrame4 function prototypes (no I still haven't coded this)

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

18 years agooptimized shadow volume generation a bit (only projects vertices that are necessary)
havoc [Sat, 5 Apr 2003 16:53:14 +0000 (16:53 +0000)]
optimized shadow volume generation a bit (only projects vertices that are necessary)

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

18 years agopreparation for a new protocol upgrade to use partial frame updates
havoc [Thu, 3 Apr 2003 20:56:05 +0000 (20:56 +0000)]
preparation for a new protocol upgrade to use partial frame updates

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

18 years agogot rid of use of eye in entity database
havoc [Thu, 3 Apr 2003 20:55:08 +0000 (20:55 +0000)]
got rid of use of eye in entity database

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

18 years agoadded MAX_NETRELIABLE define (currently same as MAX_DATAGRAM, but will change someday)
havoc [Thu, 3 Apr 2003 20:49:31 +0000 (20:49 +0000)]
added MAX_NETRELIABLE define (currently same as MAX_DATAGRAM, but will change someday)

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

18 years agoAdded support for JPEG screenshots. You can toggle that with the cvar "scr_screenshot...
molivier [Thu, 3 Apr 2003 08:02:14 +0000 (08:02 +0000)]
Added support for JPEG screenshots. You can toggle that with the cvar "scr_screenshot_jpeg" or the option menu. Note that you'll need the libjpeg library DLL.

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

18 years agofix for server dying when someone times out
havoc [Thu, 3 Apr 2003 00:11:08 +0000 (00:11 +0000)]
fix for server dying when someone times out
some other cleanups (some Sys_Printf calls turned into Con_Printf, some comments added about DropClient calls)

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

18 years agofix for incorrect rounding of vertex locations when using RENDER_LOWPRECISION (now...
havoc [Wed, 2 Apr 2003 18:51:59 +0000 (18:51 +0000)]
fix for incorrect rounding of vertex locations when using RENDER_LOWPRECISION (now it always rounds to nearest)

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

18 years agocleaned up pr_builtins array (now uses NULL instead of PF_fixme) and now reports...
havoc [Wed, 2 Apr 2003 00:22:15 +0000 (00:22 +0000)]
cleaned up pr_builtins array (now uses NULL instead of PF_fixme) and now reports builtin number if an unknown builtin is called
fixed name of PF_setcolor (was setcolors)

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

18 years agofixed NET_SendToAll
havoc [Wed, 2 Apr 2003 00:20:10 +0000 (00:20 +0000)]
fixed NET_SendToAll

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

18 years agoadded some commented out code to Image_HeightmapToNormalmap explaining how to do...
havoc [Mon, 31 Mar 2003 21:46:06 +0000 (21:46 +0000)]
added some commented out code to Image_HeightmapToNormalmap explaining how to do heightmap to normalmap conversion a little bit differently (very insignificant difference, purely code for those who care)

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

18 years agoQSG_FILE removed because some mods use the old builtin numbers and think that QSG_FIL...
havoc [Mon, 31 Mar 2003 21:43:50 +0000 (21:43 +0000)]
QSG_FILE removed because some mods use the old builtin numbers and think that QSG_FILE would provide them (FRIK_FILE remains, which uses the new numbers already)

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

18 years agodlights now cast shadows in realtime lighting mode again (actually they already did...
havoc [Sun, 30 Mar 2003 19:19:06 +0000 (19:19 +0000)]
dlights now cast shadows in realtime lighting mode again (actually they already did, but it wasn't working for world, because world didn't have the shadow flag set)

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

18 years agono longer complains about missing ambient liquid sounds in nexuiz
havoc [Sun, 30 Mar 2003 19:18:05 +0000 (19:18 +0000)]
no longer complains about missing ambient liquid sounds in nexuiz

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

18 years agoremoved a couple unused hz_bitstream_read functions
havoc [Sun, 30 Mar 2003 08:40:28 +0000 (08:40 +0000)]
removed a couple unused hz_bitstream_read functions

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

18 years agofix zym model rendering (wrong vertex padding)
havoc [Sat, 29 Mar 2003 20:02:11 +0000 (20:02 +0000)]
fix zym model rendering (wrong vertex padding)

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

18 years agoElric added deflated file support for pk3 archives (in other words: compressed pk3...
havoc [Sat, 29 Mar 2003 18:58:11 +0000 (18:58 +0000)]
Elric added deflated file support for pk3 archives (in other words: compressed pk3 now work), even with FS_Seek support, I'm amazed, thanks Elric! :)

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

18 years agocorrected the misspelled name GAME_NEXIUZ (and related things) to GAME_NEXUIZ (and...
havoc [Fri, 28 Mar 2003 16:45:23 +0000 (16:45 +0000)]
corrected the misspelled name GAME_NEXIUZ (and related things) to GAME_NEXUIZ (and related things)

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

18 years agoUDP_StringToAddr did not work with less than full x.x.x.x:x specifications, now it...
havoc [Fri, 28 Mar 2003 15:47:33 +0000 (15:47 +0000)]
UDP_StringToAddr did not work with less than full x.x.x.x:x specifications, now it supports all the stuff PartialIPAddress supported (filling in most significant components with myAddr, etc)
UDP_Read and UDP_Write now log entire packets to console if developer_networking is on

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

18 years agoadd support for NAT fix in the client (by no longer checking the port a connection...
havoc [Fri, 28 Mar 2003 15:45:20 +0000 (15:45 +0000)]
add support for NAT fix in the client (by no longer checking the port a connection accepted came from)

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

18 years agoadded developer_networking cvar
havoc [Fri, 28 Mar 2003 15:43:52 +0000 (15:43 +0000)]
added developer_networking cvar

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

18 years agoThanks to faded (of the tenebrae team) for provoking me to recite a lengthy explanati...
havoc [Fri, 28 Mar 2003 13:27:15 +0000 (13:27 +0000)]
Thanks to faded (of the tenebrae team) for provoking me to recite a lengthy explanation of NAT nightmares, and realize this very simple fix for NQ server support of clients behind NAT routers (send first message from the player socket instead of the accept socket)

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

18 years agochanged behavior of SV_DropClient a bit (now calls ClientDisconnect QC function even...
havoc [Fri, 28 Mar 2003 13:24:11 +0000 (13:24 +0000)]
changed behavior of SV_DropClient a bit (now calls ClientDisconnect QC function even if crash is true, as it's the client being harshly dropped, not the server dying), and made the final svc_disconnect an unreliable message

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

18 years agorefactored NET_SendToAll, it is debatable whether it is more readable or not, but...
havoc [Fri, 28 Mar 2003 13:22:06 +0000 (13:22 +0000)]
refactored NET_SendToAll, it is debatable whether it is more readable or not, but it works the same, and is shorter, and I think it is slightly more understandable than the mess it used to be

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

18 years agonet_inetslist (and the corresponding menu as well) now work without being an active...
havoc [Fri, 28 Mar 2003 10:31:28 +0000 (10:31 +0000)]
net_inetslist (and the corresponding menu as well) now work without being an active server (dfunc.controlSock is now used for all transactions involved, and since there is always one of those...)

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

18 years agoMSG_ReadFloat now checks if the message has enough bytes for a float before trying...
havoc [Fri, 28 Mar 2003 10:29:42 +0000 (10:29 +0000)]
MSG_ReadFloat now checks if the message has enough bytes for a float before trying to decode it (why id forgot this I don't know)
added MSG_ReadBigShort, MSG_ReadBigLong, MSG_ReadBigFloat, MSG_ReadBytes
renamed MSG_ReadShort to MSG_ReadLittleShort, MSG_ReadLong to MSG_ReadLittleLong, and MSG_ReadFloat to MSG_ReadLittleFloat
added #defines for MSG_ReadShort, MSG_ReadLong, and MSG_ReadFloat to use their Little versions
optimized/cleaned up MSG_Read functions (some are now significantly shorter)

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

18 years agonet_wins.c is gone, winsock support merged into net_udp.c
havoc [Fri, 28 Mar 2003 08:37:13 +0000 (08:37 +0000)]
net_wins.c is gone, winsock support merged into net_udp.c
numerous other cleanups/changes also done to net_udp.c (to try to simplify it, hopefully work better, that kind of stuff)
support for partial IP addresses has been removed (that is you say you can't simply type 'connect 1.123' and have it expand to xxx.xxx.1.123 where xxx.xxx came from your own IP address, however hostnames still work fine)
also the automatic changing of the hostname cvar according to internet hostname has been removed, so servers will be called "UNNAMED" if they don't set it, rather than using their internet hostname

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

18 years agorenamed all net_wins.c functions to UDP instead of WINS, this allows use of net_bsd...
havoc [Fri, 28 Mar 2003 03:33:18 +0000 (03:33 +0000)]
renamed all net_wins.c functions to UDP instead of WINS, this allows use of net_bsd.c and net_udp.h instead of net_win.c and net_wins.h

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

18 years agoremoved winsock_initialized counter as there are no longer two things initializing...
havoc [Fri, 28 Mar 2003 03:23:13 +0000 (03:23 +0000)]
removed winsock_initialized counter as there are no longer two things initializing winsock (wins and wipx), only one

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

18 years agono longer dynamically loads portions of wsock32.dll (because it required static linki...
havoc [Fri, 28 Mar 2003 03:21:12 +0000 (03:21 +0000)]
no longer dynamically loads portions of wsock32.dll (because it required static linking anyway for other parts, no point)

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

18 years agoforgot to remove #include "net_wipx.h"
havoc [Fri, 28 Mar 2003 03:18:57 +0000 (03:18 +0000)]
forgot to remove #include "net_wipx.h"

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

18 years agoremoved winsock ipx support
havoc [Fri, 28 Mar 2003 03:04:44 +0000 (03:04 +0000)]
removed winsock ipx support

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

18 years agoFix for win32 dedicated servers (oh it still doesn't compile, other problems remain...
havoc [Thu, 27 Mar 2003 12:25:32 +0000 (12:25 +0000)]
Fix for win32 dedicated servers (oh it still doesn't compile, other problems remain with sys_win.c, but this one thing has been annoying me long enough)

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

18 years agoElric's pk3 support (no support for compressed files yet, that's still to come)
havoc [Thu, 27 Mar 2003 08:58:58 +0000 (08:58 +0000)]
Elric's pk3 support (no support for compressed files yet, that's still to come)

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

18 years agoElric added BuffBigLong, BuffBigShort, BuffLittleLong, and BuffLittleShort functions...
havoc [Thu, 27 Mar 2003 08:58:07 +0000 (08:58 +0000)]
Elric added BuffBigLong, BuffBigShort, BuffLittleLong, and BuffLittleShort functions intended for reading from misaligned locations in file memory buffers (these read as bytes rather than entire numbers, so memory misalignments are not a problem on Sparc and certain other CPUs)

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

18 years agoadded FRIK_FILE (aka QSG_FILE) extension, this brings string handling and text file...
havoc [Thu, 27 Mar 2003 08:04:27 +0000 (08:04 +0000)]
added FRIK_FILE (aka QSG_FILE) extension, this brings string handling and text file access to the QuakeC support (note: files go in gamedir/data/)

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

18 years agoadded Math_atov function (ascii to vector), tries to parse any imaginable vector...
havoc [Thu, 27 Mar 2003 08:02:43 +0000 (08:02 +0000)]
added Math_atov function (ascii to vector), tries to parse any imaginable vector (even badly formatted ones with varying numbers of spaces)

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

18 years agocreate directories when opening any file for writing, because it's a real pain having...
havoc [Thu, 27 Mar 2003 08:01:33 +0000 (08:01 +0000)]
create directories when opening any file for writing, because it's a real pain having to do it elsewhere

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

18 years agogot rid of R_NewMap, directly calls R_Modules_NewMap instead
havoc [Sat, 22 Mar 2003 10:23:38 +0000 (10:23 +0000)]
got rid of R_NewMap, directly calls R_Modules_NewMap instead

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

18 years agofix decals bug introduced by transition to matrix use
havoc [Sat, 22 Mar 2003 10:22:53 +0000 (10:22 +0000)]
fix decals bug introduced by transition to matrix use

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

18 years agoadded more SV_CheckVelocity calls on players for safety sake
havoc [Fri, 21 Mar 2003 21:54:43 +0000 (21:54 +0000)]
added more SV_CheckVelocity calls on players for safety sake

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

18 years agoThanks to IceDagger for pointing out this important optimization to multipass specula...
havoc [Fri, 21 Mar 2003 21:52:04 +0000 (21:52 +0000)]
Thanks to IceDagger for pointing out this important optimization to multipass specular rendering - removes one pass (dropping from 6 to 5 passes on GF2, 5 to 4 passes on GF3/Radeon) by squaring specular even on the first pass

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

18 years agoThis is a patch from Elric greatly cleaning up the filesystem portions of the engine...
havoc [Fri, 21 Mar 2003 21:47:57 +0000 (21:47 +0000)]
This is a patch from Elric greatly cleaning up the filesystem portions of the engine, and partially prepares the engine for .pk3 support (yay), this also removes support for gzipped files (but that had been disabled for months anyway)

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

18 years agovarray_* rewritten to remove padding (varray_vertex3f, varray_texcoord2f, varray_texc...
havoc [Sat, 15 Mar 2003 04:54:47 +0000 (04:54 +0000)]
varray_* rewritten to remove padding (varray_vertex3f, varray_texcoord2f, varray_texcoord3f, varray_color4f now exist), this required changes to a huge amount of code (but netted a 30% speed gain typically)
fixed some various bugs
added voodoo1/2 support in realtime lighting engine (well, except for the fact it still requires stencil, which voodoo1/2 don't have, this will be addressed later when world lights and dlights are independently controlled)
changed lightning beams a bit (they're now white) and due to a request I added support for r_lightningbeam_qmbtexture (loads textures/particles/lightning.pcx and knows approximately how to use it, I recommend changing r_lightningbeam_repeatdistance to make it look right)

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

18 years agoadded loading of .ent files if found (overriding entities in bsp)
havoc [Sat, 15 Mar 2003 04:53:24 +0000 (04:53 +0000)]
added loading of .ent files if found (overriding entities in bsp)
added sv_entpatch cvar (to allow disabling the feature)

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

18 years agoMakefiles cleanups: r_explosion.o was declared twice in all Makefiles; removed some...
molivier [Thu, 13 Mar 2003 16:10:51 +0000 (16:10 +0000)]
Makefiles cleanups: r_explosion.o was declared twice in all Makefiles; removed some commented-out commands; diff reduction between makefile and makefile.mingwcross; forgot to call builddate previously; strip was even called on non-release binaries.

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

18 years agofix for 16bit textures looking awful (bug in the alpha check for 8bit)
havoc [Wed, 12 Mar 2003 15:38:46 +0000 (15:38 +0000)]
fix for 16bit textures looking awful (bug in the alpha check for 8bit)

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

18 years agoFixed a MSVC6 warning in matrixlib. Added a "Public server" yes/no line in the server...
molivier [Mon, 10 Mar 2003 07:05:45 +0000 (07:05 +0000)]
Fixed a MSVC6 warning in matrixlib. Added a "Public server" yes/no line in the server creation menu. Removed a duplicated cvar declaration in "net.h".

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

18 years agoVic informed me of the AGP settings (0-0.25, 0-0.25, 0.25-0.75) and video memory...
havoc [Sun, 9 Mar 2003 20:33:23 +0000 (20:33 +0000)]
Vic informed me of the AGP settings (0-0.25, 0-0.25, 0.25-0.75) and video memory settings (0-0.25, 0-0.25, 0.75-1) for use with GL_NV_vertex_array_range, they seem to have no effect but the defaults have been updated (to 0.2, 0.2, 0.7) to choose AGP

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

18 years agoGL_NV_vertex_array_range support added, but disabled by default because for some...
havoc [Sun, 9 Mar 2003 16:42:54 +0000 (16:42 +0000)]
GL_NV_vertex_array_range support added, but disabled by default because for some reason it's halving my framerate rather than making it faster

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

18 years agochanged R_Mesh_ system (again), now uses R_Mesh_GetSpace to set up varray_* pointers...
havoc [Sun, 9 Mar 2003 11:39:08 +0000 (11:39 +0000)]
changed R_Mesh_ system (again), now uses R_Mesh_GetSpace to set up varray_* pointers, then fills in the data, then calls R_Mesh_Draw (this can be done repeatedly, but vertex data should *NOT* be modified after the first call)

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

18 years agoMod_FindNonSolidLocation now takes a radius and can output to a different vector...
havoc [Sun, 9 Mar 2003 11:19:57 +0000 (11:19 +0000)]
Mod_FindNonSolidLocation now takes a radius and can output to a different vector than the input (purpose: the sphere is nudged out of any surfaces in the area, this makes realtime lighting look a lot better as the lights aren't too close to the surface)

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

18 years agomenu.c - changed M_DrawSlider to take a value and a min/max range, now prints the...
havoc [Fri, 7 Mar 2003 09:34:15 +0000 (09:34 +0000)]
menu.c - changed M_DrawSlider to take a value and a min/max range, now prints the current value of the cvar as well
menu.c, menu.h, gl_draw.c - added new color control options menu (the gl_draw.c change is merely adding a "ditherpattern" texture)
menu.c - added "Delay refresh (faster)" to options menu (gl_delayfinish cvar)
menu.c - added "Game Speed" to options menu (slowmo cvar)
vid_wgl.c, vid_glx.c, vid_null.c, vid_shared.c, vid.h, palette.c, palette.h, host.c - gamma system redesigned (VID_SetGamma now takes ramps, VID_GetGamma added, other cruft removed), moved VID_UpdateGamma to vid_shared.c, gamma is now turned off when darkplaces is minimized in X11 (unmapped), and when it's window is not active in Windows as well
vid_wgl.c - trailing whitespace fixed
vid_shared.c - added v_color_enable, v_color_black_[rgb], v_color_grey_[rgb], and v_color_white_[rgb] cvars as another way to adjust color settings
gl_draw.c - added support for v_color_* cvars, removed support for darkening screen (not possible to do in color)
vid_glx.c - got rid of unfinished X11 colormap based gamma code (using XF86 VidMode extension instead)

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

18 years agounfinished beginnings of support for voodoo1/voodoo2 class paths for realtime lightin...
havoc [Fri, 7 Mar 2003 09:33:07 +0000 (09:33 +0000)]
unfinished beginnings of support for voodoo1/voodoo2 class paths for realtime lighting (no shadows however)

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

18 years agonow uses TEXF_FORCELINEAR on lightmaps
havoc [Fri, 7 Mar 2003 09:31:46 +0000 (09:31 +0000)]
now uses TEXF_FORCELINEAR on lightmaps

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

18 years agoadded TEXF_FORCENEAREST and TEXF_FORCELINEAR flags
havoc [Fri, 7 Mar 2003 09:31:10 +0000 (09:31 +0000)]

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

18 years agogot rid of AreaNode stuff, now only has AreaGrid (had to add sv_areagrid_outside...
havoc [Fri, 7 Mar 2003 09:30:21 +0000 (09:30 +0000)]
got rid of AreaNode stuff, now only has AreaGrid (had to add sv_areagrid_outside node)
renamed sv_useareanodes to sv_debugmove (inverted behavior)
SV_CreateAreaGrid now has a minimum grid size (sv_areagrid_mingridsize cvar), this greatly improved performance in helm18
SV_ClipToAreaGrid and SV_TouchAreaGrid no longer process any edicts twice (edict_t now has areagridmarknumber for this purpose)
increased AREA_GRID from 16 to 512
added SV_ClipToNode function to get rid of duplicate code in SV_ClipToAreaGrid

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

18 years agoadded gl_delayfinish cvar (default off, used to always be on)
havoc [Fri, 7 Mar 2003 09:28:12 +0000 (09:28 +0000)]
added gl_delayfinish cvar (default off, used to always be on)

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

18 years agoadded invpow (arbitrary logarithm, finds a power that the base number would need...
havoc [Fri, 7 Mar 2003 09:27:33 +0000 (09:27 +0000)]
added invpow (arbitrary logarithm, finds a power that the base number would need to be raised to, to get the requested number)

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

18 years agoadded DrawQ_SuperPic, fixed severe bug in DrawQ_Mesh (was not allocating enough room...
havoc [Fri, 7 Mar 2003 09:26:11 +0000 (09:26 +0000)]
added DrawQ_SuperPic, fixed severe bug in DrawQ_Mesh (was not allocating enough room in drawqueue for the texcoords), DrawQ_Pic and DrawQ_Fill now use DrawQ_SuperPic

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

18 years agoview.c, cl_parse.c, cl_main.c, gl_rmain.c - trying to remove all uses of origin,...
havoc [Fri, 7 Mar 2003 09:24:59 +0000 (09:24 +0000)]
view.c, cl_parse.c, cl_main.c, gl_rmain.c - trying to remove all uses of origin, angles, or scale fields of entity_render_t
view.c, gl_rmain.c - viewmodel entities are now processed in view.c instead of gl_rmain.c
view.c now uses matrix and inversematrix for view damage kicks

what this means:
the QC feature viewmodelforclient now works

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