chdir() to the data directory before loading data.
This is necessary for starfighter to find the data files if it is not using a .pak file.
This commit is contained in:
parent
78459e9fdb
commit
4c5eed148f
|
@ -24,6 +24,14 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
|
#if !USEPACK
|
||||||
|
char datadir[] = PACKLOCATION;
|
||||||
|
char *slash = strrchr(datadir, '/');
|
||||||
|
if(slash)
|
||||||
|
*slash = 0;
|
||||||
|
chdir(datadir);
|
||||||
|
#endif
|
||||||
|
|
||||||
defineGlobals(); // Must do this first!
|
defineGlobals(); // Must do this first!
|
||||||
|
|
||||||
bool cheatAttempt = false;
|
bool cheatAttempt = false;
|
||||||
|
|
Loading…
Reference in New Issue