13 years agocompare the right values for host cache masks;
divverent [Fri, 20 Apr 2007 15:59:28 +0000 (15:59 +0000)]
compare the right values for host cache masks;
use -1 bots to indicate unknown bot count

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

13 years agonew cvar fs_empty_files_in_pack_mark_deletions: when set, a pk3 with empty files...
divverent [Fri, 20 Apr 2007 11:43:24 +0000 (11:43 +0000)]
new cvar fs_empty_files_in_pack_mark_deletions: when set, a pk3 with empty files can effectively "delete" a file in an earlier pk3

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

13 years agoupped MAX_DYNAMIC_CHANNELS from 128 to 512
havoc [Fri, 20 Apr 2007 06:25:06 +0000 (06:25 +0000)]
upped MAX_DYNAMIC_CHANNELS from 128 to 512

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

13 years agochanged VERTEXFOGTABLE macro to not use a global variable
havoc [Thu, 19 Apr 2007 13:17:06 +0000 (13:17 +0000)]
changed VERTEXFOGTABLE macro to not use a global variable

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

13 years agosignificant cleanup of reliefmapping shader, now uses step() function
havoc [Thu, 19 Apr 2007 12:50:45 +0000 (12:50 +0000)]
significant cleanup of reliefmapping shader, now uses step() function
instead of if's, this might improve compatibility with ATI cards, but
not sure, in any case I improved the stepping math a little bit which
saves some time, minor fps improvement on reliefmapping compared to

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

13 years agoadjusted netgraph code to draw the latest netgraph column on the right
havoc [Thu, 19 Apr 2007 07:32:00 +0000 (07:32 +0000)]
adjusted netgraph code to draw the latest netgraph column on the right
rather than the left

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

13 years agocorrect a typo (numbotss)
havoc [Thu, 19 Apr 2007 00:44:52 +0000 (00:44 +0000)]
correct a typo (numbotss)

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

13 years agosv_public -2 now allows the local: client to connect
divverent [Wed, 18 Apr 2007 11:38:57 +0000 (11:38 +0000)]
sv_public -2 now allows the local: client to connect

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

13 years agofix a bug in the RENDER_EXTERIORMODEL check in the last commit
havoc [Wed, 18 Apr 2007 11:15:58 +0000 (11:15 +0000)]
fix a bug in the RENDER_EXTERIORMODEL check in the last commit

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

13 years agochanged protocol code to always send origin as low precision if
havoc [Wed, 18 Apr 2007 11:13:57 +0000 (11:13 +0000)]
changed protocol code to always send origin as low precision if
possible, except for exteriormodel's (such as the player itself),
this means the only effect of EF_LOWPRECISION is lower precision angles

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

13 years agoremoved the forced LOWPRECISION flag on entities because it messes up
havoc [Wed, 18 Apr 2007 10:35:30 +0000 (10:35 +0000)]
removed the forced LOWPRECISION flag on entities because it messes up
angles too much, and it is hard to decide what origins warrant high
precision or low precision

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

13 years agoimproved entity unsticking code, it now uses a trace from the offset
havoc [Wed, 18 Apr 2007 10:20:09 +0000 (10:20 +0000)]
improved entity unsticking code, it now uses a trace from the offset
position back to the original position, and uses the impact point, this
makes it correct significantly less than before

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

13 years agotry unstick offsets in a certain order, preferring horizontal offsets
havoc [Wed, 18 Apr 2007 09:59:06 +0000 (09:59 +0000)]
try unstick offsets in a certain order, preferring horizontal offsets
and then vertical, and never doing horizontal + vertical, this fixes
problems where you would 'creep' along the floor diagonally at certain
frametimes at certain plane distances where precision error causes
problems, now you only teleport upward 1 unit and fall repeatedly

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

13 years agoadded Mem_ExpandableArray_IndexRange and
havoc [Wed, 18 Apr 2007 09:29:50 +0000 (09:29 +0000)]
added Mem_ExpandableArray_IndexRange and
Mem_ExpandableArray_RecordAtIndex which allow iterating the array

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

