xLAva/JediOutcastLinux — pull request #11 by apocalyptech (2013-04-18 21:59:56+00:00)
Title: Fix pk3 file loading order on Linux

The PK3 files in the game's dir should be loaded in reverse-alphabetical order. Using scandir(3) instead of opendir(3) is an easy way to do so. This way the PK3s are loaded in the proper order, thus ensuring that patches and mods will be loaded properly.

Some output from the usual startup prior to the patch:

Current search path:
/home/pez/git/JediOutcastLinux/code/Release/base/ultimateblood.pk3 (19 files)
/home/pez/git/JediOutcastLinux/code/Release/base/assets2.pk3 (289 files)
/home/pez/git/JediOutcastLinux/code/Release/base/assets0.pk3 (6674 files)
/home/pez/git/JediOutcastLinux/code/Release/base/assets5.pk3 (4 files)
/home/pez/git/JediOutcastLinux/code/Release/base/assets1.pk3 (8011 files)
/home/pez/git/JediOutcastLinux/code/Release/base/assets6.pk3 (2 files)
/home/pez/git/JediOutcastLinux/code/Release/base

(Note that a custom "assets6.pk3" is all the way at the end.) And from after the patch:

Current search path:
/home/pez/git/JediOutcastLinux/code/Release/base/ultimateblood.pk3 (19 files)
/home/pez/git/JediOutcastLinux/code/Release/base/assets6.pk3 (2 files)
/home/pez/git/JediOutcastLinux/code/Release/base/assets5.pk3 (4 files)
/home/pez/git/JediOutcastLinux/code/Release/base/assets2.pk3 (289 files)
/home/pez/git/JediOutcastLinux/code/Release/base/assets1.pk3 (8011 files)
/home/pez/git/JediOutcastLinux/code/Release/base/assets0.pk3 (6674 files)
/home/pez/git/JediOutcastLinux/code/Release/base