@@ -16,7 +16,10 @@ pub fn setup_world_system(mut client: ResMut<RenetClient>) {
16
16
17
17
batched_positions. for_each ( |batch| {
18
18
let request_positions = batch. to_vec ( ) ;
19
- info ! ( "Sending chunk batch request for {:?}" , request_positions. len( ) ) ;
19
+ info ! (
20
+ "Sending chunk batch request for {:?}" ,
21
+ request_positions. len( )
22
+ ) ;
20
23
let message = bincode:: serialize ( & NetworkingMessage :: ChunkBatchRequest ( request_positions) ) ;
21
24
client. send_message ( DefaultChannel :: ReliableUnordered , message. unwrap ( ) ) ;
22
25
} ) ;
@@ -34,7 +37,10 @@ pub fn handle_chunk_mesh_update_events(
34
37
texture_manager : ResMut < terrain_util:: TextureManager > ,
35
38
) {
36
39
for event in chunk_mesh_update_events. read ( ) {
37
- info ! ( "Received chunk mesh update event for chunk {:?}" , event. position) ;
40
+ info ! (
41
+ "Received chunk mesh update event for chunk {:?}" ,
42
+ event. position
43
+ ) ;
38
44
let chunk_option = chunk_manager. get_chunk ( event. position ) ;
39
45
match chunk_option {
40
46
Some ( chunk) => {
@@ -119,18 +125,18 @@ fn spawn_chunk(
119
125
) ;
120
126
121
127
commands. spawn ( (
122
- MaterialMeshBundle {
123
- mesh : meshes. add ( mesh) ,
124
- transform,
125
- material,
126
- ..default ( )
127
- } ,
128
- terrain_components:: ChunkMesh {
129
- key : [
130
- chunk. position . x as i32 ,
131
- chunk. position . y as i32 ,
132
- chunk. position . z as i32 ,
133
- ] ,
134
- } ,
128
+ MaterialMeshBundle {
129
+ mesh : meshes. add ( mesh) ,
130
+ transform,
131
+ material,
132
+ ..default ( )
133
+ } ,
134
+ terrain_components:: ChunkMesh {
135
+ key : [
136
+ chunk. position . x as i32 ,
137
+ chunk. position . y as i32 ,
138
+ chunk. position . z as i32 ,
139
+ ] ,
140
+ } ,
135
141
) ) ;
136
142
}
0 commit comments