+# Xonotic Helpers
+
+_check_xonotic_dir() {
+ local xon_dir=$1
+ if [[ ! -d ${xon_dir} ]]; then
+ echo "[ ERROR ] Unable to locate Xonotic"; exit 1
+ fi
+}
+
+_get_xonotic_dir() {
+ relative_dir=$(dirname $0)/../..
+ _check_xonotic_dir ${relative_dir}
+ export XONOTIC_DIR=$(cd ${relative_dir}; pwd)
+}
+
+_kill_xonotic() {
+ pkill -f "\-simsound \-sessionid xonotic_${SCRIPT_NAME}_"
+}
+