[quake3-bugzilla] [Bug 4698] [patch] allow changing claimed protocol version at command line

bugzilla-daemon at icculus.org bugzilla-daemon at icculus.org
Sun Mar 6 18:31:41 EST 2011


https://bugzilla.icculus.org/show_bug.cgi?id=4698

--- Comment #6 from Simon McVittie <smcv-ioquake3 at pseudorandom.co.uk> 2011-03-06 18:31:34 EST ---
(In reply to comment #4)
> FS_FOpenFileRead: allow loading any demo, not just the current protocol

This one is about relaxing the engine's restrictions on what files it's willing
to load from outside a .pk3 file, so it'll allow anything that "looks like a
demo", but only if some other code path results in it being loaded at all. This
is to avoid having to check through demo_protocols here as well, for
simplicity.

> Load demos using the protocol version from the command line, if overridden

and this one tries the chosen demo extension before the contents of
demo_protocols. I'm relying on the fact that Quake III's actual network
protocol has been stable for quite a long time (since before it was GPL'd, I
think?); the only reason OpenArena changes its "protocol version" is to fail
early and gracefully when an OA player joins a Q3 server,  or vice versa.

> I guess the best thing you can do is check for these
> protocol versions in common.c + additionally the new protocol version as
> defined in the cvar, but reject all other protocols.

I actually tried the cvar *before* demo_protocols, but yes. In the common case
where the cvar's value is repeated in demo_protocols, we'll just try that
extension twice, which should be pretty cheap; we're not on a fast-path here or
anything.

> Second issue I have with your second patch is that you named the cvar
> "sv_protocol". There's no reason for this, it should be called "com_protocol",
> because the client AND server both need the protocol version.

It's sv_protocol because that already existed; I moved it from CVAR_READONLY to
CVAR_INIT. If you'd prefer com_protocol, we probably also still need a
sv_protocol that's a read-only copy of com_protocol, for compatibility?

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


More information about the quake3-bugzilla mailing list