diff --git a/.cargo/config b/.cargo/config index fd1601755c..d08998512b 100644 --- a/.cargo/config +++ b/.cargo/config @@ -7,7 +7,7 @@ rustflags = [ generate = "run --package tools --" test-server = "-Zpackage-features run --bin veloren-server-cli --no-default-features" tracy-server = "-Zunstable-options -Zpackage-features run --bin veloren-server-cli --no-default-features --features tracy --profile dev" -test-voxygen = "-Zpackage-features run --bin veloren-voxygen --no-default-features --features gl" -tracy-voxygen = "-Zunstable-options -Zpackage-features run --bin veloren-voxygen --no-default-features --features tracy,gl --profile dev" +test-voxygen = "-Zpackage-features run --bin veloren-voxygen --no-default-features --features gl,simd" +tracy-voxygen = "-Zunstable-options -Zpackage-features run --bin veloren-voxygen --no-default-features --features tracy,gl,simd --profile dev" server = "run --bin veloren-server-cli" diff --git a/server/src/sys/subscription.rs b/server/src/sys/subscription.rs index b1fa4e4d71..1c9be91e09 100644 --- a/server/src/sys/subscription.rs +++ b/server/src/sys/subscription.rs @@ -242,6 +242,8 @@ pub fn initialize_region_subscription(world: &World, entity: specs::Entity) { &world.entities(), ) .join() + // Don't send client its own components because we do that below + .filter(|t| t.4 != entity) { // Send message to create entity and tracked components and physics components client.send_fallible(ServerGeneral::CreateEntity( @@ -255,6 +257,16 @@ pub fn initialize_region_subscription(world: &World, entity: specs::Entity) { } } } + // If client position was modified it might not be updated in the region system + // so we send its components here + client.send_fallible(ServerGeneral::CreateEntity( + tracked_comps.create_entity_package( + entity, + Some(*client_pos), + world.read_storage().get(entity).copied(), + world.read_storage().get(entity).copied(), + ), + )); if let Err(e) = world.write_storage().insert(entity, RegionSubscription { fuzzy_chunk,