Procházet zdrojové kódy

fix(cmw): apply config changes to the game's own config copy (#5174)

The Linux Chivalry: Medieval Warfare server copies the LinuxGSM managed
PCServer-UDKGame.ini to
~/.local/share/TornBanner/Chivalry/UDKGame/Config/<instance>/ on its
first start and only reads that copy afterwards, so later edits to the
LinuxGSM config were ignored.

fix_cmw.sh now copies the LinuxGSM config over the game's copy before
start when the LinuxGSM config is newer. Settings the game saves itself
are kept until the LinuxGSM config is edited again.
Daniel Gibbs před 1 dnem
rodič
revize
546a02fdef
1 změnil soubory, kde provedl 8 přidání a 0 odebrání
  1. 8 0
      lgsm/modules/fix_cmw.sh

+ 8 - 0
lgsm/modules/fix_cmw.sh

@@ -23,3 +23,11 @@ if [ ! -f "${servercfgfullpath}" ]; then
 	cp "${systemdir}/UDKGame/Config/"*.ini "${servercfgdir}"
 	fn_fix_msg_end
 fi
+
+cmwuserconfig="${HOME}/.local/share/TornBanner/Chivalry/UDKGame/Config/${selfname}/${servercfg}"
+if [ -f "${servercfgfullpath}" ] && [ -f "${cmwuserconfig}" ] && [ "${servercfgfullpath}" -nt "${cmwuserconfig}" ]; then
+	fixname="sync config"
+	fn_fix_msg_start
+	cp -f "${servercfgfullpath}" "${cmwuserconfig}"
+	fn_fix_msg_end
+fi