[Bug 3787] New: better handling of voip target bitfields

bugzilla-daemon at icculus.org bugzilla-daemon at icculus.org
Mon Sep 22 12:08:01 EDT 2008


http://bugzilla.icculus.org/show_bug.cgi?id=3787

           Summary: better handling of voip target bitfields
           Product: Quake 3
           Version: SVN HEAD
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: enhancement
          Priority: P3
         Component: Misc
        AssignedTo: zakk at icculus.org
        ReportedBy: bugzilla at benmachine.co.uk
         QAContact: quake3-bugzilla at icculus.org


This patch has the following effects:

1. The voip code is made independent of MAX_CLIENTS by substituting
clc.voipTarget[1-3] with clc.voipTargets, an array of uint8_t which is always
just big enough. This makes a client and server with different values of
MAX_CLIENTS incompatible but I assume that's more or less the case anyway.
For efficiency I could have used the value of sv_maxclients for how much I want
to send, but I decided against this in favour of simplicity.
This unfortunately changes the voip protocol version, which brings me to:

2. Some code in aid of specifying one or more protocol versions has been added,
although my attempts to maintain backwards compatibility ultimately proved
futile and I've since been advised they were unnecessary. The macro
VOIP_PROTOCOL_OK() is now used on the protocol version numbers instead of
merely storing whether or not they are supported as booleans.
For what it's worth: supporting more than one protocol version was easy to code
for but very difficult to actually use, because you have to either keep sv_voip
and cl_voip the same, thus refusing to accept the new style, or change them,
losing backward compatibility anyway. What would be useful would be some kind
of list of supported protocols, perhaps space- or comma-separated in the two
variables instead of a single integer. When connecting, a client and server
would agree to use the highest number that appeared in both lists. If this is
deemed a good idea, I may well begin work on it, but at present it seems like
it would complicate things needlessly.

3. Instead of being parsed each time it is changed, cl_voipSendTarget is parsed
every time the voip key is pressed. This is necessary because even while the
string value remains constant, the target it represents may change (e.g. with
"crosshair" or "attacker").

Probably I should separate these features out and submit them separately, but
they kind of depend upon each other, so I'm only going to put the work in if
someone tells me that one or two of the features are not wanted (and the
other[s] are).


-- 
Configure bugmail: http://bugzilla.icculus.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug, or are watching the QA contact.



More information about the quake3-bugzilla mailing list