Преглед изворни кода

Changed the xml config for garrys mod, now the map must be introduced by hand, because there is no way to list all available maps, and there is no command line argument to override the +map argument, unlike in CSGO where you can use +workshop_start_map to override +map argument.

DieFeM пре 12 година
родитељ
комит
4a31b223c1

+ 5 - 2
modules/config_games/server_configs/garrysmod.xml

@@ -8,13 +8,11 @@
   <cli_template>%GAME_TYPE% %PID_FILE% %MAP% %IP% %PORT% %PLAYERS%</cli_template>
   <cli_params>
     <cli_param id="PID_FILE" cli_string="-pidfile" options="s" />
-    <cli_param id="MAP" cli_string="+map" options="s" />
     <cli_param id="IP" cli_string="+ip" options="s" />
     <cli_param id="PORT" cli_string="-port" options="s" />
     <cli_param id="PLAYERS" cli_string="+maxplayers" options="s" />
     <cli_param id="GAME_TYPE" cli_string="-game" options="s" />
   </cli_params>
-  <maps_location>mod/maps/</maps_location>
   <max_user_amount>128</max_user_amount>
   <control_protocol>rcon2</control_protocol>
   <mods>
@@ -43,6 +41,11 @@
       <caption>Auto-Update</caption>
       <desc>The server will automatically download official updates as they are released.</desc>
     </param>
+    <param id="MAP" key="+map" type="text">
+      <default>gm_flatgrass</default>
+      <caption>Map</caption>
+      <desc>Set the map the server will start.</desc>
+    </param>
     <param key="+gamemode" type="text">
       <caption>Gamemode</caption>
       <desc>Set the gamemode the server will use.</desc>

+ 5 - 2
modules/config_games/server_configs/garrysmod_win.xml

@@ -8,14 +8,12 @@
   <cli_template>-console %GAME_TYPE% %HOSTNAME% %PID_FILE% %MAP% %IP% %PORT% %PLAYERS% -condebug</cli_template>
   <cli_params>
     <cli_param id="PID_FILE" cli_string="-pidfile" options="s" />
-    <cli_param id="MAP" cli_string="+map" options="s" />
     <cli_param id="IP" cli_string="-ip" options="s" />
     <cli_param id="PORT" cli_string="-port" options="s" />
     <cli_param id="PLAYERS" cli_string="+maxplayers" options="s" />
     <cli_param id="GAME_TYPE" cli_string="-game" options="s" />
 	<cli_param id="HOSTNAME" cli_string="+hostname" options="sq" />
   </cli_params>
-  <maps_location>mod/maps/</maps_location>
   <console_log>garrysmod/console.log</console_log>
   <max_user_amount>128</max_user_amount>
   <control_protocol>rcon2</control_protocol>
@@ -41,6 +39,11 @@
     </text>
   </replace_texts>
   <server_params>
+    <param id="MAP" key="+map" type="text">
+      <default>gm_flatgrass</default>
+      <caption>Map</caption>
+      <desc>Set the map the server will start.</desc>
+    </param>
     <param key="+gamemode" type="text">
       <caption>Gamemode</caption>
       <desc>Set the gamemode the server will use.</desc>