From: Brian N. <bn...@sp...> - 2002-01-12 22:25:35
|
Thanks, I appreciate your looking into this. On Fri, 11 Jan 2002, Ludwig Nussel wrote: > Date: Fri, 11 Jan 2002 23:23:03 +0100 > To: Brian Nunziato <bn...@sp...>, Alex Burger > <al...@bi...> > From: Ludwig Nussel <lud...@gm...> > Reply-To: xqf...@li... > Subject: Re: XQF Q3 bug fix. (fwd) > > > Thanks for caring about xqf's usability, Alex sent me your patches > to have a look at it. > > > ---------- Forwarded message ---------- > > From: Brian Nunziato <bn...@sp...> > > > Evey mod I have ever installed, uses an all lower case directory name. > So > > what my patch does is convert the fs_game/game/gamename returned from > qstat > > to lowercase. I've tested it locally and it appears to work pretty > well. > > In short, the patch seems to be a good idea but I don't intend to > apply it as is. IMO q3_exec would be a more suitable place to do the > conversion to lowercase and free the string afterwards. Also, the > conversion should be done in a way that is not prone to buffer > overflows. > From a developers standpoint it may be better suited in q3_exec. Personally, I liked seeing the mod directory listed in xqf consistently. I went back last night and pulled my existing change and rewrote it using Glib functions to allocate/manipulate/free the data in q3_exec. I still get the desired results of the fs_game parameter being lowercase. If you are interested in seeing that code, I can send it to you. > Most of the uppercase mod names come from qstat 2.4e which queries > quake3 servers in a way to get the most rules from the server and > uses "gamename" to determine the mod. Quake3 uses a different method > which returns less rules, but that rules contain "game" to determine > the mod, this does also properly report "missionpack" for Team Arena > Servers. I modified qstat to combine both query methods and sent the > patch to the qstat author. He will not use it literally but will > include it's functionality in the next release (I actually rewrote > the whole q3 function because I found his code ugly, but he likes > his code too much ;-)). So the TA Problem will be solved with the > next qstat release. It will also solve most, but not all of the > upper/lowercase problems. There seem to be a few broken servers out > there where even "game" is wrong. Your assumption was that lowercase > is always right, but there are mods that really use mixed case > names. I have currently not the time to test whether always using > lowercase won't brake quake3 on that servers, so I would appreciate > it if you could check if it works. A server that reports "TribalCTF" > is here: > > 156 24.25.32.68:27960 Wilmington NC RR TribalCTF 2.0 tbctf_ele1 1 of > 18 > > I've attached my qstat patch. As I already said, it will not make > it's way into qstat in this form but should be suitable to find > servers which still report uppercase mods. > > cu > Ludwig > > PS: I would like to move the discussion to the xqf-developer list if > you don't mind. > > -- > (o_ Lud...@gm... > //\ PGP Key ID: FF8135CE > V_/_ ICQ: 52166811 > > The problem here seems to be more of a Quake 3 problem more than xqf or qstat. If I run a mod from the command line, I must specify the mod directory name as the fs_game parameter. The parameter is case-sensitive. If the fs_game parameter does not exactly match the directory name then the mod's qvm's will not be loaded and fall back to baseq3 qvm's. Here's the problem though. Even though a mod dir wasn't found a mod subdirectory will be used/created in ~/.q3a. Now, to make matters worse. If you connect to a server using xqf and the mod directory passed in fs_game doesn't exit, it falls back to baseq3. But, when connecting Quake 3 realises the use of a mod and switches to it correctly. What it doesn't do is use the proper mod directory in ~/.q3a, it uses what was passed as the fs_game parameter no matter how wrong it may be. If you don't pass the fs_game parameter, quake3 will load the mod and use the right mod subdirectory in ~/.q3a. Problem is it overwrites the q3config.cfg with the ~/.q3a/baseq3/q3config.cfg. The way xqf stands today with case variations of the fs_game parameter, you wind up with multiple mod subdirectories in ~/.q3a. As a user, this is a pain in the neck. My q3config.cfg for a mod winds up in multiple directories. I think it would be better if xqf created the fs_game parameter consistently. Xqf could check if the fs_game parameter exists as a quake3 mod subdirectory prior to launching quake3. But, what do you do in in the event that you can't find it? I don't have Tribal CTF and went to download it for testing. I found this interesting quote on the downloads page. * Note for the Mac/Linux download: FilePlanet reports "windows installer.zip" but this IS the Mac/Linux zip file! Linux users must be aware of the fact that the TribalCTF folder contains capitols. If you're having problems, try renaming the folder to tribalctf. This is a known bug that will be fixed with the next patch/release. The use of lowercase mod direcory names is an assumtion, based on what I have seen. All of the major mods RA3, OSP, CPMA, TA, Urban Terror, Threewave all use lowercase. Even Tribal CTF is calling it a "known bug" and recommend renaming the directory to lowercase. Potentially, this could break some mods. What about adding a note to the quake3 config tab by the fs_game option. Something to the extent of making sure all mod subdirectories use all lowercase. Just a thought. I will apply your patch to qstat and see if I can find any other mods that use mixed or uppercase in the game name. Brian Nunziato |