1 diff -r 9582fcee983b -r c1502459a920 src/engine/e_engine.c
2 --- a/src/engine/e_engine.c Sun Feb 01 20:50:22 2009 +0100
3 +++ b/src/engine/e_engine.c Sun Feb 01 21:37:17 2009 +0100
7 /* 2) use data-dir in PWD if present */
8 - if(fs_is_dir("data"))
9 + /* test subdir "/mapres" to reject unrelated "data" dir in PWD */
10 + if(fs_is_dir("data/mapres"))
12 strcpy(datadir, "data");
16 /* 3) use compiled-in data-dir if present */
17 - if (fs_is_dir(DATA_DIR))
18 + if (fs_is_dir(DATA_DIR "/mapres"))
20 strcpy(datadir, DATA_DIR);
23 /* 5) check for all default locations */
25 const char *sdirs[] = {
26 - "/usr/share/teeworlds",
27 - "/usr/local/share/teeworlds"
29 + "/usr/share/teeworlds/data",
30 + "/usr/share/games/teeworlds/data",
31 + "/usr/local/share/teeworlds/data",
32 + "/usr/local/share/games/teeworlds/data",
33 + "/opt/teeworlds/data"
35 const int sdirs_count = sizeof(sdirs) / sizeof(sdirs[0]);