mirror of
https://github.com/IntQuant/noita_entangled_worlds.git
synced 2025-10-19 15:13:16 +00:00
Don't send PlayerColor to myself.
This commit is contained in:
parent
dc5b279253
commit
da5f767623
1 changed files with 10 additions and 8 deletions
|
@ -286,6 +286,7 @@ impl NetManager {
|
||||||
}
|
}
|
||||||
if id != self.peer.my_id() {
|
if id != self.peer.my_id() {
|
||||||
// Create temporary appearance files for new player.
|
// Create temporary appearance files for new player.
|
||||||
|
info!("Created temporary appearance for {id}");
|
||||||
create_player_png(
|
create_player_png(
|
||||||
id,
|
id,
|
||||||
&self.init_settings.mod_path,
|
&self.init_settings.mod_path,
|
||||||
|
@ -293,16 +294,17 @@ impl NetManager {
|
||||||
&PlayerPngDesc::default(),
|
&PlayerPngDesc::default(),
|
||||||
self.is_host(),
|
self.is_host(),
|
||||||
);
|
);
|
||||||
|
info!("Sending PlayerColor to {id}");
|
||||||
|
self.send(
|
||||||
|
id,
|
||||||
|
&NetMsg::PlayerColor(
|
||||||
|
self.init_settings.player_png_desc,
|
||||||
|
self.is_host(),
|
||||||
|
),
|
||||||
|
Reliability::Reliable,
|
||||||
|
);
|
||||||
}
|
}
|
||||||
state.try_ws_write(ws_encode_proxy("join", id.as_hex()));
|
state.try_ws_write(ws_encode_proxy("join", id.as_hex()));
|
||||||
self.send(
|
|
||||||
id,
|
|
||||||
&NetMsg::PlayerColor(
|
|
||||||
self.init_settings.player_png_desc,
|
|
||||||
self.is_host(),
|
|
||||||
),
|
|
||||||
Reliability::Reliable,
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
omni::OmniNetworkEvent::PeerDisconnected(id) => {
|
omni::OmniNetworkEvent::PeerDisconnected(id) => {
|
||||||
state.try_ws_write(ws_encode_proxy("leave", id.as_hex()));
|
state.try_ws_write(ws_encode_proxy("leave", id.as_hex()));
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue