Bug 4794 - "Autocomplete" feature for "\exec" command works correcly when you are in main menu, but not when you are playing
Status: RESOLVED FIXED
Alias: None
Product: ioquake3
Classification: Unclassified
Component: Misc
Version: 1.36
Hardware: PC Windows XP
: P3 normal
Assignee: Zachary J. Slater
QA Contact: ioquake3 bugzilla mailing list
URL:
Depends on:
Blocks:
 
Reported: 2010-11-08 16:16 EST by Gig
Modified: 2011-02-11 09:31:03 EST
2 users (show)

See Also:


Attachments
Auto complete exec and condump filenames on pure servers. (696 bytes, patch)
2011-01-21 18:54 EST, Zack Middleton
Add option to allowNonPureFilesOnDisk (5.01 KB, patch)
2011-02-09 23:33 EST, Zack Middleton
Auto complete demos on not in pk3s while in pure servers. (431 bytes, patch)
2011-02-10 18:25 EST, Zack Middleton

Description Gig 2010-11-08 16:16:47 EST
After you load a map, the autocompletion feature for the "exec" command does not work correctly.

How to reproduce:
Create a "test.cfg" file and place it under your &appdata%\quake3\baseq3 folder.
Then launch the game. From the main menu, pull down the console, type "\exec t" and press TAB key. You will see your test file listed. Now load a map, then pull down the console, type "\exec t" and press TAB key: this time, your test.cfg file is not listed there (even if there are other .cfg files listed... maybe are they packaged inside some pk3s?). Why?

Note: if you manually type the complete command "exec test", it works.
Comment 1 Zack Middleton 2011-01-21 18:54:09 EST
Created attachment 2560 [details]
Auto complete exec and condump filenames on pure servers.

Auto complete didn't work because client was connected to a pure server. condump command has the same issue. When in pure mode it doesn't list files not in pure pk3s. Added code to check if listing files for exec or condump, if true also lists files not in pk3s.
Comment 2 Gig 2011-01-23 05:42:18 EST
Thank you!
Comment 3 Thilo Schulz 2011-02-06 13:07:30 EST
I'm sorry, this patch is far too hacky for my taste. You are free to change the function itself, to include a parameter so that it doesn't do a pure check and returns all files. Would you resubmit the patch then?
Comment 4 Thilo Schulz 2011-02-08 18:17:14 EST
Feel free to reopen this bug if you have a new patch.
Comment 5 Zack Middleton 2011-02-09 23:33:57 EST
Created attachment 2588 [details]
Add option to allowNonPureFilesOnDisk

Non-hacky version of previous patch. Instead of checking file ext there is now a variable allowNonPureFilesOnDisk. Only exec and condump auto-complete set allowNonPureFilesOnDisk to qtrue.
Comment 6 Zack Middleton 2011-02-09 23:36:07 EST
Reopened bug now that there is a new patch.
Comment 7 Thilo Schulz 2011-02-10 15:00:05 EST
(In reply to comment #6)
> Reopened bug now that there is a new patch.

I can see at least another case where one would need that: what about the
"devmap/map" commands when you are connected to pure servers? As devmap or map is a local command there's no reason to restrict the autocomplete to the server's pak files. Could you check that out for me please, and if this is a problem add a patch and reopen this bug?
In the meantime, your patch looks fine at a quick glance, so I'll apply it, thank you!
Comment 8 Zack Middleton 2011-02-10 18:25:09 EST
Created attachment 2600 [details]
Auto complete demos on not in pk3s while in pure servers.

After testing it appears clients will not load non-pure maps when connected to a pure server ("Can't find map x"), so should not be changed.

However, demo command will load demos not in pk3s while in pure server so it should use new auto complete too.
Comment 9 Zack Middleton 2011-02-10 18:26:27 EST
Reopened, new patch for more functionality.
Comment 10 Thilo Schulz 2011-02-11 09:31:03 EST
thx, applied.