File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -1593,7 +1593,7 @@ impl Client {
15931593 }
15941594 }
15951595 SnapObj :: ClientInfo ( client_info) => {
1596- if let Some ( ( character_id , info) ) = Self :: player_info_mut ( id, base, snapshot) {
1596+ if let Some ( ( _ , info) ) = Self :: player_info_mut ( id, base, snapshot) {
15971597 fn ints_to_net_str < const MAX_LENGTH : usize > (
15981598 int_arr : & [ i32 ] ,
15991599 ) -> NetworkString < MAX_LENGTH > {
@@ -1605,14 +1605,14 @@ impl Client {
16051605 . map ( NetworkString :: new_lossy)
16061606 . unwrap_or_default ( )
16071607 }
1608- let mut player_info = ( * info. player_info ) . clone ( ) ;
16091608
16101609 // Apply as much info from known player info as possible
1611- if character_id == player_id {
1612- player_info = player. player_info . clone ( ) ;
1613- } else if let Some ( dummy) = base. local_players . get ( & id) {
1614- player_info = dummy. player_info . clone ( ) ;
1615- }
1610+ let mut player_info = if let Some ( dummy) = base. local_players . get ( & id) {
1611+ dummy. player_info . clone ( )
1612+ } else {
1613+ // fall back to player info, since legacy servers don't send enough info
1614+ player. player_info . clone ( )
1615+ } ;
16161616
16171617 // Then overwrite the info the server knows about
16181618 player_info. name = ints_to_net_str ( client_info. name . as_slice ( ) ) ;
You can’t perform that action at this time.
0 commit comments