mirror of
https://github.com/horizon-rust/horizon.git
synced 2026-11-07 11:06:11 -10:00
Entity-bound sounds follow the dragon itself; ledger rows for #9382
A sound bound to the Ender Dragon read the copy spawn_entity keeps in mobs, which move_entity never moves, so it stayed at the spawn point. The live dragon's position goes first now. The port ledger listed EntityBoundSoundInstance.tick as missing although #9382 ported it. From martipops's review of #9382. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
9540aaeb86
commit
7d3557e5af
3 files changed
+10
-4
No files matched your search
@@ -790,8 +790,14 @@ impl Game<'_> {
|
||||
let mut state = entity_sound_state(id, player, &self.mobs, &r.entities)?;
|
||||
// Vehicles, projectiles and other simulated objects may have moved since
|
||||
// the last tracking packet, just as the mob interpolation has.
|
||||
if let Some(position) = self
|
||||
.level_entity(id)
|
||||
// The dragon: `spawn_entity` keeps a copy of it in `mobs` that `move_entity` leaves where it
|
||||
// spawned, so its own state goes first.
|
||||
let dragon = u32::try_from(id)
|
||||
.ok()
|
||||
.filter(|id| self.dragon.as_ref().is_some_and(|d| d.id == *id))
|
||||
.map(super::commands::Target::Dragon);
|
||||
if let Some(position) = dragon
|
||||
.or_else(|| self.level_entity(id))
|
||||
.and_then(|target| self.target_position(target))
|
||||
{
|
||||
state.position = position;
|
||||
|
||||
@@ -77,7 +77,7 @@ ClientPacketListener.applyPlayerInfoUpdate inline crates/horizon-client/src/game
|
||||
ClientPacketListener.initializeChatSession port crates/horizon-client/src/game/remote.rs::Remote::new_chat_validator the session each INITIALIZE_CHAT entry carries is kept and checked against the services' profile-key keys when the player's chat is first read
|
||||
ClientPacketListener.enforcesSecureChat inline crates/horizon-client/src/game/remote.rs::Game::handle_packet the Login flag is kept as serverEnforcesSecureChat and the fallback message validator enforces it
|
||||
ClientPacketListener.handleGameRuleValues port crates/horizon-client/src/game/lan_screen.rs::Game::remote_world_options_rules
|
||||
ClientPacketListener.handleSoundEntityEvent port crates/horizon-client/src/game/remote.rs::Game::handle_packet SoundEntity arm: the sound plays where the tracked entity is
|
||||
ClientPacketListener.handleSoundEntityEvent port crates/horizon-client/src/game/remote.rs::Game::handle_packet SoundEntity arm: an EntityBoundSoundInstance that starts where the entity is and follows it (SoundInstance::tick)
|
||||
ClientPacketListener.handleAddObjective port crates/horizon-client/src/game/remote.rs::Game::remote_objective add, remove and update of an objective
|
||||
ClientPacketListener.handleSetScore port crates/horizon-client/src/game/remote.rs::Game::handle_packet SetScore arm
|
||||
ClientPacketListener.handleResetScore port crates/horizon-client/src/game/remote.rs::Game::handle_packet ResetScore arm
|
||||
|
||||
|
@@ -140,7 +140,7 @@ AbstractSoundInstance.getOrResolve port crates/horizon-client-render/src/sound_e
|
||||
BeeSoundInstance.tick port crates/horizon-client-render/src/sound_engine.rs::SoundInstance::tick Ticking::Bee follows the bee; pitch and volume from speed
|
||||
DirectionalSoundInstance.setPosition port crates/horizon-client/src/game/end.rs::Game::tick_end gap: minor: the end flash plays without a position, so the 10-block offset toward the view is not kept
|
||||
ElytraOnPlayerSoundInstance.tick port crates/horizon-client-render/src/sound_engine.rs::SoundInstance::tick the `Elytra` arm: `item.elytra.flying` follows the player each tick, stops 20 ticks after gliding ends, volume `speed / 4` clamped, silent for a second then fading in over the next
|
||||
EntityBoundSoundInstance.tick missing minor: a sound tied to an entity does not follow it; it stays at its start point
|
||||
EntityBoundSoundInstance.tick port crates/horizon-client-render/src/sound_engine.rs::SoundInstance::tick the `EntityBound` arm: follows the entity each tick (Game::remote_sound_entity_state), stops when it is removed or silent, returning before it moves as vanilla does
|
||||
RidingEntitySoundInstance.tick port crates/horizon-client-render/src/sound_engine.rs::SoundInstance::tick the `RidingEntity` arm for `entity.happy_ghast.riding` and `entity.nautilus.riding`: stops when the ridden mob is gone or silent, volume 0 unless the underwater test matches and the speed is at least 0.01, else the clamped lerp
|
||||
RidingMinecartSoundInstance.shoudlPlaySound port crates/horizon-client-render/src/sound_engine.rs::SoundInstance::tick RidingMinecart arm; the predicate is always true for OldMinecartBehavior, Horizon's only minecart
|
||||
SnifferSoundInstance.tick port crates/horizon-client/src/game/sniffers.rs::Game::tick_sniffer_effects gap: player: the digging sound plays once when digging starts; vanilla loops it while digging
|
||||
|
||||
|
Reference in new issue
Block a user