Start local server by adding `(Linked, Started)`

main
copygirl 1 month ago
parent ebd3c009fa
commit 058ed952fc
  1. 9
      common/src/network/server.rs

@ -32,9 +32,12 @@ 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"),
// NOTE: Inserting both makes the local-only server act properly.
(Linked, Started), // yeah it's started, alright
));
}
}

Loading…
Cancel
Save