From 19f978e33032d71d76fa5d6d138707334ba78c89 Mon Sep 17 00:00:00 2001 From: UltimateByte Date: Sun, 6 Mar 2016 23:42:39 +0100 Subject: [PATCH 1/6] corrected check for fn_parms --- functions/command_details.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/functions/command_details.sh b/functions/command_details.sh index 32965eb2e..396cf487c 100644 --- a/functions/command_details.sh +++ b/functions/command_details.sh @@ -636,12 +636,11 @@ fn_details_disk fn_details_gameserver fn_details_backup # Some game servers do not have parms. -if [ "${gamename}" != "Teamspeak 3" ]||[ "${engine}" != "avalanche" ]||[ "${engine}" != "dontstarve" ]||[ "${engine}" != "projectzomboid" ]; then +if [ "${gamename}" != "Teamspeak 3" ]&&[ "${engine}" != "avalanche" ]&&[ "${engine}" != "dontstarve" ]&&[ "${engine}" != "projectzomboid" ]; then fn_parms fn_details_commandlineparms fi - # Display details depending on game or engine. if [ "${engine}" == "avalanche" ]; then fn_details_avalanche From a00cda5cb55b700099e5c54faca28c912e20d485 Mon Sep 17 00:00:00 2001 From: UltimateByte Date: Tue, 8 Mar 2016 22:25:00 +0100 Subject: [PATCH 2/6] Put back physiterations to 4, true default value I checked the default value, it's 4, not 2. A value of 2 is causing issue with physics while running complex builds' physics, a value of 4 fixes it. To check the default value, input gmod_physiterations into your gmod console gmod_physiterations "gmod_physiterations" = "2" (def. 4) --- GarrysMod/cfg/lgsm-default.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/GarrysMod/cfg/lgsm-default.cfg b/GarrysMod/cfg/lgsm-default.cfg index 2e61eb6a2..a1e2fd4d6 100644 --- a/GarrysMod/cfg/lgsm-default.cfg +++ b/GarrysMod/cfg/lgsm-default.cfg @@ -38,7 +38,7 @@ sv_allow_wait_command 0 sv_allow_voice_from_file 0 sv_turbophysics 0 sv_max_usercmd_future_ticks 12 -gmod_physiterations 2 +gmod_physiterations 4 sv_client_min_interp_ratio 1 sv_client_max_interp_ratio 2 think_limit 20 From b4d7c03b691f7ce5a6dca7d1d46162b4bc4c3136 Mon Sep 17 00:00:00 2001 From: UltimateByte Date: Sun, 13 Mar 2016 05:40:24 +0100 Subject: [PATCH 3/6] Gmod tickrate and fix for many maps Fixes https://github.com/dgibbs64/linuxgsm/issues/685 Tickrate needs to be lowered in order to be able to handle a large amount of players. Default tickrate is 66.66, but the -tickrate commnand will round numbers to the lower integer. So i'll default at 66 and not -the more accurate- 67 to not worry anyone with a "non standard" value. For the +r_hunkalloclightmaps 0, it fixes the hunk overflow crash on server startup when using maps with too much lights (and there are a lot of them). It changes the way lights are stored in RAM, the 0 mode (default one a few years ago, and still default one on clients) can handle a way larger amount of lights, but a theoretically a bit slower way. I noticed no difference, so it's a good thing to fix it by default. --- GarrysMod/gmodserver | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/GarrysMod/gmodserver b/GarrysMod/gmodserver index 4e62e63a5..e3784c343 100644 --- a/GarrysMod/gmodserver +++ b/GarrysMod/gmodserver @@ -9,7 +9,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="190216" +version="130316" #### Variables #### @@ -35,8 +35,13 @@ port="27015" sourcetvport="27020" clientport="27005" ip="0.0.0.0" +tickrate="66" updateonstart="off" +# Custom Start Parameters +# Default +r_hunkalloclightmaps 0, fixes a start issue on maps with many lights +customparms="+r_hunkalloclightmaps 0" + # Optional: Game Server Login Token # GSLT can be used for running a public server. # More info: http://gameservermanagers.com/gslt @@ -44,7 +49,7 @@ gslt="" # https://developer.valvesoftware.com/wiki/Command_Line_Options#Source_Dedicated_Server fn_parms(){ -parms="-game garrysmod -strictportbind -ip ${ip} -port ${port} +host_workshop_collection ${workshopcollectionid} -authkey ${workshopauth} +clientport ${clientport} +tv_port ${sourcetvport} +gamemode ${gamemode} +map ${defaultmap} +sv_setsteamaccount ${gslt} +servercfgfile ${servercfg} -maxplayers ${maxplayers}" +parms="-game garrysmod -strictportbind -ip ${ip} -port ${port} -tickrate {tickrate} +host_workshop_collection ${workshopcollectionid} -authkey ${workshopauth} +clientport ${clientport} +tv_port ${sourcetvport} +gamemode ${gamemode} +map ${defaultmap} +sv_setsteamaccount ${gslt} +servercfgfile ${servercfg} -maxplayers ${maxplayers} ${customparms}" } #### Advanced Variables #### From 951f9d448fa4296e6b2449a2d7de0ea0b095c83d Mon Sep 17 00:00:00 2001 From: UltimateByte Date: Sun, 13 Mar 2016 05:59:47 +0100 Subject: [PATCH 4/6] matching updater's version checking Should fix the "not installing the latest version" issue. Will test and pull if working. --- functions/install_ts3.sh | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/functions/install_ts3.sh b/functions/install_ts3.sh index 27598ac56..71d27eec3 100644 --- a/functions/install_ts3.sh +++ b/functions/install_ts3.sh @@ -18,11 +18,8 @@ fi # Grabs all version numbers but not in correct order wget "http://dl.4players.de/ts/releases/?C=M;O=D" -q -O -| grep -i dir | egrep -o '.*\/<\/a>' | egrep -o '[0-9\.?]+'|uniq > .ts3_version_numbers_unsorted.tmp -# Replaces dots with spaces to split up the number. e.g 3 0 12 1 is 3.0.12.1 this allows correct sorting - cat .ts3_version_numbers_unsorted.tmp | tr "." " " > .ts3_version_numbers_digit.tmp -# Sorts versions in to correct order -# merges 2 files and orders by each column in order allowing these version numbers to be sorted in order -paste .ts3_version_numbers_digit.tmp .ts3_version_numbers_unsorted.tmp | awk '{print $1,$2,$3,$4 " " $0;}'| sort -k1rn -k2rn -k3rn -k4rn | awk '{print $NF}' > .ts3_version_numbers.tmp +# Sort version numbers +cat .ts3_version_numbers_unsorted.tmp | sort -r --version-sort -o .ts3_version_numbers_sorted.tmp # Finds directory with most recent server version. while read ts3_version_number; do @@ -32,18 +29,19 @@ while read ts3_version_number; do # Break while-loop, if the latest release could be found break fi -done < .ts3_version_numbers.tmp +done < .ts3_version_numbers_sorted.tmp -# tidy up -rm -f ".ts3_version_numbers_digit.tmp" +# Tidy up rm -f ".ts3_version_numbers_unsorted.tmp" -rm -f ".ts3_version_numbers.tmp" +rm -f ".ts3_version_numbers_sorted.tmp" # Checks availablebuild info is available if [ -z "${availablebuild}" ]; then fn_printfail "Checking for update: teamspeak.com" + fn_scriptlog "Checking for update: teamspeak.com" sleep 1 fn_printfail "Checking for update: teamspeak.com: Not returning version info" + fn_scriptlog "Failure! Checking for update: teamspeak.com: Not returning version info" sleep 2 exit 1 fi From 95afe04aeab0de88c1b8de910e34c32dfa394081 Mon Sep 17 00:00:00 2001 From: UltimateByte Date: Sun, 13 Mar 2016 07:17:00 +0100 Subject: [PATCH 5/6] fix error with"UNKNOWN" value instead of digit If the server (such as TS3) doesn't required glibc, the glibc needed version is UNKNOWN. That was breaking the command as it expected an numeric value. See https://github.com/dgibbs64/linuxgsm/blob/master/functions/info_glibc.sh#L63 to understand. --- functions/command_details.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/functions/command_details.sh b/functions/command_details.sh index 396cf487c..a37024a3b 100644 --- a/functions/command_details.sh +++ b/functions/command_details.sh @@ -145,7 +145,7 @@ printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' = echo -e "\e[34mUser:\t\e[0m$(whoami)" # GLIBC required - if [ -n "${glibcrequired}" ]; then + if [ -n "${glibcrequired}" ] && [ "${glibcrequired}" != "UNKNOWN" ]; then if [ "$(ldd --version | sed -n '1 p' | tr -cd '[:digit:]' | tail -c 3)" -lt "$(echo "${glibcrequired}" | sed -n '1 p' | tr -cd '[:digit:]' | tail -c 3)" ]; then if [ "${glibcfix}" == "yes" ]; then echo -e "\e[34mGLIBC required:\t\e[0;31m${glibcrequired} \e[0m(\e[0;32mUsing GLIBC fix\e[0m)" From 6a8ba9b6af3cc6db439cba93b3bdb68c3bae0881 Mon Sep 17 00:00:00 2001 From: UltimateByte Date: Tue, 15 Mar 2016 04:22:26 +0100 Subject: [PATCH 6/6] Rust Game/Query port is tcp&udp --- functions/command_details.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/functions/command_details.sh b/functions/command_details.sh index a37024a3b..4a481bc02 100644 --- a/functions/command_details.sh +++ b/functions/command_details.sh @@ -549,7 +549,7 @@ echo -e "netstat -atunp | grep Rust" echo -e "" { echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL" - echo -e "> Game/Query\tINBOUND\t${port}\tudp" + echo -e "> Game/Query\tINBOUND\t${port}\ttcp/udp" echo -e "> RCON\tINBOUND\t${rconport}\ttcp" } | column -s $'\t' -t