havoc [Fri, 4 May 2007 07:01:34 +0000 (07:01 +0000)]
fixed broken trails (introduced by my attempt to fix them)
fixed a bug where attachments to viewmodelforclient entities would show
up in the world in chase_active 1 mode near 0 0 0
rain particles now trace ahead at spawn and only begin collision
checking when near the impact time
havoc [Tue, 1 May 2007 06:11:48 +0000 (06:11 +0000)]
significant cleanup of input networking code (reorganized and now uses
frametimes rather than timestamps for queued moves) and some refinements
to prediction code
tried to reimplement the anti-pogostick code and it's partially working
but not completely (mispredicts for one frame each time)
Applied KadaverJack's patch on my cl_sound_ric_gunshot code that provides a small optimization by using bitwise operations instead of numerical calculations.
Added DP_QC_STRING_CASE_FUNCTIONS extension, providing VM functions strtolower and strtoupper which return the lowercase and uppercase of strings respectively, available across the CL, SV and MENU VMs.
removed cl_nettimesyncboundmode 5 because it seems to print many more
time warnings than 4 does when developer is on
now sets cls.servermovesequence to cls.netcon->qw_incoming_sequence
now keeps around qw player entities if a packet does not contain any
(an fteqw server I was testing on sometimes sent packets containing
large reliable message groups but no player entities at all)
Updated cl_sound_ric_gunshot CVar to support multiple modes. 0 plays no sounds, 1 plays sounds on TE_GUNSHOT, 2 plays sounds on TE_GUNSHOTQUAD and 3 plays sounds on both TE_GUNSHOT and TE_GUNSHOTQUAD. This is not bloat because the Crylink in Nexuiz uses TE_GUNSHOTQUAD, and most people don't want ricochet sounds on that (though if you do, all the merrier).
Added cl_sound_ric_gunshot which specifies if the related cl_sound_ric and cl_sound_tink CVars will apply to te_gunshot and te_gunshotquad calls. The default value is 0 and it is not saved.
make COM_StringLengthNoColors and COM_StringDecolorize get an additional length parameter to just work on part of a string (if set to 0, it means use the whole string); use that in centerprint drawing to fix centering issues in some odd situations like "^^^^^^^^^^^^^^^^^^^^^^^^^^".
fixed bug where animated mdl skins (such as Tomaz's health box and
explobox models in dpmod) were getting freed because they were not
properly counted in the model->num_textures
prevent abuse by ending netname with a ^: if the name is not a valid colored string, add a ^ if possible, and if there is no space for it, remove the trailing ^
fix strlennocol/strdecolorize on unusual strings like "foo^";
now strlennocol returns the visible width (like before) and strdecolorize
returns a string that can be safely printed and that looks like the original,
just without the colors.
added DP_SV_MODELFLAGS_AS_EFFECTS extension, this adds EF_ROCKET and
friends as effect bits in the protocol, the QC can use these constants
directly or can use the new .modelflags field to set them without float
precision issues caused by the large values, this basically means that
you can make an entity leave a blood trail, or look like a rocket
Added QC float .allowtouchwithowner . Setting this to true allow an entity to touch its owner (ie. missile or grenade). Be careful where you spawn your projectiles and assign this value, as you may end up detonating the projectile immediately.
replaced Mod_LoadSkinFrame functions with R_SkinFrame system, this
allows multiple models to share textures in a given level, as well as
models using the same texture multiple times (often the case in md3
where meshes have a vertex limit, and q3bsp where texture structs
describe surface properties and multiple may exist referring to the same
texture set)
this reduced Nexuiz video memory usage by over 150MB
replaced qglArrayElement calls with qglVertex3f calls in showtris code,
this avoids issues with abysmal gl_vbo 1 performance on NVIDIA cards
(which seem to use a software fallback for drawing lines for some
reason)
modified Mod_LoadSkinFrame to not attempt to generate a fogging mask if
not given the TEXF_ALPHA flag (in which case the fog mask would not be
used anyway)
fixed several bugs in fog code, it basically wasn't working in the
r_glsl 0 case at all, it still doesn't work with rtlights in gl_combine
1 mode though
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
before
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
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
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
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
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
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)
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
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
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
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
num_brushmodels)
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
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