Start local server by adding `Started` component

copygirl 1 month ago
parent e27d98b5e9
commit 85df49f5a3
  1. 8
      common/src/network/server.rs

@ -32,9 +32,11 @@ pub struct StartLocalServerCommand;
impl Command for StartLocalServerCommand {
fn apply(self, world: &mut World) {
world
.spawn((Server::default(), Name::from("Server"), RawServer))
.trigger(|entity| Start { entity });
world.spawn((
Server::default(),
Name::from("LocalServer"),
Started, // yeah it's started, alright
));
}
}

Loading…
Cancel
Save