mirror of
https://github.com/IntQuant/noita_entangled_worlds.git
synced 2025-10-19 07:03:16 +00:00
Automated commit: v0.16.1
This commit is contained in:
parent
c83b23527c
commit
e91f647c4e
6 changed files with 17 additions and 5 deletions
3
Justfile
3
Justfile
|
@ -16,6 +16,9 @@ build:
|
|||
run-rel: add_dylib_release
|
||||
cd noita-proxy && NP_APPID=480 NP_SKIP_MOD_CHECK=1 cargo run --release
|
||||
|
||||
run-rel-alt: add_dylib_release
|
||||
cd noita-proxy && NP_SKIP_MOD_CHECK=1 cargo run --release
|
||||
|
||||
flamegraph: add_dylib_debug
|
||||
cd noita-proxy && NP_APPID=480 NP_SKIP_MOD_CHECK=1 cargo flamegraph
|
||||
|
||||
|
|
2
noita-proxy/Cargo.lock
generated
2
noita-proxy/Cargo.lock
generated
|
@ -1997,7 +1997,7 @@ checksum = "2bf50223579dc7cdcfb3bfcacf7069ff68243f8c363f62ffa99cf000a6b9c451"
|
|||
|
||||
[[package]]
|
||||
name = "noita-proxy"
|
||||
version = "0.16.0"
|
||||
version = "0.16.1"
|
||||
dependencies = [
|
||||
"argh",
|
||||
"bincode",
|
||||
|
|
|
@ -5,7 +5,7 @@ resolver = "2"
|
|||
[package]
|
||||
name = "noita-proxy"
|
||||
description = "Noita Entangled Worlds companion app."
|
||||
version = "0.16.0"
|
||||
version = "0.16.1"
|
||||
edition = "2021"
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
|
|
@ -169,10 +169,12 @@ impl NetManager {
|
|||
thread::sleep(Duration::from_millis(100));
|
||||
}
|
||||
|
||||
let is_host = self.is_host();
|
||||
info!("Is host: {is_host}");
|
||||
let mut state = NetInnerState {
|
||||
ws: None,
|
||||
world: WorldManager::new(
|
||||
self.is_host(),
|
||||
is_host,
|
||||
self.peer.my_id().unwrap(),
|
||||
self.init_settings.save_state.clone(),
|
||||
),
|
||||
|
@ -416,7 +418,7 @@ impl NetManager {
|
|||
}
|
||||
|
||||
fn is_host(&self) -> bool {
|
||||
self.peer.my_id() == Some(self.peer.host_id())
|
||||
self.peer.is_host()
|
||||
}
|
||||
|
||||
pub(crate) fn handle_message_to_proxy(&self, msg: &[u8], state: &mut NetInnerState) {
|
||||
|
|
|
@ -154,6 +154,9 @@ impl PeerVariant {
|
|||
}
|
||||
|
||||
pub fn is_host(&self) -> bool {
|
||||
Some(self.host_id()) == self.my_id()
|
||||
match self {
|
||||
PeerVariant::Tangled(_) => Some(self.host_id()) == self.my_id(),
|
||||
PeerVariant::Steam(p) => p.is_host(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -532,6 +532,10 @@ impl SteamPeer {
|
|||
pub fn state(&self) -> ExtraPeerState {
|
||||
self.inner.lock().unwrap().state
|
||||
}
|
||||
|
||||
pub fn is_host(&self) -> bool {
|
||||
self.is_host
|
||||
}
|
||||
}
|
||||
|
||||
fn make_callbacks(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue