File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -593,21 +593,16 @@ fn write_point_history(
593593 // cursor `Some(0)`.
594594 let base_cursor = first_patch_index. checked_sub ( 1 ) ;
595595 let cursor = Some ( first_patch_index + patches. len ( ) as PatchIndex - 1 ) ;
596- let live_is_base = entity
597- . get :: < DiffReceiver < Points > > ( )
598- . is_some_and ( |receiver| receiver . last_applied ( ) == base_cursor ) ;
596+ // The base must come from a confirmed value in the history: consumers
597+ // like prediction/interpolation may locally mutate the live component,
598+ // so it can never be used as a patch base.
599599 let mut value = entity
600600 . get :: < PointHistory > ( )
601601 . and_then ( |history| {
602602 history. 0 . iter ( ) . rev ( ) . find_map ( |( _, cursor, value) | {
603603 ( * cursor == base_cursor) . then ( || value. clone ( ) )
604604 } )
605605 } )
606- . or_else ( || {
607- live_is_base
608- . then ( || entity. get :: < Points > ( ) . cloned ( ) )
609- . flatten ( )
610- } )
611606 . ok_or_else ( || {
612607 format ! (
613608 "received diff patches for `{}` without a confirmed base" ,
You can’t perform that action at this time.
0 commit comments