mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Merge branch '190_send_logon_commands' into 'master'
Send commands on client launch, closes #190 Closes #190 See merge request veloren/veloren!333
This commit is contained in:
commit
e45cad65a8
@ -85,6 +85,13 @@ impl PlayState for SessionState {
|
|||||||
let mut clock = Clock::start();
|
let mut clock = Clock::start();
|
||||||
self.client.borrow_mut().clear_terrain();
|
self.client.borrow_mut().clear_terrain();
|
||||||
|
|
||||||
|
// Send startup commands to the server
|
||||||
|
if global_state.settings.send_logon_commands {
|
||||||
|
for cmd in &global_state.settings.logon_commands {
|
||||||
|
self.client.borrow_mut().send_chat(cmd.to_string());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Game loop
|
// Game loop
|
||||||
let mut current_client_state = self.client.borrow().get_client_state();
|
let mut current_client_state = self.client.borrow().get_client_state();
|
||||||
while let ClientState::Pending | ClientState::Character | ClientState::Dead =
|
while let ClientState::Pending | ClientState::Character | ClientState::Dead =
|
||||||
|
@ -176,6 +176,9 @@ pub struct Settings {
|
|||||||
pub graphics: GraphicsSettings,
|
pub graphics: GraphicsSettings,
|
||||||
pub audio: AudioSettings,
|
pub audio: AudioSettings,
|
||||||
pub show_disclaimer: bool,
|
pub show_disclaimer: bool,
|
||||||
|
pub send_logon_commands: bool,
|
||||||
|
// TODO: Remove at a later date, for dev testing
|
||||||
|
pub logon_commands: Vec<String>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Default for Settings {
|
impl Default for Settings {
|
||||||
@ -188,6 +191,8 @@ impl Default for Settings {
|
|||||||
graphics: GraphicsSettings::default(),
|
graphics: GraphicsSettings::default(),
|
||||||
audio: AudioSettings::default(),
|
audio: AudioSettings::default(),
|
||||||
show_disclaimer: true,
|
show_disclaimer: true,
|
||||||
|
send_logon_commands: false,
|
||||||
|
logon_commands: Vec::new(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user