3 # this script is OBSOLETE, use nexuiz-map-compiler
7 # nexuiz-map-compiler * -bsp -samplesize 8 -vis -light -deluxe -patchshadows -samples 3
8 # nexuiz-map-compiler farewell -bsp -samplesize 8 -patchmeta -vis -light -deluxe -patchshadows -samples 3
9 # nexuiz-map-compiler aggressor -scale 1.25 -bsp -samplesize 8 -vis -light -deluxe -patchshadows -samples 3
10 # nexuiz-map-compiler bloodprison -scale 1.25:0.96 -bsp -samplesize 8 -vis -light -deluxe -patchshadows -samples 3
14 Nexuiz map recompilation script
16 NOTE: to use this script, you need a shell script called q3map2 in your $PATH.
20 exec ~/bin/q3map2.x86 -threads 2 "$@"
22 Note that you can NOT call q3map2.x86 directly from $PATH, as it segfaults
30 settings_default="-samplesize 8::-deluxe -patchshadows -samples 3"
31 settings_farewell="-samplesize 8 -patchmeta::-deluxe -patchshadows -samples 3"
40 # note: you are in data/maps. Removintg these two components...
43 q3map2 -fs_basepath "$dir" -fs_game data -v "$@"
49 # get settings for this map
50 eval s=\$settings_$MAP
51 [ -n "$s" ] || s=$settings_default
52 eval scale=\$scale_$MAP
55 if [ -n "$scale" ]; then
56 if ! grep "_keeplights" "$MAP.map" >/dev/null; then
57 echo "$MAP does not have _keeplights in worldspawn!"
61 map2 -bsp -meta `echo "$s" | cut -d : -f 1` "$MAP.map" | tee "$MAP.log"
62 if [ -n "$scale" ]; then
63 map2 -scale "$scale" "$MAP.bsp"
64 mv "${MAP}_s.bsp" "$MAP.bsp"
66 map2 -vis `echo "$s" | cut -d : -f 2` "$MAP.map" | tee -a "$MAP.log"
67 map2 -light `echo "$s" | cut -d : -f 3` "$MAP.map" | tee -a "$MAP.log"