Bug 5462 - do not require clients to have a matching qagame.qvm
Status: RESOLVED FIXED
Alias: None
Product: ioquake3
Classification: Unclassified
Component: Misc
Version: GIT MASTER
Hardware: PC Linux
: P3 enhancement
Assignee: Zachary J. Slater
QA Contact: ioquake3 bugzilla mailing list
URL:
Depends on:
Blocks:
 
Reported: 2012-03-31 12:20 EDT by Simon McVittie
Modified: 2012-07-01 09:54:01 EDT
2 users (show)

See Also:


Attachments
FS_GamePureChecksum: remove, never called (1.70 KB, patch)
2012-03-31 12:24 EDT, Simon McVittie
Do not reference a pak file just because it contains qagame.qvm (1.26 KB, patch)
2012-03-31 12:24 EDT, Simon McVittie

Description Simon McVittie 2012-03-31 12:20:07 EDT
In ioquake3, the PK3 containing qagame.qvm is considered to be "referenced", even if it contains nothing else, which as far as I can see causes clients to be required to have it (at the same version as the server). However, FS_ReferencedPakPureChecksums does not respect flags numerically less than FS_QAGAME_REF, so if a PK3 contains qagame.qvm but nothing else, it does not affect the pure server checksum.

OpenArena patches the PK3 checksumming code to not reference a PK3 file just because it contains qagame.qvm, allowing for server-side-only mods in which "change the rules" but do not alter cgame or ui.

This seems a reasonable thing to have - it doesn't matter whether clients have the server's version of qagame, because they're not going to execute its code (only the server needs to do that).

I've extracted patches from OpenArena's fork of ioquake3 which will apply to current(ish) ioquake3 (verified as of r2224).
Comment 1 Simon McVittie 2012-03-31 12:24:14 EDT
Created attachment 3104 [details]
FS_GamePureChecksum: remove, never called

Adapted from OpenArena (they just commented it out, but with a version control system available, deleting dead code is cleaner).
Comment 2 Simon McVittie 2012-03-31 12:24:59 EDT
Created attachment 3105 [details]
Do not reference a pak file just because it contains qagame.qvm

This allows for server-side-only code mods. Clients don't need to execute
qagame.qvm, so it doesn't matter whether they have the same one as the
server. FS_ReferencedPakPureChecksums only respects flags numerically
less than FS_QAGAME_REF anyway, so this doesn't change the checksums.

Adapted from OpenArena.
Comment 3 Zack Middleton 2012-05-07 18:27:12 EDT
Applied patches in r2246. Also removed the FS_QAGAME_REF define as it was left unused.
Comment 4 Thilo Schulz 2012-07-01 09:54:01 EDT
Thank you. I've been meaning to implement this change myself.
If ioquake3 is to make another release, with this change by supplying two new pak files (like pak90.pk3 with only a qagame.qvm and pak91.pk3 with cgame). Albeit this would still require a bit of modification of SV_VerifyPaks_f(), this would allow server admins and users of ioquake3 to profit from the improved, bugfixed qvms, while vanilla q3 users would be able to use the old qvms without problems.