mirror of
https://github.com/horizon-rust/horizon.git
synced 2026-11-07 11:06:11 -10:00
riding: the crosshair skips the mob being ridden, so it can't be hit
Fixes #2870.
This commit is contained in:
1 parent
56f968e11c
commit
7934a0b180
1 file changed
+3
-1
@@ -8390,7 +8390,9 @@ impl Game<'_> {
|
||||
let reach: f64 = if self.creative { 5.0 } else { 3.0 };
|
||||
let mut best: Option<(usize, f64)> = None;
|
||||
for (i, m) in self.mobs.iter().enumerate() {
|
||||
if !m.alive() {
|
||||
// ProjectileUtil.getEntityHitResult: the mob the player rides
|
||||
// shares its root vehicle and is never the hit.
|
||||
if !m.alive() || Some(m.id) == self.riding {
|
||||
continue;
|
||||
}
|
||||
if let Some(t) = ray_box(eye, dir, reach, m.bounds())
|
||||
|
||||
Reference in new issue
Block a user