Fix creation update

Former-commit-id: 3ad0f4cd3ee8f319229f85f1c0c289be9d4b5bfb
This commit is contained in:
Joshua Barretto 2019-04-16 22:30:56 +01:00
parent 2c650f9cff
commit edcabfa68f
2 changed files with 3 additions and 4 deletions

View File

@ -149,10 +149,11 @@ impl Client {
});
// Step 1
if let (Some(_), Some(vel), Some(_)) = (
if let (Some(_), Some(vel), Some(_), Some(_)) = (
self.state.read_component_cloned::<comp::phys::Pos>(self.player),
self.state.read_component_cloned::<comp::phys::Vel>(self.player),
self.state.read_component_cloned::<comp::phys::Dir>(self.player),
self.state.read_component_cloned::<comp::Character>(self.player),
) {
self.state.write_component(self.player, comp::Control {
move_dir: input.move_dir,

View File

@ -245,8 +245,8 @@ impl Server {
state.write_component(entity, comp::phys::Dir(Vec3::unit_y()));
if let Some(character) = character {
state.write_component(entity, character);
}
state.write_component(entity, comp::phys::ForceUpdate);
client.state = ClientState::Connected;
@ -365,8 +365,6 @@ impl Server {
};
match force_update {
Some(_) => self.clients.notify_connected(msg),
None => self.clients.notify_connected_except(entity, msg),
}