add dedicated port to test server
This commit is contained in:
parent
e056134fa6
commit
f9afdadeb9
1 changed files with 8 additions and 1 deletions
|
|
@ -23,7 +23,12 @@ impl LaunchSpec {
|
||||||
/// The vanilla dedicated-server args to spawn `bots` alive units on `map`, in the exact order the
|
/// The vanilla dedicated-server args to spawn `bots` alive units on `map`, in the exact order the
|
||||||
/// live launch requires.
|
/// live launch requires.
|
||||||
pub fn args(&self, map: &str, bots: u32) -> Vec<String> {
|
pub fn args(&self, map: &str, bots: u32) -> Vec<String> {
|
||||||
let mut a: Vec<String> = vec!["-dedicated".into(), "-insecure".into()];
|
let mut a: Vec<String> = vec![
|
||||||
|
"-dedicated".into(),
|
||||||
|
"-insecure".into(),
|
||||||
|
"-port".into(),
|
||||||
|
"24015".into(),
|
||||||
|
];
|
||||||
for (k, v) in self.pre_map_cvars {
|
for (k, v) in self.pre_map_cvars {
|
||||||
a.push(format!("+{k}"));
|
a.push(format!("+{k}"));
|
||||||
a.push((*v).into());
|
a.push((*v).into());
|
||||||
|
|
@ -338,6 +343,8 @@ mod tests {
|
||||||
let expected: Vec<String> = [
|
let expected: Vec<String> = [
|
||||||
"-dedicated",
|
"-dedicated",
|
||||||
"-insecure",
|
"-insecure",
|
||||||
|
"-port",
|
||||||
|
"24015",
|
||||||
"+game_type",
|
"+game_type",
|
||||||
"1",
|
"1",
|
||||||
"+game_mode",
|
"+game_mode",
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue