by mh » Thu Nov 19, 2009 12:31 am
Good points. I addressed this in DirectQ by allowing the MP3s to retain their original names and instead using the number as an index in the file listing, but your idea of being able to specify a name in worldspawn is something I never really thought of. In theory it could be OK, as the worldspawn key can be read and reacted to separately at load time. In practice the messy part is that the Quake architecture specifies a CD tracknumber which is only accessed by the server and sent to the client as an svc_cdtrack message. This would also mean that the server (including QC) would have the ability to specify an arbitrary change of CD track at any point during gameplay.
Now, the interesting thing is that the Red Book spec only allows up to 99 tracks on a CD, and the message is sent as a byte. It's hacky, but given that this is a clear case where a certain type of message that would otherwise never be used exists, one could interpret a value above 100 as indicating that the message is to be followed by a string; possibly just a track name but more usefully a command that could play, pause, stop, change volume, etc.
I wouldn't be comfortable implementing this without a protocol or QC extension, but that's where we're getting into other territories (and where my proposed extensible protocol would be a Good Thing, rather than having to invent complete new protocols for every additional thing, no matter how minor).