mirror of
https://github.com/horizon-rust/horizon.git
synced 2026-11-12 13:03:44 -10:00
Main builds again: a splitscreen share has the device tracker's fields, the stew particles reach served players
#3727's Audio::share predates #4527's device tracking fields, and #4515's stew particles call lan_send_particles with #4761's old arguments. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
a1d4937336
commit
f80c0360d3
2 files changed
+23
-1
No files matched your search
@@ -1074,6 +1074,15 @@ impl Audio {
|
||||
heard: Default::default(),
|
||||
stopped: Default::default(),
|
||||
preview: Default::default(),
|
||||
// The device belongs to the first player's output, which looks after it.
|
||||
#[cfg(feature = "audio")]
|
||||
default_seen: self.default_seen.clone(),
|
||||
#[cfg(feature = "audio")]
|
||||
cards_seen: self.cards_seen.clone(),
|
||||
#[cfg(feature = "audio")]
|
||||
devices_seen: self.devices_seen.clone(),
|
||||
#[cfg(feature = "audio")]
|
||||
device_ticks: 0,
|
||||
}
|
||||
}
|
||||
/// Sync the volume options, refreshing the categories that changed
|
||||
@@ -1098,6 +1107,11 @@ impl Audio {
|
||||
/// at once a second.
|
||||
#[cfg(feature = "audio")]
|
||||
fn should_change_device(&mut self) -> bool {
|
||||
// A splitscreen share plays through the first player's output: it leaves the device,
|
||||
// and the mixer's lost flag, to that output.
|
||||
if self.backend.owner != 0 {
|
||||
return false;
|
||||
}
|
||||
let (current, lost) = match self.backend.mixer.lock() {
|
||||
Ok(mut m) => (m.device_name.clone(), std::mem::take(&mut m.device_lost)),
|
||||
Err(_) => return false,
|
||||
|
||||
@@ -4902,7 +4902,15 @@ impl Game<'_> {
|
||||
// ALTERNATIVE_WITH_SPEED with a per-axis maximum speed.
|
||||
self.particles
|
||||
.send_particles(&options, at, spread, 0.2, count);
|
||||
self.lan_send_particles(&options, at, spread, 0.2, count);
|
||||
self.lan_send_particles(super::lan_particles::QueuedParticle {
|
||||
dimension: self.dim.id(),
|
||||
options,
|
||||
state: None,
|
||||
at,
|
||||
spread,
|
||||
speed: 0.2,
|
||||
count: count as i32,
|
||||
});
|
||||
}
|
||||
// PlayerInteractTrigger: the item used on the mob, once the interaction took.
|
||||
if let Some(stack) = &held {
|
||||
|
||||
Reference in new issue
Block a user