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 { impl Command for StartLocalServerCommand {
fn apply(self, world: &mut World) { fn apply(self, world: &mut World) {
world world.spawn((
.spawn((Server::default(), Name::from("Server"), RawServer)) Server::default(),
.trigger(|entity| Start { entity }); Name::from("LocalServer"),
// NOTE: Inserting both makes the local-only server act properly.
(Linked, Started), // yeah it's started, alright
));
} }
} }

Loading…
Cancel
Save