5 Nexuiz map recompilation script
7 NOTE: to use this script, you need a shell script called q3map2 in your $PATH.
11 exec ~/bin/q3map2.x86 -threads 2 "$@"
13 Note that you can NOT call q3map2.x86 directly from $PATH, as it segfaults
21 settings_default="-samplesize 8::-deluxe -patchshadows -samples 3"
22 settings_farewell="-samplesize 8 -patchmeta::-deluxe -patchshadows -samples 3"
30 # note: you are in data/maps. Removintg these two components...
33 q3map2 -fs_basepath "$dir" -fs_game data -v "$@"
39 # get settings for this map
40 eval s=\$settings_$MAP
41 [ -n "$s" ] || s=$settings_default
42 eval scale=\$scale_$MAP
45 if [ -n "$scale" ]; then
46 if ! grep "_keeplights" "$MAP.map" >/dev/null; then
47 echo "$MAP does not have _keeplights in worldspawn!"
51 map2 -bsp -meta `echo "$s" | cut -d : -f 1` "$MAP.map" | tee "$MAP.log"
52 if [ -n "$scale" ]; then
53 map2 -scale "$scale" "$MAP.bsp"
54 mv "${MAP}_s.bsp" "$MAP.bsp"
56 map2 -vis `echo "$s" | cut -d : -f 2` "$MAP.map" | tee -a "$MAP.log"
57 map2 -light `echo "$s" | cut -d : -f 3` "$MAP.map" | tee -a "$MAP.log"