mirror of
https://github.com/horizon-rust/horizon.git
synced 2026-11-13 04:33:48 -10:00
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:
1 parent
6548234ac5
commit
9ec5db50d1
2 files changed
+1
-9
No files matched your search
@@ -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,
|
||||
|
||||
@@ -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(
|
||||
|
||||
Reference in new issue
Block a user