mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Fixed CI and incorrect vel
This commit is contained in:
parent
4adfb95c9b
commit
22b537a4e5
@ -906,7 +906,7 @@ impl<'a> PhysicsData<'a> {
|
||||
},
|
||||
read,
|
||||
&ori,
|
||||
|vel| friction_factor(vel),
|
||||
friction_factor,
|
||||
);
|
||||
tgt_pos = cpos.0;
|
||||
},
|
||||
@ -941,7 +941,7 @@ impl<'a> PhysicsData<'a> {
|
||||
},
|
||||
read,
|
||||
&ori,
|
||||
|vel| friction_factor(vel),
|
||||
friction_factor,
|
||||
);
|
||||
|
||||
// Sticky things shouldn't move when on a surface
|
||||
@ -1228,7 +1228,7 @@ impl<'a> PhysicsData<'a> {
|
||||
},
|
||||
read,
|
||||
&ori,
|
||||
|vel| friction_factor(vel),
|
||||
|vel| friction_factor(previous_cache_other.ori * vel),
|
||||
);
|
||||
|
||||
// Transform entity attributes back into world space now
|
||||
|
@ -7,7 +7,7 @@ use common::{
|
||||
util::Dir,
|
||||
};
|
||||
use common_ecs::{Job, Origin, Phase, System};
|
||||
use specs::{Entities, Join, Read, ReadStorage, WriteStorage};
|
||||
use specs::{Entities, Join, LendJoin, Read, ReadStorage, WriteStorage};
|
||||
use vek::*;
|
||||
|
||||
/// This system is responsible for controlling mounts
|
||||
@ -49,17 +49,22 @@ impl<'a> System<'a> for Sys {
|
||||
for (follower, is_follower, follower_body, follower_scale) in
|
||||
(&entities, &is_followers, bodies.maybe(), scales.maybe()).join()
|
||||
{
|
||||
let Some(leader) = id_maps.uid_entity(is_follower.leader) else { continue };
|
||||
let Some(leader) = id_maps.uid_entity(is_follower.leader) else {
|
||||
continue;
|
||||
};
|
||||
|
||||
let (Some(leader_pos), Some(follower_pos)) = (
|
||||
positions.get(leader).copied(),
|
||||
positions.get(follower).copied(),
|
||||
) else { continue };
|
||||
) else {
|
||||
continue;
|
||||
};
|
||||
|
||||
let (Some(leader_mass), Some(follower_mass)) = (
|
||||
masses.get(leader).copied(),
|
||||
masses.get(follower).copied(),
|
||||
) else { continue };
|
||||
let (Some(leader_mass), Some(follower_mass)) =
|
||||
(masses.get(leader).copied(), masses.get(follower).copied())
|
||||
else {
|
||||
continue;
|
||||
};
|
||||
|
||||
if velocities.contains(follower) && velocities.contains(leader) {
|
||||
let attach_offset = orientations
|
||||
|
@ -10,7 +10,7 @@ use common::{
|
||||
uid::{IdMaps, Uid},
|
||||
};
|
||||
use hashbrown::HashMap;
|
||||
use specs::{Join, WorldExt};
|
||||
use specs::{Join, LendJoin, WorldExt};
|
||||
use vek::*;
|
||||
|
||||
pub struct TetherMgr {
|
||||
@ -53,7 +53,9 @@ impl TetherMgr {
|
||||
for (interp, is_follower, body, scale) in
|
||||
(&interpolated, &is_followers, bodies.maybe(), scales.maybe()).join()
|
||||
{
|
||||
let Some(leader) = id_maps.uid_entity(is_follower.leader) else { continue };
|
||||
let Some(leader) = id_maps.uid_entity(is_follower.leader) else {
|
||||
continue;
|
||||
};
|
||||
let pos_a = interpolated.get(leader).map_or(Vec3::zero(), |i| i.pos)
|
||||
+ interpolated.get(leader).zip(bodies.get(leader)).map_or(
|
||||
Vec3::zero(),
|
||||
|
Loading…
Reference in New Issue
Block a user