mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
register server info system
This commit is contained in:
parent
23003b48df
commit
e8a89b52bc
@ -45,6 +45,7 @@ pub fn add_server_systems(dispatch_builder: &mut DispatcherBuilder) {
|
||||
// don't depend on chunk_serialize, as we assume everything is done in a SlowJow
|
||||
dispatch::<chunk_send::Sys>(dispatch_builder, &[]);
|
||||
dispatch::<item::Sys>(dispatch_builder, &[]);
|
||||
dispatch::<server_info::Sys>(dispatch_builder, &[]);
|
||||
}
|
||||
|
||||
pub fn run_sync_systems(ecs: &mut specs::World) {
|
||||
|
@ -34,6 +34,7 @@ impl<'a> System<'a> for Sys {
|
||||
if let Some(sender) = sender.as_ref()
|
||||
&& tick.0 % INFO_SEND_INTERVAL == 0
|
||||
{
|
||||
tracing::trace!("Updating server info");
|
||||
let count = players.count().try_into().unwrap_or(u16::MAX);
|
||||
if let Err(error) = sender.send(ServerInfo {
|
||||
git_hash: *GIT_HASH,
|
||||
|
Loading…
Reference in New Issue
Block a user