File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -264,7 +264,7 @@ impl Module for EntityStateSyncModule {
264
264
& Position ,
265
265
& Yaw ,
266
266
& Pitch ,
267
- & ConnectionId ,
267
+ ? & ConnectionId ,
268
268
)
269
269
. multi_threaded ( )
270
270
. kind :: < flecs:: pipeline:: OnStore > ( )
@@ -274,7 +274,7 @@ impl Module for EntityStateSyncModule {
274
274
let run = || {
275
275
let entity_id = VarInt ( entity. minecraft_id ( ) ) ;
276
276
277
- let io = * io ;
277
+ let io = io . copied ( ) ;
278
278
279
279
let world = entity. world ( ) ;
280
280
Original file line number Diff line number Diff line change @@ -391,12 +391,14 @@ impl<P> Broadcast<'_, P> {
391
391
}
392
392
393
393
/// Exclude a certain player from the broadcast. This can only be called once.
394
- pub fn exclude ( self , exclude : ConnectionId ) -> Self {
394
+ pub fn exclude ( self , exclude : impl Into < Option < ConnectionId > > ) -> Self {
395
+ let exclude = exclude. into ( ) ;
396
+ let exclude = exclude. map ( |id| id. stream_id ) . unwrap_or_default ( ) ;
395
397
Broadcast {
396
398
packet : self . packet ,
397
399
compose : self . compose ,
398
400
system_id : self . system_id ,
399
- exclude : exclude . stream_id ,
401
+ exclude,
400
402
}
401
403
}
402
404
}
You can’t perform that action at this time.
0 commit comments