@@ -6,7 +6,7 @@ use feather_core::network::packets::{
66use feather_core:: network:: Packet ;
77use feather_core:: util:: Position ;
88use feather_server_types:: {
9- EntityClientRemoveEvent , EntityId , EntitySendEvent , Game , LastKnownPositions , Network ,
9+ EntityClientRemoveEvent , EntitySendEvent , Game , LastKnownPositions , Network , NetworkId ,
1010 PreviousPosition , PreviousVelocity , Velocity ,
1111} ;
1212use feather_server_util:: { calculate_relative_move, degrees_to_stops, protocol_velocity} ;
@@ -17,7 +17,7 @@ use std::ops::Deref;
1717/// System to broadcast when an entity moves.
1818#[ fecs:: system]
1919pub fn broadcast_movement ( game : & mut Game , world : & mut World ) {
20- <( Read < Position > , Read < PreviousPosition > , Read < EntityId > ) >:: query ( ) . par_entities_for_each (
20+ <( Read < Position > , Read < PreviousPosition > , Read < NetworkId > ) >:: query ( ) . par_entities_for_each (
2121 world. inner ( ) ,
2222 |( entity, ( pos, prev_pos, id) ) | {
2323 let pos: Position = * pos;
@@ -91,7 +91,7 @@ pub fn on_entity_client_remove_update_last_known_positions(
9191/// Broadcasts an entity's velocity.
9292#[ fecs:: system]
9393pub fn broadcast_velocity ( world : & mut World , game : & mut Game ) {
94- <( Read < Velocity > , Read < PreviousVelocity > , Read < EntityId > ) >:: query ( ) . par_entities_for_each (
94+ <( Read < Velocity > , Read < PreviousVelocity > , Read < NetworkId > ) >:: query ( ) . par_entities_for_each (
9595 world. inner ( ) ,
9696 |( entity, ( vel, prev_vel, entity_id) ) | {
9797 let entity_id = entity_id. 0 ;
0 commit comments