Arrows keep the shooter's horizontal motion on the ground, as vanilla

Projectile.shootFromRotation adds the shooter's known movement and drops
only its y on the ground, and sets no rotation after it: an arrow shot
while strafing drifts with the player in vanilla too.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
Ludovic MarieandClaude Opus 5.5 committed 2026-11-01 14:27:05 +01:00
1 parent 6548234ac5
commit 9ec5db50d1
2 files changed
+1 -9

No files matched your search

+1 -8
View File
@@ -12865,14 +12865,7 @@ impl Game<'_> {
a.ignite_for_seconds(seconds);
}
let (velocity, on_ground) = self.player.as_ref().map_or((Vec3::ZERO, true), |pl| {
(
if pl.ground.on_ground {
Vec3::ZERO
} else {
self.known_player_movement()
},
pl.ground.on_ground,
)
(self.known_player_movement(), pl.ground.on_ground)
});
arrow.shoot_from_rotation(
&mut self.world.random,
-1
View File
@@ -470,7 +470,6 @@ impl Projectile {
},
self.velocity.z + source_velocity.z,
);
self.update_rotation();
}
/// AbstractHurtingProjectile: movement along the direction at the acceleration power.
pub fn fireball(