Add kwadroke's maplist generator for FTEQW
This commit is contained in:
parent
6f518a513a
commit
29d020e15d
|
@ -47,27 +47,37 @@ cd ${TMPDIR:-/tmp}/progs/fteqw/quakec/basemod
|
||||||
/opt/fteqw/fteqcc64
|
/opt/fteqw/fteqcc64
|
||||||
cp qwprogs.dat /opt/fteqw/lq1
|
cp qwprogs.dat /opt/fteqw/lq1
|
||||||
cd -
|
cd -
|
||||||
|
rm -rf ${TMPDIR:-/tmp}/progs
|
||||||
|
|
||||||
|
if [ -e /opt/fteqw/lq1/maplist.cfg ]; then
|
||||||
|
## Delete the current maplist.cfg file so that there is not double (or more) entries
|
||||||
|
rm /opt/fteqw/lq1/maplist.cfg
|
||||||
|
fi
|
||||||
|
|
||||||
|
## Generate the map list
|
||||||
|
cd /opt/fteqw/lq1/maps
|
||||||
|
declare -a mapfiles=(lqdm*.bsp)
|
||||||
|
for (( i = 0; i < ${#mapfiles[*]}; ++ i )); do
|
||||||
|
## Need to remove the .bsp from map name
|
||||||
|
echo serverinfo \"$(basename --suffix=.bsp "${mapfiles[$i-1]}")\" \"$(basename --suffix=.bsp "${mapfiles[$i]}")\" >> /opt/fteqw/lq1/maplist.cfg
|
||||||
|
done
|
||||||
|
cd -
|
||||||
|
|
||||||
# Configuration based on https://gist.github.com/kwadroke/fa978290d86a606de3875fa853d79334
|
# Configuration based on https://gist.github.com/kwadroke/fa978290d86a606de3875fa853d79334
|
||||||
cat > /opt/fteqw/lq1/autoexec.cfg <<EOF
|
cat > /opt/fteqw/lq1/autoexec.cfg <<EOF
|
||||||
sv_public "0"
|
sv_public "0"
|
||||||
sv_antilag "2"
|
sv_antilag "2"
|
||||||
sv_nqplayerphysics "0"
|
sv_nqplayerphysics "0"
|
||||||
|
allow_download "1"
|
||||||
maxclients "32"
|
maxclients "32"
|
||||||
sv_motd1 "Welcome to the onFOSS server!"
|
sv_motd1 "Welcome to the onFOSS server!"
|
||||||
admin_password "${systempassword}"
|
admin_password "${systempassword}"
|
||||||
timelimit "10"
|
timelimit "10"
|
||||||
deathmatch "1"
|
deathmatch "1"
|
||||||
fraglimit "20"
|
fraglimit "20"
|
||||||
map "lqdm2_a6"
|
pausable "0"
|
||||||
serverinfo "lqdm2_a6" lqdm3_a3
|
map "$(basename --suffix=.bsp "${mapfiles[0]}")"
|
||||||
serverinfo "lqdm3_a3" "lqdm4_a6"
|
exec maplist.cfg
|
||||||
serverinfo "lqdm4_a6" "lqdm6_a6"
|
|
||||||
serverinfo "lqdm6_a6" "lqdm9_a7"
|
|
||||||
serverinfo "lqdm9_a7" "lqdm10_a3"
|
|
||||||
serverinfo "lqdm10_a3" "lqdm13_a3"
|
|
||||||
serverinfo "lqdm13_a3" "lqdm14_a1"
|
|
||||||
serverinfo "lqdm14_a1" "lqdm2_a6"
|
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
# Create SystemD unit
|
# Create SystemD unit
|
||||||
|
|
Loading…
Reference in New Issue