13 years agoadded Mem_ExpandableArray functions, which are not currently used but
havoc [Wed, 18 Apr 2007 09:17:54 +0000 (09:17 +0000)]
added Mem_ExpandableArray functions, which are not currently used but
may be useful

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

13 years agoadded cl_nettimesyncboundmode 5 which is div0's slight refinement of 4
havoc [Wed, 18 Apr 2007 09:17:33 +0000 (09:17 +0000)]
added cl_nettimesyncboundmode 5 which is div0's slight refinement of 4

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

13 years agoadded numbots and numhumans in server info parsing, serverlist filtering
havoc [Wed, 18 Apr 2007 08:08:31 +0000 (08:08 +0000)]
added numbots and numhumans in server info parsing, serverlist filtering
can also mask by these, and the 'player empty' check for the engine's
own server listings now uses numhumans rather than numplayers

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

13 years agoadded reporting of number of bots in getinfo/getstatus replies (they are
havoc [Wed, 18 Apr 2007 07:51:11 +0000 (07:51 +0000)]
added reporting of number of bots in getinfo/getstatus replies (they are
counted as clients also, so something parsing the info can deduct them
if it wishes)

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

13 years agofix bug introduced in last patch that made all text print one character
havoc [Wed, 18 Apr 2007 07:00:49 +0000 (07:00 +0000)]
fix bug introduced in last patch that made all text print one character
to the left

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

13 years agofurther optimized space skipping in DrawQ_String
havoc [Wed, 18 Apr 2007 06:45:31 +0000 (06:45 +0000)]
further optimized space skipping in DrawQ_String

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

13 years agochanged weapons bar in nexuiz hud to use alpha rather than additive
havoc [Wed, 18 Apr 2007 06:20:32 +0000 (06:20 +0000)]
changed weapons bar in nexuiz hud to use alpha rather than additive
blend, and have full opacity for 1 second and then fade over half a second

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

13 years agorefactored DrawQ_Pic to actually do the drawing rather than wasting time
havoc [Wed, 18 Apr 2007 05:52:36 +0000 (05:52 +0000)]
refactored DrawQ_Pic to actually do the drawing rather than wasting time
on a DrawQ_SuperPic call
added DrawQ_Fill as an optimized case of DrawQ_Pic
this significantly improved performance of shownetgraph

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

13 years agochanged r_textshadow behavior to always draw a black shadow, but with
havoc [Wed, 18 Apr 2007 05:33:17 +0000 (05:33 +0000)]
changed r_textshadow behavior to always draw a black shadow, but with
alpha dependent on the brightness of the primary text color, this means
you don't get white shadows under black text, but do get black shadows
under white text
rewrote DrawQ_String and friends to be one combined function that draws
colored strings more efficiently by batching characters with differing
colors together, and it even batches the shadow with the text which can
help performance significantly with r_textshadow on

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

14 years agorenamed client netgraphs back to incoming and outgoing
havoc [Tue, 17 Apr 2007 11:59:40 +0000 (11:59 +0000)]
renamed client netgraphs back to incoming and outgoing

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

14 years agoadded shownetgraph 2 mode which shows netgraphs for all clients when
havoc [Tue, 17 Apr 2007 11:51:02 +0000 (11:51 +0000)]
added shownetgraph 2 mode which shows netgraphs for all clients when
hosting a listen server
tweaked shownetgraph separator spacing a bit so that it is only 2 pixels
between incoming/outgoing graphs, and 4 pixels between netgraphs
relabeled incoming/outgoing graphs to world/input

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

14 years agomoved calls of CL_ReadDemoMessage and CL_SendMove from CL_ReadFromServer
havoc [Tue, 17 Apr 2007 11:50:04 +0000 (11:50 +0000)]
moved calls of CL_ReadDemoMessage and CL_SendMove from CL_ReadFromServer
to the main loop
renamed CL_ReadFromServer to CL_UpdateWorld, and it is now called even
if not connected (to clear the r_refdef entities/lights info, and the

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

14 years agono longer sends nearly-empty input packets when cl.time is less than the
havoc [Tue, 17 Apr 2007 11:48:51 +0000 (11:48 +0000)]
no longer sends nearly-empty input packets when cl.time is less than the
previous move time

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

14 years agoreplaced cl_nettimesyncmode with 3 cvars cl_nettimesyncfactor,
havoc [Tue, 17 Apr 2007 09:32:44 +0000 (09:32 +0000)]
replaced cl_nettimesyncmode with 3 cvars cl_nettimesyncfactor,
cl_nettimesyncboundmode, cl_nettimesyncboundtolerance
the new default time sync method is from Quake3 and slowly adjusts 1ms
forward each packet received, or falls back 2ms if it found itself ahead
of time

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

14 years agofix a crash reported by Lardarse when using more skin textures for a
havoc [Tue, 17 Apr 2007 08:03:27 +0000 (08:03 +0000)]
fix a crash reported by Lardarse when using more skin textures for a
.mdl model than skins exist in the model, this was caused by texture_t
containing pointers to itself that were broken by the reallocation of
the array

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

14 years agomoved shownetgraph to right side of screen
havoc [Tue, 17 Apr 2007 05:54:26 +0000 (05:54 +0000)]
moved shownetgraph to right side of screen

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

14 years agoin X11, keypad * is KP_MULTIPLY, not '*'
divverent [Mon, 16 Apr 2007 21:51:29 +0000 (21:51 +0000)]
in X11, keypad * is KP_MULTIPLY, not '*'

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

14 years agoserver no longer calls networking on each physics frame (since sv.datagram
havoc [Mon, 16 Apr 2007 13:37:42 +0000 (13:37 +0000)]
server no longer calls networking on each physics frame (since sv.datagram
is no longer important)

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

14 years agodisable some debugging code that caused an empty packet to be sent each
havoc [Mon, 16 Apr 2007 13:36:31 +0000 (13:36 +0000)]
disable some debugging code that caused an empty packet to be sent each
server frame even if CanSend returned false (which was done just to see
when the CanSend blocking was occurring, since it was hard to tell)

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

14 years agoimplemented shownetgraph
havoc [Mon, 16 Apr 2007 13:08:38 +0000 (13:08 +0000)]
implemented shownetgraph
major overhaul of rate limiting code
implemented packet-frequency rate limiting (like qw/q2/q3) as a fallback
when packet size limiting fails (such as packet sizes below 100 bytes
causing all sorts of issues, so now the minimum bound on maxsize is 100,
and another good example is reliable messages exceeding the rate limit)

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

14 years agofixed several issues in the recent effect rate limiting code (situations
havoc [Mon, 16 Apr 2007 13:05:26 +0000 (13:05 +0000)]
fixed several issues in the recent effect rate limiting code (situations
where it could get stuck and stop sending them entirely due to too low a
rate setting)
fixed issues introduced in recent stats code (was not resetting them on
a level change, leading to very broken stats for the client)
this includes a missing part of the LOWPRECISION-on-all-entities patch so
that now works

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

14 years agoEF_LOWPRECISION is now default on all entities except the player, this
havoc [Mon, 16 Apr 2007 12:21:00 +0000 (12:21 +0000)]
EF_LOWPRECISION is now default on all entities except the player, this
saves quite a bit of bandwidth (bad side effect: rotating bmodels are
less smooth, need another workaround for that...)
fixed a bug in entity priorities which caused entities to be sent with
no change bits set (which did nothing useful, just wasted bandwidth),
saving quite a bit more bandwidth

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

14 years agosv.datagram is now flushed to client->unreliablemsg buffers, along with
havoc [Mon, 16 Apr 2007 07:57:51 +0000 (07:57 +0000)]
sv.datagram is now flushed to client->unreliablemsg buffers, along with
logging of good split points so that each effect can be issued to
different packets as space allows (sending some each packet), this makes
effects finally obey the rate limit
cleaned up sending of csqc stats in pre-DP6 protocols and renamed the
autosentstats stuff to customstats to better represent what it does
implemented stats updates in pre-DP6 protocols (mostly for sake of
customstats code cleanlyness)

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

14 years agomade cl_joinbeforedownloadsfinish a saved cvar
havoc [Sun, 15 Apr 2007 23:37:17 +0000 (23:37 +0000)]
made cl_joinbeforedownloadsfinish a saved cvar

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

14 years agomade cl_nettimesyncmode a saved cvar
havoc [Sun, 15 Apr 2007 23:36:43 +0000 (23:36 +0000)]
made cl_nettimesyncmode a saved cvar

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

14 years agoadded cl_nettimesyncmode 7 (adaptive + loose sync)
havoc [Sun, 15 Apr 2007 22:13:01 +0000 (22:13 +0000)]
added cl_nettimesyncmode 7 (adaptive + loose sync)

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

14 years agoadded cl_nettimesyncmode 6 (adaptive sync, gradually adapts to server
havoc [Sun, 15 Apr 2007 21:59:02 +0000 (21:59 +0000)]
added cl_nettimesyncmode 6 (adaptive sync, gradually adapts to server

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

14 years agoincreased cl_nettimesyncmode 5 tolerance to 25% of time delta to better
havoc [Sun, 15 Apr 2007 21:42:45 +0000 (21:42 +0000)]
increased cl_nettimesyncmode 5 tolerance to 25% of time delta to better
accomodate german ADSL

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

14 years agochanged cl_nettimesyncmode 2 to use tighter tolerances again (1 frame,
havoc [Sun, 15 Apr 2007 21:36:53 +0000 (21:36 +0000)]
changed cl_nettimesyncmode 2 to use tighter tolerances again (1 frame,
not 2)
added cl_nettimesyncmode 5 (new default) which is like 2 but has very
tight tolerances (1/8th of frame delta)

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

14 years agosp2 loader no longer errors if an image is missing
havoc [Sun, 15 Apr 2007 20:52:08 +0000 (20:52 +0000)]
sp2 loader no longer errors if an image is missing
(WHY did it do this before??)

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

14 years agoNew console commands sv_cmd, menu_cmd, cl_cmd, that call GameCommand(string s) in...
divverent [Sun, 15 Apr 2007 20:01:38 +0000 (20:01 +0000)]
New console commands sv_cmd, menu_cmd, cl_cmd, that call GameCommand(string s) in the server, menu, client program with the remainder of the command line as argument. Extension: DP_QC_CMD for all of them, DP_SV_CMD for sv_cmd.

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

14 years agoadds a cvar r_picmipsprites that, when set to 0, makes gl_picmip not affect sprites
divverent [Sun, 15 Apr 2007 09:21:17 +0000 (09:21 +0000)]
adds a cvar r_picmipsprites that, when set to 0, makes gl_picmip not affect sprites

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

14 years agofix segfault sendcvar for non existing cvars introduced in r6933
divverent [Sat, 14 Apr 2007 20:44:36 +0000 (20:44 +0000)]
fix segfault sendcvar for non existing cvars introduced in r6933

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

14 years agochanged default cl_autodemo_nameformat to put demos in an autodemos/
havoc [Sat, 14 Apr 2007 18:27:13 +0000 (18:27 +0000)]
changed default cl_autodemo_nameformat to put demos in an autodemos/
directory (they clutter the id1 directory too much)

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

14 years agoremoved all commandline checks for the option "-safe" except for the
havoc [Sat, 14 Apr 2007 01:11:00 +0000 (01:11 +0000)]
removed all commandline checks for the option "-safe" except for the
OpenGL extension checks, this makes -safe actually playable

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

14 years agosaved a little more memory by not keeping around the basebonepose data
havoc [Fri, 13 Apr 2007 22:53:33 +0000 (22:53 +0000)]
saved a little more memory by not keeping around the basebonepose data
after loading (it can be regenerated by inverting the inverse array

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

14 years agofix broken allocation code for skeletal models that was allocating too
havoc [Fri, 13 Apr 2007 22:41:27 +0000 (22:41 +0000)]
fix broken allocation code for skeletal models that was allocating too
much memory for basebonepose arrays (thanks to Vic for reporting this)

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

14 years agoremoved cl_nettimesyncmode 5 code, changed default to 1 (5 had no
havoc [Fri, 13 Apr 2007 22:20:03 +0000 (22:20 +0000)]
removed cl_nettimesyncmode 5 code, changed default to 1 (5 had no
theoretical advantages over 1)

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

14 years agoadded cl_nettimesyncmode 5 (now the default), this is very similar to
havoc [Fri, 13 Apr 2007 22:08:32 +0000 (22:08 +0000)]
added cl_nettimesyncmode 5 (now the default), this is very similar to
cl_nettimesyncmode 1 but allows up to 1 millisecond fluctuations

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

14 years agochanged .viewzoom field to scale view frustum slopes rather than fov
havoc [Fri, 13 Apr 2007 15:32:41 +0000 (15:32 +0000)]
changed .viewzoom field to scale view frustum slopes rather than fov
angle, this makes zooming more fluid and straightforward, and causes a 1
to 1 correspondence between the sensitivity decrease and the view size

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

14 years agochanged descriptions of r_ambient and r_fullbright cvars to no longer say that they...
havoc [Thu, 12 Apr 2007 00:39:30 +0000 (00:39 +0000)]
changed descriptions of r_ambient and r_fullbright cvars to no longer say that they don't work in multiplayer (because they do currently)

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

14 years agoremoved some unnecessary code in CL_TimeRefresh_f
havoc [Thu, 12 Apr 2007 00:38:14 +0000 (00:38 +0000)]
removed some unnecessary code in CL_TimeRefresh_f

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

14 years agoimplemented two more checks for cls.timedemo to bypass snd_blocked
havoc [Thu, 12 Apr 2007 00:37:20 +0000 (00:37 +0000)]
implemented two more checks for cls.timedemo to bypass snd_blocked

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

14 years agoadded cls.timedemo check in S_PaintAndSubmit to use cl.mtime[0] for sound sync when...
havoc [Wed, 11 Apr 2007 11:52:34 +0000 (11:52 +0000)]
added cls.timedemo check in S_PaintAndSubmit to use cl.mtime[0] for sound sync when doing timedemos, this greatly improves the accuracy of benchmarks with respect to sound mixing time

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

14 years agopatch from div0 to fix nexuiz ctf flag icon code so it works with vid_conwidth values...
havoc [Sat, 7 Apr 2007 21:29:03 +0000 (21:29 +0000)]
patch from div0 to fix nexuiz ctf flag icon code so it works with vid_conwidth values other than 640

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

14 years agofixed a third instance of the length(CubeVector) attenuation code bug (passing a...
havoc [Sat, 7 Apr 2007 20:52:25 +0000 (20:52 +0000)]
fixed a third instance of the length(CubeVector) attenuation code bug (passing a single float to a 2D texture fetch)

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

14 years agothe value of r_textshadow now controls the amount of offset for the shadow in pixels...
havoc [Sat, 7 Apr 2007 20:27:31 +0000 (20:27 +0000)]
the value of r_textshadow now controls the amount of offset for the shadow in pixels (formerly it was 25% of text size which typically meant 2 pixels)

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

14 years agosomehow forgot to save this file before committing the RENDER_NOSELFSHADOW patch
havoc [Sat, 7 Apr 2007 18:02:45 +0000 (18:02 +0000)]
somehow forgot to save this file before committing the RENDER_NOSELFSHADOW patch

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

14 years agoplayer model no longer shadows gun model
havoc [Sat, 7 Apr 2007 12:36:25 +0000 (12:36 +0000)]
player model no longer shadows gun model
technical explanation: this was done by adding a RENDER_NOSELFSHADOW flag which is used on view models, this flag prevents any entities using the flag from shadowing themselves or eachother...  then another hack was added to queue the shadowing of the RENDER_EXTERIORMODEL entities in the RENDER_NOSELFSHADOW batch (so it does not shadow other RENDER_NOSELFSHADOW entities), but still have it receive shadows by lighting it in the normal self-shadowing batch...   In more general use the RENDER_NOSELFSHADOW flag could be used to make characters not shadow themselves (like in Doom3), however r_shadow_frontsidecasting 0 is a better approach to that problem (partial self-shadowing characters)

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

14 years agoadded clearstencil parameter to R_Shadow_RenderMode_StencilShadowVolumes
havoc [Sat, 7 Apr 2007 08:09:47 +0000 (08:09 +0000)]
added clearstencil parameter to R_Shadow_RenderMode_StencilShadowVolumes

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

14 years agoadded GL_DepthRange function and MATERIALFLAG_SHORTDEPTHRANGE (now used by viewmodels...
havoc [Sat, 7 Apr 2007 08:07:08 +0000 (08:07 +0000)]
added GL_DepthRange function and MATERIALFLAG_SHORTDEPTHRANGE (now used by viewmodels), this prevents viewmodels from poking into walls
changed EF_NODEPTHTEST code to set MATERIALFLAG_SHORTDEPTHRANGE instead of MATERIALFLAG_NODEPTHTEST, this causes proper rendering of opaque models (such as the held item in prydon gate)
this also reenabled stencil shadows on view models but they render as if they are very very small (due to MATERIALFLAG_SHORTDEPTHRANGE)
changed default value of cl_viewmodel_scale from 0.3 to 1, this makes stereo rendering look better (small gun model looks silly when you can actually see that it is small) and makes rtlight cubemaps affect the gun more realistically

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

14 years agoview models no longer receive stencil shadows (only basic light visibility culling...
havoc [Fri, 6 Apr 2007 12:48:52 +0000 (12:48 +0000)]
view models no longer receive stencil shadows (only basic light visibility culling like transparent surfaces receive), this makes the gun much more visible and protects it the player's own shadow, this change may is a major one and may get further changes (such as better culling perhaps)

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

14 years agofix one more case of EF_NODEPTHTEST not being checked
havoc [Fri, 6 Apr 2007 12:39:53 +0000 (12:39 +0000)]
fix one more case of EF_NODEPTHTEST not being checked

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

havoc [Fri, 6 Apr 2007 12:31:00 +0000 (12:31 +0000)]
added MATERIALFLAGMASK_DEPTHSORTED - this solved a lack of sorting on EF_NODEPTHTEST entities

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

14 years agocheck vid_activewindow in several spammy prints that occur when the client is running...
havoc [Fri, 6 Apr 2007 11:29:03 +0000 (11:29 +0000)]
check vid_activewindow in several spammy prints that occur when the client is running slower than the server
changed cl.time warnings from developer 10 to developer 100 and check vid_activewindow

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

14 years agoadded cl_nettimesyncmode 4, this is not the default, just another option to experimen...
havoc [Fri, 6 Apr 2007 10:29:06 +0000 (10:29 +0000)]
added cl_nettimesyncmode 4, this is not the default, just another option to experiment with

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

14 years agomade the following changes to CL_NetworkTimeReceived:
havoc [Fri, 6 Apr 2007 09:48:52 +0000 (09:48 +0000)]
made the following changes to CL_NetworkTimeReceived:
changed cl_nettimesyncmode 2 to be more tolerant of out of bounds values, this fixes occasional choppyness
now prints warnings if time is out of bounds if developer is 10 or higher
simplified some code
disabled time interpolation code during signon process, this should give better starting values for cl.time

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

14 years agochanged "new engine string" prints to also include the current text stored in the...
havoc [Fri, 6 Apr 2007 09:42:43 +0000 (09:42 +0000)]
changed "new engine string" prints to also include the current text stored in the string, to aid in understanding what engine strings are being used

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

14 years agochanged "sample frames missing" and similar warnings to require developer 1000 or...
havoc [Fri, 6 Apr 2007 09:41:58 +0000 (09:41 +0000)]
changed "sample frames missing" and similar warnings to require developer 1000 or higher

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

14 years agofixed a bug where the loading plaque caused front buffer rendering of all later stere...
havoc [Fri, 6 Apr 2007 05:25:18 +0000 (05:25 +0000)]
fixed a bug where the loading plaque caused front buffer rendering of all later stereo views (glDrawBuffer was not being set in stereo rendering, except when vid_stereobuffer was used)
swapped left/right views so that positive values for r_stereo_separation produce normal stereo, not cross-eyed
added r_stereo_angle cvar based on a patch from Thomas Spriggs, this allows you to make the views look different directions, in addition to the existing offset capability

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

14 years agocl_bobmodel_side and cl_bobmodel_up cvars now are scaled by cl_viewmodel_scale so...
havoc [Fri, 6 Apr 2007 05:22:01 +0000 (05:22 +0000)]
cl_bobmodel_side and cl_bobmodel_up cvars now are scaled by cl_viewmodel_scale so that cl_viewmodel_scale can be changed without affecting the amount of viewmodel movement on the screen

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

14 years agofix bug with cl_nolerp 1 that caused playdemo to play back at timedemo speeds
havoc [Thu, 5 Apr 2007 10:31:42 +0000 (10:31 +0000)]
fix bug with cl_nolerp 1 that caused playdemo to play back at timedemo speeds

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

14 years agofixed bug where dpmod weapons fired twice as often as intended (frametime is now...
havoc [Thu, 5 Apr 2007 08:47:17 +0000 (08:47 +0000)]
fixed bug where dpmod weapons fired twice as often as intended (frametime is now 0 in calls to PlayerPreThink/PlayerPostthink on input moves)

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

14 years agofix another prediction issue (physics code was being called per input frame and per...
havoc [Thu, 5 Apr 2007 08:25:54 +0000 (08:25 +0000)]
fix another prediction issue (physics code was being called per input frame and per server frame)

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

14 years agoreworked predicted player physics to call PlayerPreThink before the move and PlayerPo...
havoc [Thu, 5 Apr 2007 08:21:19 +0000 (08:21 +0000)]
reworked predicted player physics to call PlayerPreThink before the move and PlayerPostThink after the move, in addition to calling those surrounding the regular physics code, hopefully this doesn't break anything, it fixes the jumping bug introduced in the recent changes

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

14 years agochanged sv.time to realtime in name change time limit code
havoc [Thu, 5 Apr 2007 07:50:22 +0000 (07:50 +0000)]
changed sv.time to realtime in name change time limit code

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

14 years agoeliminated most calls to Sys_DoubleTime (using realtime instead, or in one case a...
havoc [Thu, 5 Apr 2007 07:14:09 +0000 (07:14 +0000)]
eliminated most calls to Sys_DoubleTime (using realtime instead, or in one case a different sort of check)

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

14 years agofix severe timing issues regarding the global variable realtime which governs many...
havoc [Thu, 5 Apr 2007 07:02:29 +0000 (07:02 +0000)]
fix severe timing issues regarding the global variable realtime which governs many things in the engine

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

14 years agofix bug with players not moving during the input timeout after prediction is intentio...
havoc [Thu, 5 Apr 2007 05:09:59 +0000 (05:09 +0000)]
fix bug with players not moving during the input timeout after prediction is intentionally disabled

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

14 years agofixed compile error in GLSL shader with the new textured attenuation code
havoc [Wed, 4 Apr 2007 19:06:54 +0000 (19:06 +0000)]
fixed compile error in GLSL shader with the new textured attenuation code

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

14 years agoimplemented vbo rendering of map, models, and compiled shadow volumes
havoc [Wed, 4 Apr 2007 15:22:02 +0000 (15:22 +0000)]
implemented vbo rendering of map, models, and compiled shadow volumes

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

14 years agoadded gl_vbo cvar to allow disabling of vbo rendering (and vbo creation while loading...
havoc [Wed, 4 Apr 2007 15:21:34 +0000 (15:21 +0000)]
added gl_vbo cvar to allow disabling of vbo rendering (and vbo creation while loading models) for immediate comparison of framerates with/without vbo

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

14 years agonow creates EBOs and VBOs containing static model geometry, map geometry, and compile...
havoc [Wed, 4 Apr 2007 11:54:05 +0000 (11:54 +0000)]
now creates EBOs and VBOs containing static model geometry, map geometry, and compiled shadows

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

14 years agoadded bufferobject and bufferoffset parameters to all R_Mesh_*Pointer functions and...
havoc [Wed, 4 Apr 2007 10:18:14 +0000 (10:18 +0000)]
added bufferobject and bufferoffset parameters to all R_Mesh_*Pointer functions and R_Mesh_Draw

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

14 years agothe beginnings of VBO support in the rendering backend
havoc [Wed, 4 Apr 2007 08:32:31 +0000 (08:32 +0000)]
the beginnings of VBO support in the rendering backend

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

14 years ago*** empty log message ***
havoc [Wed, 4 Apr 2007 07:16:15 +0000 (07:16 +0000)]
*** empty log message ***

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

14 years agocorrected showturtle cvar description (it said it was unused, it actually does work)
havoc [Wed, 4 Apr 2007 04:28:28 +0000 (04:28 +0000)]
corrected showturtle cvar description (it said it was unused, it actually does work)

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

14 years agofixed two timing flaws where cl.realframetime was used instead of (cl.time - cl.oldti...
havoc [Wed, 4 Apr 2007 04:27:17 +0000 (04:27 +0000)]
fixed two timing flaws where cl.realframetime was used instead of (cl.time - cl.oldtime), one being centerprint fade time, and the other being ambient sky/water noise fading

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

14 years agofix bug in the previous movement patch where moves were not applied to the QC fields...
havoc [Tue, 3 Apr 2007 04:09:11 +0000 (04:09 +0000)]
fix bug in the previous movement patch where moves were not applied to the QC fields when not MOVETYPE_WALK

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

14 years agochanged PlayerPrethink/think/PlayerPostThink to occur regardless of movement predicti...
havoc [Tue, 3 Apr 2007 02:44:30 +0000 (02:44 +0000)]
changed PlayerPrethink/think/PlayerPostThink to occur regardless of movement prediction, so they are guarenteed to run every server frame like in quake/quakeworld, only the movement itself is done elsewhere and only for MOVETYPE_WALK cases, this means that animations keep proper sync regardless of prediction timing

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

14 years agoadded detection of VBO extension
havoc [Tue, 3 Apr 2007 02:40:06 +0000 (02:40 +0000)]
added detection of VBO extension

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

14 years agopatch from div0 to fix the fixangle logic (my fix apparently didn't work properly...
havoc [Sat, 31 Mar 2007 09:56:59 +0000 (09:56 +0000)]
patch from div0 to fix the fixangle logic (my fix apparently didn't work properly either)

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

14 years agopatch from div0 that improves mac keyboard support in the AGL client, this includes...
havoc [Sat, 31 Mar 2007 09:42:34 +0000 (09:42 +0000)]
patch from div0 that improves mac keyboard support in the AGL client, this includes a copy of SDL_mackeys.h (as vid_agl_mackeys.h), it should be kept up to date as appropriate

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

14 years agoadded back bullet impact sparks due to complaints
havoc [Fri, 30 Mar 2007 20:42:13 +0000 (20:42 +0000)]
added back bullet impact sparks due to complaints
made grenade smoke trails only last 2/3rd as long (this matches the quake grenade trail vs the quake rocket trail length)

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

14 years agoslight improvement to the new bullet smoke
havoc [Fri, 30 Mar 2007 19:59:40 +0000 (19:59 +0000)]
slight improvement to the new bullet smoke

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

14 years agomake timedemo and -benchmark use srand(0) to get more predictable results
havoc [Fri, 30 Mar 2007 08:48:11 +0000 (08:48 +0000)]
make timedemo and -benchmark use srand(0) to get more predictable results

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