From 6db16dce893ff8dc7cf0e458373d430e92939a2e Mon Sep 17 00:00:00 2001 From: lenosisnickerboa Date: Sat, 7 May 2022 21:47:31 +0200 Subject: [PATCH] Added support for sv_game_mode_flags --- src/csgosl.tcl | 45 ++++++++++++++++++++++-------------------- src/page_run.tcl | 4 ++-- src/server_support.tcl | 5 +++-- src/version.tcl | 2 +- 4 files changed, 30 insertions(+), 26 deletions(-) diff --git a/src/csgosl.tcl b/src/csgosl.tcl index b74439e..1c09756 100755 --- a/src/csgosl.tcl +++ b/src/csgosl.tcl @@ -574,27 +574,30 @@ ValidateMapGroupsMapper ## Run config # Can deal with at most one space in name, see RunGameModeTypeChanged variable gameModeMapper [dict create \ - "Classic Casual" [dict create type 0 mode 0 skirmish 0] \ - "Classic Competitive" [dict create type 0 mode 1 skirmish 0] \ - "Wingman" [dict create type 0 mode 2 skirmish 0] \ - "Weapon Expert" [dict create type 0 mode 3 skirmish 0] \ - "Armsrace" [dict create type 1 mode 0 skirmish 0] \ - "Demolition" [dict create type 1 mode 1 skirmish 0] \ - "Deathmatch" [dict create type 1 mode 2 skirmish 0] \ - "Training" [dict create type 2 mode 0 skirmish 0] \ - "Custom" [dict create type 3 mode 0 skirmish 0] \ - "Cooperative" [dict create type 4 mode 0 skirmish 0] \ - "Cooperative Guardian" [dict create type 4 mode 0 skirmish 0] \ - "Cooperative Strike" [dict create type 4 mode 1 skirmish 0] \ - "Danger Zone" [dict create type 6 mode 0 skirmish 0] \ - "Skirmish-Stab-Stab-Zap" [dict create type 5 mode 0 skirmish 1] \ - "Skirmish-Free-For-All" [dict create type 5 mode 0 skirmish 2] \ - "Skirmish-Flying-Scoutsman" [dict create type 5 mode 0 skirmish 3] \ - "Skirmish-Trigger-Discipline" [dict create type 5 mode 0 skirmish 4] \ - "Skirmish-Boom!-Headshot!" [dict create type 5 mode 0 skirmish 6] \ - "Skirmish-Hunter-Gatherers" [dict create type 5 mode 0 skirmish 7] \ - "Skirmish-Heavy-Assault-Suit" [dict create type 5 mode 0 skirmish 8] \ - "Skirmish-Retakes" [dict create type 5 mode 0 skirmish 12]] + "Classic Casual" [dict create type 0 mode 0 flags 0 skirmish 0] \ + "Classic Competitive" [dict create type 0 mode 1 flags 0 skirmish 0] \ + "Classic Competitive Short" [dict create type 0 mode 1 flags 32 skirmish 0] \ + "Wingman" [dict create type 0 mode 2 flags 0 skirmish 0] \ + "Weapon Expert" [dict create type 0 mode 3 flags 0 skirmish 0] \ + "Armsrace" [dict create type 1 mode 0 flags 0 skirmish 0] \ + "Demolition" [dict create type 1 mode 1 flags 0 skirmish 0] \ + "Deathmatch" [dict create type 1 mode 2 flags 0 skirmish 0] \ + "Deathmatch Team vs Team" [dict create type 1 mode 2 flags 4 skirmish 0] \ + "Deathmatch Free For All" [dict create type 1 mode 2 flags 32 skirmish 0] \ + "Training" [dict create type 2 mode 0 flags 0 skirmish 0] \ + "Custom" [dict create type 3 mode 0 flags 0 skirmish 0] \ + "Cooperative" [dict create type 4 mode 0 flags 0 skirmish 0] \ + "Cooperative Guardian" [dict create type 4 mode 0 flags 0 skirmish 0] \ + "Cooperative Strike" [dict create type 4 mode 1 flags 0 skirmish 0] \ + "Danger Zone" [dict create type 6 mode 0 flags 0 skirmish 0] \ + "Skirmish-Stab-Stab-Zap" [dict create type 5 mode 0 flags 0 skirmish 1] \ + "Skirmish-Free-For-All" [dict create type 5 mode 0 flags 0 skirmish 2] \ + "Skirmish-Flying-Scoutsman" [dict create type 5 mode 0 flags 0 skirmish 3] \ + "Skirmish-Trigger-Discipline" [dict create type 5 mode 0 flags 0 skirmish 4] \ + "Skirmish-Boom!-Headshot!" [dict create type 5 mode 0 flags 0 skirmish 6] \ + "Skirmish-Hunter-Gatherers" [dict create type 5 mode 0 flags 0 skirmish 7] \ + "Skirmish-Heavy-Assault-Suit" [dict create type 5 mode 0 flags 0 skirmish 8] \ + "Skirmish-Retakes" [dict create type 5 mode 0 flags 0 skirmish 12]] variable botSkillMapper [dict create \ "Easy" 0 \ diff --git a/src/page_run.tcl b/src/page_run.tcl index cf15992..faf0e70 100755 --- a/src/page_run.tcl +++ b/src/page_run.tcl @@ -111,8 +111,8 @@ variable runLayout [CreateLayout \ ] \ ] -proc RunGameModeTypeChanged { value1 {value2 ""}} { - set value [string trim "$value1 $value2"] +proc RunGameModeTypeChanged { value1 {value2 ""} {value3 ""} {value4 ""} {value5 ""} {value6 ""} {value7 ""} {value8 ""} {value9 ""}} { + set value [string trim "$value1 $value2 $value3 $value4 $value5 $value6 $value7 $value8 $value9"] UpdateRunPage return "$value" } diff --git a/src/server_support.tcl b/src/server_support.tcl index cd47430..ccaa504 100755 --- a/src/server_support.tcl +++ b/src/server_support.tcl @@ -154,6 +154,7 @@ proc GetStartServerCommand {} { set gameModeType [dict get $gameModeMapper "$gameModeTypeString"] set gameType [dict get $gameModeType type] set gameMode [dict get $gameModeType mode] + set gameModeFlags [dict get $gameModeType flags] set skirmish [dict get $gameModeType skirmish] set players [GetConfigValue $runConfig players] @@ -226,7 +227,7 @@ proc GetStartServerCommand {} { if { $currentOs == "windows" } { return "\"[file nativename $serverFolder/$srcdsName]\" \ -game csgo $consoleCommand $rconCommand \ - +game_type $gameType +game_mode $gameMode +sv_skirmish_id $skirmish \ + +game_type $gameType +game_mode $gameMode +sv_game_mode_flags $gameModeFlags +sv_skirmish_id $skirmish \ $mapGroupOption \ $mapOption \ $steamAccountOption $apiAuthKeyOption \ @@ -241,7 +242,7 @@ proc GetStartServerCommand {} { } else { return "\"$serverFolder/$srcdsName\" \ -game csgo $consoleCommand $rconCommand \ - +game_type $gameType +game_mode $gameMode +sv_skirmish_id $skirmish \ + +game_type $gameType +game_mode $gameMode +sv_game_mode_flags $gameModeFlags +sv_skirmish_id $skirmish \ $mapGroupOption \ $mapOption \ $steamAccountOption $apiAuthKeyOption \ diff --git a/src/version.tcl b/src/version.tcl index 52b9ad7..9d3c84c 100755 --- a/src/version.tcl +++ b/src/version.tcl @@ -3,4 +3,4 @@ # The next line is executed by /bin/sh, but not tcl \ exec wish "$0" ${1+"$@"} -set version "2.11" +set version "2.12"