mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Merge branch 'xMAC94x/update_toolchain' into 'master'
xmac94x/update toolchain See merge request veloren/veloren!3709
This commit is contained in:
commit
8a6e79c249
@ -13,7 +13,7 @@ variables:
|
||||
# https://docs.gitlab.com/ee/ci/yaml/#shallow-cloning
|
||||
GIT_DEPTH: 3
|
||||
GIT_CLEAN_FLAGS: -f
|
||||
CACHE_IMAGE_TAG: 9a0cb110
|
||||
CACHE_IMAGE_TAG: 8e8fe241
|
||||
TAG_REGEX: '/^v[0-9]+\.[0-9]+\.[0-9]+$/'
|
||||
|
||||
default:
|
||||
|
@ -521,7 +521,7 @@ impl Client {
|
||||
Rgb::new(0.15, 0.15, 0.15)
|
||||
} else {
|
||||
// Color hill shading
|
||||
let lightness = (alt + 0.2).min(1.0) as f64;
|
||||
let lightness = (alt + 0.2).min(1.0);
|
||||
Rgb::new(lightness, 0.9 * lightness, 0.5 * lightness)
|
||||
}
|
||||
} else if is_stylized_topo {
|
||||
@ -995,8 +995,7 @@ impl Client {
|
||||
let view_distances = common::ViewDistances {
|
||||
terrain: view_distances
|
||||
.terrain
|
||||
.max(1)
|
||||
.min(MAX_SELECTABLE_VIEW_DISTANCE),
|
||||
.clamp(1, MAX_SELECTABLE_VIEW_DISTANCE),
|
||||
entity: view_distances.entity.max(1),
|
||||
};
|
||||
self.view_distance = Some(view_distances.terrain);
|
||||
@ -1004,6 +1003,7 @@ impl Client {
|
||||
}
|
||||
|
||||
pub fn set_lod_distance(&mut self, lod_distance: u32) {
|
||||
#[allow(clippy::manual_clamp)]
|
||||
let lod_distance = lod_distance.max(0).min(1000) as f32 / lod::ZONE_SIZE as f32;
|
||||
self.lod_distance = lod_distance;
|
||||
}
|
||||
@ -1789,7 +1789,8 @@ impl Client {
|
||||
true,
|
||||
);
|
||||
// TODO: avoid emitting these in the first place
|
||||
self.state
|
||||
let _ = self
|
||||
.state
|
||||
.ecs()
|
||||
.fetch::<EventBus<common::event::ServerEvent>>()
|
||||
.recv_all();
|
||||
|
@ -300,7 +300,7 @@ where
|
||||
{
|
||||
fn default() -> Self {
|
||||
Self {
|
||||
own: Box::new(T::default()),
|
||||
own: Box::<T>::default(),
|
||||
cpu_stats: CpuTimeline::default(),
|
||||
}
|
||||
}
|
||||
|
@ -111,8 +111,8 @@ pub struct EntitySyncPackage {
|
||||
pub deleted_entities: Vec<u64>,
|
||||
}
|
||||
impl EntitySyncPackage {
|
||||
pub fn new<'a>(
|
||||
uids: &ReadStorage<'a, Uid>,
|
||||
pub fn new(
|
||||
uids: &ReadStorage<'_, Uid>,
|
||||
uid_tracker: &UpdateTracker<Uid>,
|
||||
filter: impl Join + Copy,
|
||||
deleted_entities: Vec<u64>,
|
||||
@ -186,10 +186,10 @@ impl<P: CompPacket> CompSyncPackage<P> {
|
||||
|
||||
/// If there was an update to the component `C` on the provided entity this
|
||||
/// will add the update to this package.
|
||||
pub fn add_component_update<'a, C: Component + Clone + Send + Sync>(
|
||||
pub fn add_component_update<C: Component + Clone + Send + Sync>(
|
||||
&mut self,
|
||||
tracker: &UpdateTracker<C>,
|
||||
storage: &ReadStorage<'a, C>,
|
||||
storage: &ReadStorage<'_, C>,
|
||||
uid: u64,
|
||||
entity: Entity,
|
||||
) where
|
||||
|
@ -33,7 +33,7 @@ where
|
||||
|
||||
pub fn removed(&self) -> &BitSet { &self.removed }
|
||||
|
||||
pub fn record_changes<'a>(&mut self, storage: &ReadStorage<'a, C>) {
|
||||
pub fn record_changes(&mut self, storage: &ReadStorage<'_, C>) {
|
||||
self.inserted.clear();
|
||||
self.modified.clear();
|
||||
self.removed.clear();
|
||||
@ -66,9 +66,9 @@ where
|
||||
}
|
||||
|
||||
impl<C: Component + Clone + Send + Sync> UpdateTracker<C> {
|
||||
pub fn add_packet_for<'a, P>(
|
||||
pub fn add_packet_for<P>(
|
||||
&self,
|
||||
storage: &ReadStorage<'a, C>,
|
||||
storage: &ReadStorage<'_, C>,
|
||||
entity: Entity,
|
||||
packets: &mut Vec<P>,
|
||||
) where
|
||||
@ -84,10 +84,10 @@ impl<C: Component + Clone + Send + Sync> UpdateTracker<C> {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_updates_for<'a, P>(
|
||||
pub fn get_updates_for<P>(
|
||||
&self,
|
||||
uids: &ReadStorage<'a, Uid>,
|
||||
storage: &ReadStorage<'a, C>,
|
||||
uids: &ReadStorage<'_, Uid>,
|
||||
storage: &ReadStorage<'_, C>,
|
||||
entity_filter: impl Join + Copy,
|
||||
buf: &mut Vec<(u64, CompUpdateKind<P>)>,
|
||||
) where
|
||||
@ -125,9 +125,9 @@ impl<C: Component + Clone + Send + Sync> UpdateTracker<C> {
|
||||
|
||||
/// Returns `Some(update)` if the tracked component was modified for this
|
||||
/// entity.
|
||||
pub fn get_update<'a, P>(
|
||||
pub fn get_update<P>(
|
||||
&self,
|
||||
storage: &ReadStorage<'a, C>,
|
||||
storage: &ReadStorage<'_, C>,
|
||||
entity: Entity,
|
||||
) -> Option<CompUpdateKind<P>>
|
||||
where
|
||||
|
@ -849,9 +849,7 @@ impl Damage {
|
||||
|
||||
let penetration = if let Some(damage) = damage {
|
||||
if let DamageKind::Piercing = damage.kind {
|
||||
(damage.value * PIERCING_PENETRATION_FRACTION)
|
||||
.min(protection.unwrap_or(0.0))
|
||||
.max(0.0)
|
||||
(damage.value * PIERCING_PENETRATION_FRACTION).clamp(0.0, protection.unwrap_or(0.0))
|
||||
} else {
|
||||
0.0
|
||||
}
|
||||
@ -1170,7 +1168,7 @@ pub fn combat_rating(
|
||||
* compute_energy_reward_mod(Some(inventory), msm);
|
||||
|
||||
// Normalized with a standard max poise of 100
|
||||
let poise_rating = poise.base_max() as f32
|
||||
let poise_rating = poise.base_max()
|
||||
/ 100.0
|
||||
/ (1.0 - Poise::compute_poise_damage_reduction(Some(inventory), msm, None, None))
|
||||
.max(0.00001);
|
||||
|
@ -2147,7 +2147,7 @@ impl From<(&CharacterAbility, AbilityInfo, &JoinData<'_>)> for CharacterState {
|
||||
speed_increase: 1.0 - *speed_increase,
|
||||
max_speed_increase: *max_speed_increase,
|
||||
scales_from_combo: *scales_from_combo,
|
||||
ori_modifier: *ori_modifier as f32,
|
||||
ori_modifier: *ori_modifier,
|
||||
ability_info,
|
||||
},
|
||||
exhausted: false,
|
||||
|
@ -207,7 +207,7 @@ impl Ori {
|
||||
// NOTE: acos is very sensitive to errors at small angles
|
||||
// - https://www.researchgate.net/post/How_do_I_calculate_the_smallest_angle_between_two_quaternions
|
||||
// - see angle_between unit test epislons
|
||||
let angle = 2.0 * between.w.min(1.0).max(-1.0).acos();
|
||||
let angle = 2.0 * between.w.clamp(-1.0, 1.0).acos();
|
||||
if angle < PI { angle } else { TAU - angle }
|
||||
}
|
||||
|
||||
@ -317,7 +317,7 @@ fn rotation_2d(Vec2 { x, y }: Vec2<f32>, axis: Vec3<f32>) -> Quaternion<f32> {
|
||||
// cos(a) = x / |xy| => x (when normalized)
|
||||
|
||||
// Prevent NaNs from negative sqrt (float errors can put this slightly over 1.0)
|
||||
let x = x.min(1.0).max(-1.0);
|
||||
let x = x.clamp(-1.0, 1.0);
|
||||
|
||||
let scalar = ((1.0 + x) / 2.0).sqrt() * y.signum();
|
||||
let vector = axis * ((1.0 - x) / 2.0).sqrt();
|
||||
|
@ -11,7 +11,6 @@
|
||||
trait_alias,
|
||||
type_alias_impl_trait,
|
||||
extend_one,
|
||||
arbitrary_enum_discriminant,
|
||||
arbitrary_self_types
|
||||
)]
|
||||
#![feature(hash_drain_filter)]
|
||||
|
@ -591,10 +591,10 @@ impl ComponentRecipe {
|
||||
let mut slot_claims = HashMap::new();
|
||||
let mut unsatisfied_requirements = Vec::new();
|
||||
|
||||
fn handle_requirement<'a, 'b, I: Iterator<Item = InvSlotId>>(
|
||||
fn handle_requirement<'a, I: Iterator<Item = InvSlotId>>(
|
||||
slot_claims: &mut HashMap<InvSlotId, u32>,
|
||||
unsatisfied_requirements: &mut Vec<(&'a RecipeInput, u32)>,
|
||||
inv: &'b Inventory,
|
||||
inv: &Inventory,
|
||||
input: &'a RecipeInput,
|
||||
amount: u32,
|
||||
input_slots: I,
|
||||
|
@ -110,9 +110,8 @@ impl SkillSetBuilder {
|
||||
/// 2) If added skill already applied
|
||||
/// 3) If added skill wasn't applied at the end
|
||||
pub fn with_skill(mut self, skill: Skill, level: u16) -> Self {
|
||||
let group = if let Some(skill_group) = skill.skill_group_kind() {
|
||||
skill_group
|
||||
} else {
|
||||
|
||||
let Some(group) = skill.skill_group_kind() else {
|
||||
let err = format!(
|
||||
"Tried to add skill: {:?} which does not have an associated skill group.",
|
||||
skill
|
||||
@ -131,7 +130,7 @@ impl SkillSetBuilder {
|
||||
for _ in 0..level {
|
||||
skill_set.add_skill_points(group, skill_set.skill_cost(skill));
|
||||
if let Err(err) = skill_set.unlock_skill(skill) {
|
||||
let err_msg = format!("Failed to add skill: {:?}. Error: {:?}", skill, err);
|
||||
let err_msg = format!("Failed to add skill: {skill:?}. Error: {err:?}");
|
||||
common_base::dev_panic!(err_msg);
|
||||
}
|
||||
}
|
||||
|
@ -43,10 +43,10 @@ impl Iterator for Spiral2d {
|
||||
let layer_size = (self.layer * 8 + 4 * self.layer.min(1) - 4).max(1);
|
||||
|
||||
let pos = Vec2::new(
|
||||
-self.layer + (self.i - (layer_size / 4) * 0).max(0).min(self.layer * 2)
|
||||
- (self.i - (layer_size / 4) * 2).max(0).min(self.layer * 2),
|
||||
-self.layer + (self.i - (layer_size / 4) * 1).max(0).min(self.layer * 2)
|
||||
- (self.i - (layer_size / 4) * 3).max(0).min(self.layer * 2),
|
||||
-self.layer + (self.i - (layer_size / 4) * 0).clamp(0, self.layer * 2)
|
||||
- (self.i - (layer_size / 4) * 2).clamp(0, self.layer * 2),
|
||||
-self.layer + (self.i - (layer_size / 4) * 1).clamp(0, self.layer * 2)
|
||||
- (self.i - (layer_size / 4) * 3).clamp(0, self.layer * 2),
|
||||
);
|
||||
|
||||
self.i += 1;
|
||||
|
@ -89,7 +89,7 @@ impl CharacterBehavior for Data {
|
||||
// Consumes energy if there's enough left and RMB is held down
|
||||
update
|
||||
.energy
|
||||
.change_by(-self.static_data.energy_drain as f32 * data.dt.0 / 5.0);
|
||||
.change_by(-self.static_data.energy_drain * data.dt.0 / 5.0);
|
||||
} else {
|
||||
// Transitions to swing
|
||||
update.character = CharacterState::ChargedMelee(Data {
|
||||
|
@ -99,8 +99,8 @@ impl CharacterBehavior for Data {
|
||||
if !self.static_data.ability_info.input.map_or(false, |input| input_is_pressed(data, input)) && !self.exhausted {
|
||||
let charge_frac = self.charge_frac();
|
||||
let arrow = ProjectileConstructor::Arrow {
|
||||
damage: self.static_data.initial_damage as f32
|
||||
+ charge_frac * self.static_data.scaled_damage as f32,
|
||||
damage: self.static_data.initial_damage
|
||||
+ charge_frac * self.static_data.scaled_damage,
|
||||
knockback: self.static_data.initial_knockback
|
||||
+ charge_frac * self.static_data.scaled_knockback,
|
||||
energy_regen: self.static_data.initial_regen
|
||||
|
@ -251,7 +251,7 @@ impl CharacterBehavior for Data {
|
||||
Damage {
|
||||
source: DamageSource::Melee,
|
||||
kind: self.static_data.stage_data[stage_index].damage_kind,
|
||||
value: damage as f32,
|
||||
value: damage,
|
||||
},
|
||||
Some(GroupTarget::OutOfGroup),
|
||||
rand::random(),
|
||||
|
@ -80,7 +80,7 @@ impl CharacterBehavior for Data {
|
||||
// Attack
|
||||
let poise = AttackEffect::new(
|
||||
Some(GroupTarget::OutOfGroup),
|
||||
CombatEffect::Poise(self.static_data.poise_damage as f32),
|
||||
CombatEffect::Poise(self.static_data.poise_damage),
|
||||
)
|
||||
.with_requirement(CombatRequirement::AnyDamage);
|
||||
let knockback = AttackEffect::new(
|
||||
@ -92,7 +92,7 @@ impl CharacterBehavior for Data {
|
||||
Damage {
|
||||
source: DamageSource::Shockwave,
|
||||
kind: self.static_data.damage_kind,
|
||||
value: self.static_data.damage as f32,
|
||||
value: self.static_data.damage,
|
||||
},
|
||||
Some(GroupTarget::OutOfGroup),
|
||||
rand::random(),
|
||||
|
@ -58,8 +58,7 @@ impl CharacterBehavior for Data {
|
||||
}
|
||||
// forward, max at 8u/s
|
||||
(data.dt.0 * 3.0)
|
||||
.min(8.0 - current_planar_velocity)
|
||||
.max(0.0)
|
||||
.clamp(0.0, 8.0 - current_planar_velocity)
|
||||
} else {
|
||||
if let CharacterState::Skate(data) = &mut update.character {
|
||||
data.accelerate = -1.0;
|
||||
|
@ -118,7 +118,7 @@ impl CharacterBehavior for Data {
|
||||
timer: tick_attack_or_default(data, self.timer, None),
|
||||
..*self
|
||||
});
|
||||
} else if update.energy.current() as f32 >= self.static_data.energy_cost
|
||||
} else if update.energy.current() >= self.static_data.energy_cost
|
||||
&& (self.consecutive_spins < self.static_data.num_spins
|
||||
|| (self.static_data.is_infinite
|
||||
&& self.static_data.ability_info.input.map_or(false, |input| input_is_pressed(data, input))))
|
||||
|
@ -116,7 +116,7 @@ impl CharacterBehavior for Data {
|
||||
|
||||
// Location sprite will be created
|
||||
let sprite_pos =
|
||||
Vec3::new(sprite_pos.x as i32, sprite_pos.y as i32, z);
|
||||
Vec3::new(sprite_pos.x, sprite_pos.y, z);
|
||||
// Layers of sprites
|
||||
let layers = match self.static_data.sprite {
|
||||
SpriteKind::SeaUrchin => 2,
|
||||
@ -125,7 +125,7 @@ impl CharacterBehavior for Data {
|
||||
for i in 0..layers {
|
||||
// Send server event to create sprite
|
||||
output_events.emit_server(ServerEvent::CreateSprite {
|
||||
pos: Vec3::new(sprite_pos.x as i32, sprite_pos.y, z + i),
|
||||
pos: Vec3::new(sprite_pos.x, sprite_pos.y, z + i),
|
||||
sprite: self.static_data.sprite,
|
||||
});
|
||||
}
|
||||
|
@ -622,7 +622,7 @@ pub fn fly_move(data: &JoinData<'_>, update: &mut StateUpdate, efficiency: f32)
|
||||
let change = if data.inputs.move_z.abs() > f32::EPSILON {
|
||||
-data.inputs.move_z
|
||||
} else {
|
||||
(def - data.density.0).max(-1.0).min(1.0)
|
||||
(def - data.density.0).clamp(-1.0, 1.0)
|
||||
};
|
||||
Density((update.density.0 + data.dt.0 * rate * change).clamp(min, max))
|
||||
};
|
||||
|
@ -27,8 +27,7 @@ impl CharacterBehavior for Data {
|
||||
update.vel.0.z += data.dt.0
|
||||
* lift
|
||||
* (Vec2::<f32>::from(update.vel.0).magnitude() * 0.075)
|
||||
.min(1.0)
|
||||
.max(0.2);
|
||||
.clamp(0.2, 1.0);
|
||||
}
|
||||
|
||||
// fall off wall, hit ground, or enter water
|
||||
|
@ -494,8 +494,8 @@ impl<'a> MapConfig<'a> {
|
||||
let world_size = map_size_lg.chunks();
|
||||
|
||||
(0..dimensions.y * dimensions.x).for_each(|chunk_idx| {
|
||||
let i = chunk_idx % dimensions.x as usize;
|
||||
let j = chunk_idx / dimensions.x as usize;
|
||||
let i = chunk_idx % dimensions.x;
|
||||
let j = chunk_idx / dimensions.x;
|
||||
|
||||
let wposf = focus_rect + Vec2::new(i as f64, j as f64) * scale;
|
||||
let pos = wposf.map(|e: f64| e as i32);
|
||||
@ -678,7 +678,7 @@ impl<'a> MapConfig<'a> {
|
||||
let deltax = height / angle;
|
||||
let lighty = (light_direction.y / light_direction.x * deltax).abs();
|
||||
let deltay = lighty - height;
|
||||
let s = (deltay / deltax / w).min(1.0).max(0.0);
|
||||
let s = (deltay / deltax / w).clamp(0.0, 1.0);
|
||||
// Smoothstep
|
||||
s * s * (3.0 - 2.0 * s)
|
||||
} else {
|
||||
|
@ -135,7 +135,7 @@ pub fn xyy_to_rgb(xyy: Vec3<f32>) -> Rgb<f32> {
|
||||
pub fn saturate_srgb(col: Rgb<f32>, value: f32) -> Rgb<f32> {
|
||||
let mut hsv = rgb_to_hsv(srgb_to_linear(col));
|
||||
hsv.y *= 1.0 + value;
|
||||
linear_to_srgb(hsv_to_rgb(hsv).map(|e| e.min(1.0).max(0.0)))
|
||||
linear_to_srgb(hsv_to_rgb(hsv).map(|e| e.clamp(0.0, 1.0)))
|
||||
}
|
||||
|
||||
/// Preserves the luma of one color while changing its chromaticity to match the
|
||||
@ -146,5 +146,5 @@ pub fn chromify_srgb(luma: Rgb<f32>, chroma: Rgb<f32>) -> Rgb<f32> {
|
||||
let mut xyy = rgb_to_xyy(srgb_to_linear(chroma));
|
||||
xyy.z = l;
|
||||
|
||||
linear_to_srgb(xyy_to_rgb(xyy).map(|e| e.min(1.0).max(0.0)))
|
||||
linear_to_srgb(xyy_to_rgb(xyy).map(|e| e.clamp(0.0, 1.0)))
|
||||
}
|
||||
|
@ -16,10 +16,10 @@ impl ViewDistances {
|
||||
///
|
||||
/// Also ensures both are at a minimum of 1 (unless the provided max is 0).
|
||||
pub fn clamp(self, max: Option<u32>) -> Self {
|
||||
let terrain = self.terrain.max(1).min(max.unwrap_or(u32::MAX));
|
||||
let terrain = self.terrain.clamp(1,max.unwrap_or(u32::MAX));
|
||||
Self {
|
||||
terrain,
|
||||
entity: self.entity.max(1).min(terrain),
|
||||
entity: self.entity.clamp(1,terrain),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -71,7 +71,7 @@ impl<V, S: VolSize, M> Chunk<V, S, M> {
|
||||
Self::GROUP_VOLUME / (Self::GROUP_LONG_SIDE_LEN * Self::GROUP_LONG_SIDE_LEN),
|
||||
);
|
||||
const GROUP_VOLUME: u32 = [Self::VOLUME / 256, 1][(Self::VOLUME < 256) as usize];
|
||||
const VOLUME: u32 = (S::SIZE.x * S::SIZE.y * S::SIZE.z) as u32;
|
||||
const VOLUME: u32 = (S::SIZE.x * S::SIZE.y * S::SIZE.z);
|
||||
|
||||
/// Creates a new `Chunk` with the provided dimensions and all voxels filled
|
||||
/// with duplicates of the provided voxel.
|
||||
|
@ -370,7 +370,7 @@ fn execute_effect(
|
||||
{
|
||||
let amount = match *kind {
|
||||
ModifierKind::Additive => *accumulated,
|
||||
ModifierKind::Fractional => energy.maximum() as f32 * *accumulated,
|
||||
ModifierKind::Fractional => energy.maximum() * *accumulated,
|
||||
};
|
||||
server_emitter.emit(ServerEvent::EnergyChange {
|
||||
entity,
|
||||
@ -395,6 +395,7 @@ fn execute_effect(
|
||||
stat.max_energy_modifiers.mult_mod *= *value;
|
||||
},
|
||||
},
|
||||
#[allow(clippy::manual_clamp)]
|
||||
BuffEffect::DamageReduction(dr) => {
|
||||
stat.damage_reduction = stat.damage_reduction.max(*dr).min(1.0);
|
||||
},
|
||||
@ -421,7 +422,7 @@ fn execute_effect(
|
||||
ModifierKind::Additive => {
|
||||
// `rate * dt` is amount of health, dividing by base max
|
||||
// creates fraction
|
||||
*rate * dt / health.base_max() as f32
|
||||
*rate * dt / health.base_max()
|
||||
},
|
||||
ModifierKind::Fractional => {
|
||||
// `rate * dt` is the fraction
|
||||
@ -466,6 +467,7 @@ fn execute_effect(
|
||||
BuffEffect::GroundFriction(gf) => {
|
||||
stat.friction_modifier *= *gf;
|
||||
},
|
||||
#[allow(clippy::manual_clamp)]
|
||||
BuffEffect::PoiseReduction(pr) => {
|
||||
stat.poise_reduction = stat.poise_reduction.max(*pr).min(1.0);
|
||||
},
|
||||
|
@ -1333,9 +1333,9 @@ impl<'a> System<'a> for Sys {
|
||||
}
|
||||
|
||||
#[allow(clippy::too_many_lines)]
|
||||
fn box_voxel_collision<'a, T: BaseVol<Vox = Block> + ReadVol>(
|
||||
fn box_voxel_collision<T: BaseVol<Vox = Block> + ReadVol>(
|
||||
cylinder: (f32, f32, f32), // effective collision cylinder
|
||||
terrain: &'a T,
|
||||
terrain: &T,
|
||||
entity: Entity,
|
||||
pos: &mut Pos,
|
||||
tgt_pos: Vec3<f32>,
|
||||
@ -1738,7 +1738,7 @@ fn box_voxel_collision<'a, T: BaseVol<Vox = Block> + ReadVol>(
|
||||
// E=½mv², we scale both energies by ½m
|
||||
let kinetic = squared_velocity;
|
||||
// positive accelerate, negative decelerate, ΔE=mgΔh
|
||||
let delta_potential = vertical_difference.max(-1.0).min(2.0) * POTENTIAL_TO_KINETIC;
|
||||
let delta_potential = vertical_difference.clamp(-1.0, 2.0) * POTENTIAL_TO_KINETIC;
|
||||
let new_energy = kinetic + delta_potential;
|
||||
physics_state.skating_last_height = pos.0.z;
|
||||
new_energy / kinetic
|
||||
|
@ -131,14 +131,14 @@ impl NetworkMetrics {
|
||||
let opts = Opts::new("network_info", "Static Network information")
|
||||
.const_label(
|
||||
"version",
|
||||
&format!(
|
||||
format!(
|
||||
"{}.{}.{}",
|
||||
&network_protocol::VELOREN_NETWORK_VERSION[0],
|
||||
&network_protocol::VELOREN_NETWORK_VERSION[1],
|
||||
&network_protocol::VELOREN_NETWORK_VERSION[2]
|
||||
),
|
||||
)
|
||||
.const_label("local_pid", &format!("{}", &local_pid));
|
||||
.const_label("local_pid", format!("{}", &local_pid));
|
||||
let network_info = IntGauge::with_opts(opts)?;
|
||||
|
||||
Ok(Self {
|
||||
|
@ -1 +1 @@
|
||||
nightly-2022-09-23
|
||||
nightly-2022-11-28
|
||||
|
@ -2520,7 +2520,7 @@ impl<'a> AgentData<'a> {
|
||||
) {
|
||||
controller.inputs.look_dir = Dir::new(
|
||||
Quaternion::from_xyzw(self.ori.look_dir().x, self.ori.look_dir().y, 0.0, 0.0)
|
||||
.rotated_z(6.0 * read_data.dt.0 as f32)
|
||||
.rotated_z(6.0 * read_data.dt.0)
|
||||
.into_vec3()
|
||||
.try_normalized()
|
||||
.unwrap_or_default(),
|
||||
|
@ -2103,9 +2103,9 @@ fn handle_light(
|
||||
return Err("cr, cg and cb values mustn't be negative.".into());
|
||||
}
|
||||
|
||||
let r = r.max(0.0).min(1.0);
|
||||
let g = g.max(0.0).min(1.0);
|
||||
let b = b.max(0.0).min(1.0);
|
||||
let r = r.clamp(0.0, 1.0);
|
||||
let g = g.clamp(0.0, 1.0);
|
||||
let b = b.clamp(0.0, 1.0);
|
||||
light_emitter.col = Rgb::new(r, g, b)
|
||||
};
|
||||
if let (Some(x), Some(y), Some(z)) = (opt_x, opt_y, opt_z) {
|
||||
@ -2152,14 +2152,9 @@ fn handle_lantern(
|
||||
.write_storage::<LightEmitter>()
|
||||
.get_mut(target)
|
||||
{
|
||||
light.strength = s.max(0.1).min(10.0);
|
||||
light.strength = s.clamp(0.1, 10.0);
|
||||
if let (Some(r), Some(g), Some(b)) = (r, g, b) {
|
||||
light.col = (
|
||||
r.max(0.0).min(1.0),
|
||||
g.max(0.0).min(1.0),
|
||||
b.max(0.0).min(1.0),
|
||||
)
|
||||
.into();
|
||||
light.col = (r.clamp(0.0, 1.0), g.clamp(0.0, 1.0), b.clamp(0.0, 1.0)).into();
|
||||
server.notify_client(
|
||||
client,
|
||||
ServerGeneral::server_msg(
|
||||
|
@ -211,7 +211,7 @@ pub(crate) fn establish_connection(
|
||||
ConnectionMode::ReadOnly => OpenFlags::SQLITE_OPEN_READ_ONLY,
|
||||
};
|
||||
|
||||
let connection = Connection::open_with_flags(&settings.db_dir.join("db.sqlite"), open_flags)
|
||||
let connection = Connection::open_with_flags(settings.db_dir.join("db.sqlite"), open_flags)
|
||||
.unwrap_or_else(|err| {
|
||||
panic!(
|
||||
"Error connecting to {}, Error: {:?}",
|
||||
|
@ -80,7 +80,7 @@ impl ViewDistance {
|
||||
pub fn new(start_value: u32, now: Instant) -> Self {
|
||||
Self {
|
||||
direction: Direction::Up,
|
||||
last_direction_change_time: now - Self::TIME_PER_DIR_CHANGE,
|
||||
last_direction_change_time: now.checked_sub(Self::TIME_PER_DIR_CHANGE).unwrap_or(now),
|
||||
target: None,
|
||||
current: start_value,
|
||||
}
|
||||
|
@ -228,7 +228,7 @@ pub fn init(
|
||||
}
|
||||
|
||||
// guards
|
||||
for _ in 0..site2.plazas().len() as usize {
|
||||
for _ in 0..site2.plazas().len() {
|
||||
rtsim.entities.insert(Entity {
|
||||
is_loaded: false,
|
||||
pos: site2
|
||||
@ -252,7 +252,7 @@ pub fn init(
|
||||
}
|
||||
|
||||
// merchants
|
||||
for _ in 0..site2.plazas().len() as usize {
|
||||
for _ in 0..site2.plazas().len() {
|
||||
rtsim.entities.insert(Entity {
|
||||
is_loaded: false,
|
||||
pos: site2
|
||||
@ -350,7 +350,7 @@ pub fn init(
|
||||
}
|
||||
|
||||
// guards
|
||||
for _ in 0..site2.plazas().len() as usize {
|
||||
for _ in 0..site2.plazas().len() {
|
||||
rtsim.entities.insert(Entity {
|
||||
is_loaded: false,
|
||||
pos: site2
|
||||
@ -374,7 +374,7 @@ pub fn init(
|
||||
}
|
||||
|
||||
// merchants
|
||||
for _ in 0..site2.plazas().len() as usize {
|
||||
for _ in 0..site2.plazas().len() {
|
||||
rtsim.entities.insert(Entity {
|
||||
is_loaded: false,
|
||||
pos: site2
|
||||
|
@ -3,7 +3,7 @@ use core::{convert::TryInto, fmt};
|
||||
use serde::{de::DeserializeOwned, Serialize};
|
||||
use std::{
|
||||
fs,
|
||||
io::{Seek, SeekFrom, Write},
|
||||
io::{Seek, Write},
|
||||
path::{Path, PathBuf},
|
||||
};
|
||||
use tracing::{error, info, warn};
|
||||
@ -80,7 +80,7 @@ pub trait EditableSetting: Clone + Default {
|
||||
match ron::de::from_reader(&mut file)
|
||||
.map(|setting: Self::Setting| setting.try_into())
|
||||
.or_else(|orig_err| {
|
||||
file.seek(SeekFrom::Start(0))?;
|
||||
file.rewind()?;
|
||||
ron::de::from_reader(file)
|
||||
.map(|legacy| Ok((Version::Old, Self::Legacy::into(legacy))))
|
||||
// When both legacy and non-legacy have parse errors, prioritize the
|
||||
|
@ -222,7 +222,7 @@ pub fn initialize_region_subscription(world: &World, entity: specs::Entity) {
|
||||
let chunk_size = TerrainChunkSize::RECT_SIZE.reduce_max() as f32;
|
||||
let regions = regions_in_vd(
|
||||
client_pos.0,
|
||||
(presence.entity_view_distance.current() as f32 * chunk_size) as f32
|
||||
(presence.entity_view_distance.current() as f32 * chunk_size)
|
||||
+ (presence::CHUNK_FUZZ as f32 + chunk_size) * 2.0f32.sqrt(),
|
||||
);
|
||||
|
||||
|
@ -566,8 +566,7 @@ pub fn convert_to_loaded_vd(vd: u32, max_view_distance: u32) -> i32 {
|
||||
const UNLOAD_THRESHOLD: u32 = 2;
|
||||
|
||||
// NOTE: This cast is safe for the reasons mentioned above.
|
||||
(vd.max(crate::MIN_VD)
|
||||
.min(max_view_distance)
|
||||
(vd.clamp(crate::MIN_VD, max_view_distance)
|
||||
.saturating_add(UNLOAD_THRESHOLD))
|
||||
.min(MAX_VD) as i32
|
||||
}
|
||||
@ -617,7 +616,7 @@ fn prepare_for_vd_check(
|
||||
// world chunk coordinates are no greater than 1 << 14 - 1; since we verified that the
|
||||
// player is within world bounds modulo player_vd, which is guaranteed to never let us
|
||||
// overflow an i16 when added to a u14, safety of the cast follows.
|
||||
.then(|| ((player_chunk_pos.as_::<i16>(), player_vd.pow(2) as i32), entity, is_client))
|
||||
.then(|| ((player_chunk_pos.as_::<i16>(), player_vd.pow(2)), entity, is_client))
|
||||
}
|
||||
|
||||
pub fn prepare_player_presences<'a, P>(
|
||||
|
@ -115,23 +115,21 @@ impl WeatherSim {
|
||||
} else {
|
||||
let wpos = cell_to_wpos_center(point);
|
||||
|
||||
let pos = wpos.as_::<f64>() + time as f64 * 0.1;
|
||||
let pos = wpos.as_::<f64>() + time * 0.1;
|
||||
|
||||
let space_scale = 7_500.0;
|
||||
let time_scale = 100_000.0;
|
||||
let spos = (pos / space_scale).with_z(time as f64 / time_scale);
|
||||
let spos = (pos / space_scale).with_z(time / time_scale);
|
||||
|
||||
let avg_scale = 20_000.0;
|
||||
let avg_delay = 250_000.0;
|
||||
let pressure = ((base_nz.get(
|
||||
(pos / avg_scale)
|
||||
.with_z(time as f64 / avg_delay)
|
||||
.into_array(),
|
||||
) + base_nz.get(
|
||||
(pos / (avg_scale * 0.25))
|
||||
.with_z(time as f64 / (avg_delay * 0.25))
|
||||
.into_array(),
|
||||
) * 0.5)
|
||||
let pressure = ((base_nz
|
||||
.get((pos / avg_scale).with_z(time / avg_delay).into_array())
|
||||
+ base_nz.get(
|
||||
(pos / (avg_scale * 0.25))
|
||||
.with_z(time / (avg_delay * 0.25))
|
||||
.into_array(),
|
||||
) * 0.5)
|
||||
* 0.5
|
||||
+ 1.0)
|
||||
.clamped(0.0, 1.0) as f32
|
||||
|
@ -16,9 +16,9 @@ impl Animation for AlphaAnimation {
|
||||
const UPDATE_FN: &'static [u8] = b"arthropod_alpha\0";
|
||||
|
||||
#[cfg_attr(feature = "be-dyn-lib", export_name = "arthropod_alpha")]
|
||||
fn update_skeleton_inner<'a>(
|
||||
fn update_skeleton_inner(
|
||||
skeleton: &Self::Skeleton,
|
||||
(_velocity, global_time, stage_section, timer): Self::Dependency<'a>,
|
||||
(_velocity, global_time, stage_section, timer): Self::Dependency<'_>,
|
||||
anim_time: f32,
|
||||
_rate: &mut f32,
|
||||
s_a: &SkeletonAttr,
|
||||
|
@ -14,9 +14,9 @@ impl Animation for DashAnimation {
|
||||
const UPDATE_FN: &'static [u8] = b"arthropod_dash\0";
|
||||
|
||||
#[cfg_attr(feature = "be-dyn-lib", export_name = "arthropod_dash")]
|
||||
fn update_skeleton_inner<'a>(
|
||||
fn update_skeleton_inner(
|
||||
skeleton: &Self::Skeleton,
|
||||
(_velocity, _global_time, stage_section, _timer): Self::Dependency<'a>,
|
||||
(_velocity, _global_time, stage_section, _timer): Self::Dependency<'_>,
|
||||
anim_time: f32,
|
||||
_rate: &mut f32,
|
||||
s_a: &SkeletonAttr,
|
||||
|
@ -13,9 +13,9 @@ impl Animation for IdleAnimation {
|
||||
const UPDATE_FN: &'static [u8] = b"arthropod_idle\0";
|
||||
|
||||
#[cfg_attr(feature = "be-dyn-lib", export_name = "arthropod_idle")]
|
||||
fn update_skeleton_inner<'a>(
|
||||
fn update_skeleton_inner(
|
||||
skeleton: &Self::Skeleton,
|
||||
_global_time: Self::Dependency<'a>,
|
||||
_global_time: Self::Dependency<'_>,
|
||||
_anim_time: f32,
|
||||
_rate: &mut f32,
|
||||
s_a: &SkeletonAttr,
|
||||
|
@ -13,9 +13,9 @@ impl Animation for JumpAnimation {
|
||||
const UPDATE_FN: &'static [u8] = b"arthropod_jump\0";
|
||||
|
||||
#[cfg_attr(feature = "be-dyn-lib", export_name = "arthropod_jump")]
|
||||
fn update_skeleton_inner<'a>(
|
||||
fn update_skeleton_inner(
|
||||
skeleton: &Self::Skeleton,
|
||||
(_velocity, _orientation, _last_ori, _global_time, _avg_vel): Self::Dependency<'a>,
|
||||
(_velocity, _orientation, _last_ori, _global_time, _avg_vel): Self::Dependency<'_>,
|
||||
_anim_time: f32,
|
||||
_rate: &mut f32,
|
||||
s_a: &SkeletonAttr,
|
||||
|
@ -16,9 +16,9 @@ impl Animation for LeapMeleeAnimation {
|
||||
const UPDATE_FN: &'static [u8] = b"arthropod_leapmelee\0";
|
||||
|
||||
#[cfg_attr(feature = "be-dyn-lib", export_name = "arthropod_leapmelee")]
|
||||
fn update_skeleton_inner<'a>(
|
||||
fn update_skeleton_inner(
|
||||
skeleton: &Self::Skeleton,
|
||||
(_velocity, global_time, stage_section, _timer): Self::Dependency<'a>,
|
||||
(_velocity, global_time, stage_section, _timer): Self::Dependency<'_>,
|
||||
anim_time: f32,
|
||||
_rate: &mut f32,
|
||||
s_a: &SkeletonAttr,
|
||||
|
@ -14,9 +14,9 @@ impl Animation for RunAnimation {
|
||||
const UPDATE_FN: &'static [u8] = b"arthropod_run\0";
|
||||
|
||||
#[cfg_attr(feature = "be-dyn-lib", export_name = "arthropod_run")]
|
||||
fn update_skeleton_inner<'a>(
|
||||
fn update_skeleton_inner(
|
||||
skeleton: &Self::Skeleton,
|
||||
(velocity, _orientation, _last_ori, _global_time, avg_vel, acc_vel): Self::Dependency<'a>,
|
||||
(velocity, _orientation, _last_ori, _global_time, avg_vel, acc_vel): Self::Dependency<'_>,
|
||||
anim_time: f32,
|
||||
rate: &mut f32,
|
||||
s_a: &SkeletonAttr,
|
||||
|
@ -14,9 +14,9 @@ impl Animation for ShootAnimation {
|
||||
const UPDATE_FN: &'static [u8] = b"arthropod_shoot\0";
|
||||
|
||||
#[cfg_attr(feature = "be-dyn-lib", export_name = "arthropod_shoot")]
|
||||
fn update_skeleton_inner<'a>(
|
||||
fn update_skeleton_inner(
|
||||
skeleton: &Self::Skeleton,
|
||||
(_velocity, _global_time, stage_section, _timer): Self::Dependency<'a>,
|
||||
(_velocity, _global_time, stage_section, _timer): Self::Dependency<'_>,
|
||||
anim_time: f32,
|
||||
_rate: &mut f32,
|
||||
s_a: &SkeletonAttr,
|
||||
|
@ -14,9 +14,9 @@ impl Animation for StunnedAnimation {
|
||||
const UPDATE_FN: &'static [u8] = b"arthropod_stunned\0";
|
||||
|
||||
#[cfg_attr(feature = "be-dyn-lib", export_name = "arthropod_stunned")]
|
||||
fn update_skeleton_inner<'a>(
|
||||
fn update_skeleton_inner(
|
||||
skeleton: &Self::Skeleton,
|
||||
(_velocity, global_time, stage_section, timer): Self::Dependency<'a>,
|
||||
(_velocity, global_time, stage_section, timer): Self::Dependency<'_>,
|
||||
anim_time: f32,
|
||||
_rate: &mut f32,
|
||||
s_a: &SkeletonAttr,
|
||||
|
@ -16,9 +16,9 @@ impl Animation for SummonAnimation {
|
||||
const UPDATE_FN: &'static [u8] = b"arthropod_summon\0";
|
||||
|
||||
#[cfg_attr(feature = "be-dyn-lib", export_name = "arthropod_summon")]
|
||||
fn update_skeleton_inner<'a>(
|
||||
fn update_skeleton_inner(
|
||||
skeleton: &Self::Skeleton,
|
||||
(_velocity, global_time, stage_section, timer): Self::Dependency<'a>,
|
||||
(_velocity, global_time, stage_section, timer): Self::Dependency<'_>,
|
||||
anim_time: f32,
|
||||
_rate: &mut f32,
|
||||
s_a: &SkeletonAttr,
|
||||
|
@ -26,7 +26,7 @@ impl Animation for AlphaAnimation {
|
||||
const UPDATE_FN: &'static [u8] = b"biped_large_alpha\0";
|
||||
|
||||
#[cfg_attr(feature = "be-dyn-lib", export_name = "biped_large_alpha")]
|
||||
fn update_skeleton_inner<'a>(
|
||||
fn update_skeleton_inner(
|
||||
skeleton: &Self::Skeleton,
|
||||
(
|
||||
(active_tool_kind, active_tool_spec),
|
||||
@ -36,7 +36,7 @@ impl Animation for AlphaAnimation {
|
||||
stage_section,
|
||||
acc_vel,
|
||||
timer,
|
||||
): Self::Dependency<'a>,
|
||||
): Self::Dependency<'_>,
|
||||
anim_time: f32,
|
||||
rate: &mut f32,
|
||||
s_a: &SkeletonAttr,
|
||||
|
@ -26,7 +26,7 @@ impl Animation for BeamAnimation {
|
||||
const UPDATE_FN: &'static [u8] = b"biped_large_beam\0";
|
||||
|
||||
#[cfg_attr(feature = "be-dyn-lib", export_name = "biped_large_beam")]
|
||||
fn update_skeleton_inner<'a>(
|
||||
fn update_skeleton_inner(
|
||||
skeleton: &Self::Skeleton,
|
||||
(
|
||||
(active_tool_kind, active_tool_spec),
|
||||
@ -36,7 +36,7 @@ impl Animation for BeamAnimation {
|
||||
stage_section,
|
||||
acc_vel,
|
||||
timer,
|
||||
): Self::Dependency<'a>,
|
||||
): Self::Dependency<'_>,
|
||||
anim_time: f32,
|
||||
rate: &mut f32,
|
||||
s_a: &SkeletonAttr,
|
||||
|
@ -25,7 +25,7 @@ impl Animation for BetaAnimation {
|
||||
const UPDATE_FN: &'static [u8] = b"biped_large_beta\0";
|
||||
|
||||
#[cfg_attr(feature = "be-dyn-lib", export_name = "biped_large_beta")]
|
||||
fn update_skeleton_inner<'a>(
|
||||
fn update_skeleton_inner(
|
||||
skeleton: &Self::Skeleton,
|
||||
(
|
||||
(active_tool_kind, active_tool_spec),
|
||||
@ -34,7 +34,7 @@ impl Animation for BetaAnimation {
|
||||
_global_time,
|
||||
stage_section,
|
||||
acc_vel,
|
||||
): Self::Dependency<'a>,
|
||||
): Self::Dependency<'_>,
|
||||
anim_time: f32,
|
||||
rate: &mut f32,
|
||||
s_a: &SkeletonAttr,
|
||||
|
@ -22,9 +22,9 @@ impl Animation for BlinkAnimation {
|
||||
const UPDATE_FN: &'static [u8] = b"biped_large_blink\0";
|
||||
|
||||
#[cfg_attr(feature = "be-dyn-lib", export_name = "biped_large_blink")]
|
||||
fn update_skeleton_inner<'a>(
|
||||
fn update_skeleton_inner(
|
||||
skeleton: &Self::Skeleton,
|
||||
(active_tool_kind, _second_tool_kind, velocity, _global_time, stage_section, acc_vel): Self::Dependency<'a>,
|
||||
(active_tool_kind, _second_tool_kind, velocity, _global_time, stage_section, acc_vel): Self::Dependency<'_>,
|
||||
anim_time: f32,
|
||||
rate: &mut f32,
|
||||
s_a: &SkeletonAttr,
|
||||
|
@ -22,9 +22,9 @@ impl Animation for ChargeAnimation {
|
||||
const UPDATE_FN: &'static [u8] = b"biped_large_charge\0";
|
||||
|
||||
#[cfg_attr(feature = "be-dyn-lib", export_name = "biped_large_charge")]
|
||||
fn update_skeleton_inner<'a>(
|
||||
fn update_skeleton_inner(
|
||||
skeleton: &Self::Skeleton,
|
||||
(active_tool_kind, _second_tool_kind, velocity, orientation, last_ori, _global_time): Self::Dependency<'a>,
|
||||
(active_tool_kind, _second_tool_kind, velocity, orientation, last_ori, _global_time): Self::Dependency<'_>,
|
||||
anim_time: f32,
|
||||
_rate: &mut f32,
|
||||
s_a: &SkeletonAttr,
|
||||
|
@ -25,7 +25,7 @@ impl Animation for ChargeMeleeAnimation {
|
||||
const UPDATE_FN: &'static [u8] = b"biped_large_chargemelee\0";
|
||||
|
||||
#[cfg_attr(feature = "be-dyn-lib", export_name = "biped_large_chargemelee")]
|
||||
fn update_skeleton_inner<'a>(
|
||||
fn update_skeleton_inner(
|
||||
skeleton: &Self::Skeleton,
|
||||
(
|
||||
(active_tool_kind, active_tool_spec),
|
||||
@ -34,7 +34,7 @@ impl Animation for ChargeMeleeAnimation {
|
||||
_global_time,
|
||||
stage_section,
|
||||
acc_vel,
|
||||
): Self::Dependency<'a>,
|
||||
): Self::Dependency<'_>,
|
||||
anim_time: f32,
|
||||
rate: &mut f32,
|
||||
s_a: &SkeletonAttr,
|
||||
|
@ -25,7 +25,7 @@ impl Animation for DashAnimation {
|
||||
const UPDATE_FN: &'static [u8] = b"biped_large_dash\0";
|
||||
|
||||
#[cfg_attr(feature = "be-dyn-lib", export_name = "biped_large_dash")]
|
||||
fn update_skeleton_inner<'a>(
|
||||
fn update_skeleton_inner(
|
||||
skeleton: &Self::Skeleton,
|
||||
(
|
||||
(active_tool_kind, active_tool_spec),
|
||||
@ -34,7 +34,7 @@ impl Animation for DashAnimation {
|
||||
_global_time,
|
||||
stage_section,
|
||||
acc_vel,
|
||||
): Self::Dependency<'a>,
|
||||
): Self::Dependency<'_>,
|
||||
anim_time: f32,
|
||||
rate: &mut f32,
|
||||
s_a: &SkeletonAttr,
|
||||
|
@ -15,9 +15,9 @@ impl Animation for EquipAnimation {
|
||||
const UPDATE_FN: &'static [u8] = b"biped_large_equip\0";
|
||||
|
||||
#[cfg_attr(feature = "be-dyn-lib", export_name = "biped_large_equip")]
|
||||
fn update_skeleton_inner<'a>(
|
||||
fn update_skeleton_inner(
|
||||
skeleton: &Self::Skeleton,
|
||||
(active_tool_kind, _second_tool_kind, _velocity, _global_time): Self::Dependency<'a>,
|
||||
(active_tool_kind, _second_tool_kind, _velocity, _global_time): Self::Dependency<'_>,
|
||||
anim_time: f32,
|
||||
rate: &mut f32,
|
||||
_s_a: &SkeletonAttr,
|
||||
|
@ -15,9 +15,9 @@ impl Animation for IdleAnimation {
|
||||
const UPDATE_FN: &'static [u8] = b"biped_large_idle\0";
|
||||
|
||||
#[cfg_attr(feature = "be-dyn-lib", export_name = "biped_large_idle")]
|
||||
fn update_skeleton_inner<'a>(
|
||||
fn update_skeleton_inner(
|
||||
skeleton: &Self::Skeleton,
|
||||
(active_tool_kind, _second_tool_kind, global_time): Self::Dependency<'a>,
|
||||
(active_tool_kind, _second_tool_kind, global_time): Self::Dependency<'_>,
|
||||
anim_time: f32,
|
||||
_rate: &mut f32,
|
||||
s_a: &SkeletonAttr,
|
||||
|
@ -15,9 +15,9 @@ impl Animation for JumpAnimation {
|
||||
const UPDATE_FN: &'static [u8] = b"biped_large_jump\0";
|
||||
|
||||
#[cfg_attr(feature = "be-dyn-lib", export_name = "biped_large_jump")]
|
||||
fn update_skeleton_inner<'a>(
|
||||
fn update_skeleton_inner(
|
||||
skeleton: &Self::Skeleton,
|
||||
(active_tool_kind, _second_tool_kind, _global_time): Self::Dependency<'a>,
|
||||
(active_tool_kind, _second_tool_kind, _global_time): Self::Dependency<'_>,
|
||||
anim_time: f32,
|
||||
_rate: &mut f32,
|
||||
s_a: &SkeletonAttr,
|
||||
|
@ -21,9 +21,9 @@ impl Animation for LeapAnimation {
|
||||
const UPDATE_FN: &'static [u8] = b"biped_large_leapmelee\0";
|
||||
|
||||
#[cfg_attr(feature = "be-dyn-lib", export_name = "biped_large_leapmelee")]
|
||||
fn update_skeleton_inner<'a>(
|
||||
fn update_skeleton_inner(
|
||||
skeleton: &Self::Skeleton,
|
||||
(active_tool_kind, _second_tool_kind, _velocity, _global_time, stage_section): Self::Dependency<'a>,
|
||||
(active_tool_kind, _second_tool_kind, _velocity, _global_time, stage_section): Self::Dependency<'_>,
|
||||
anim_time: f32,
|
||||
rate: &mut f32,
|
||||
s_a: &SkeletonAttr,
|
||||
|
@ -25,7 +25,7 @@ impl Animation for RunAnimation {
|
||||
const UPDATE_FN: &'static [u8] = b"biped_large_run\0";
|
||||
|
||||
#[cfg_attr(feature = "be-dyn-lib", export_name = "biped_large_run")]
|
||||
fn update_skeleton_inner<'a>(
|
||||
fn update_skeleton_inner(
|
||||
skeleton: &Self::Skeleton,
|
||||
(
|
||||
active_tool_kind,
|
||||
@ -36,7 +36,7 @@ impl Animation for RunAnimation {
|
||||
global_time,
|
||||
avg_vel,
|
||||
acc_vel,
|
||||
): Self::Dependency<'a>,
|
||||
): Self::Dependency<'_>,
|
||||
anim_time: f32,
|
||||
rate: &mut f32,
|
||||
s_a: &SkeletonAttr,
|
||||
@ -127,8 +127,7 @@ impl Animation for RunAnimation {
|
||||
|
||||
let side = ((velocity.x * -0.098 * orientation.y + velocity.y * 0.098 * orientation.x)
|
||||
* -1.0)
|
||||
.min(1.0)
|
||||
.max(-1.0);
|
||||
.clamp(-1.0, 1.0);
|
||||
let sideabs = side.abs();
|
||||
let x_tilt = avg_vel.z.atan2(avg_vel.xy().magnitude());
|
||||
|
||||
|
@ -25,7 +25,7 @@ impl Animation for SelfBuffAnimation {
|
||||
const UPDATE_FN: &'static [u8] = b"biped_large_selfbuff\0";
|
||||
|
||||
#[cfg_attr(feature = "be-dyn-lib", export_name = "biped_large_selfbuff")]
|
||||
fn update_skeleton_inner<'a>(
|
||||
fn update_skeleton_inner(
|
||||
skeleton: &Self::Skeleton,
|
||||
(
|
||||
(active_tool_kind, active_tool_spec),
|
||||
@ -34,7 +34,7 @@ impl Animation for SelfBuffAnimation {
|
||||
_global_time,
|
||||
stage_section,
|
||||
acc_vel,
|
||||
): Self::Dependency<'a>,
|
||||
): Self::Dependency<'_>,
|
||||
anim_time: f32,
|
||||
rate: &mut f32,
|
||||
s_a: &SkeletonAttr,
|
||||
|
@ -26,7 +26,7 @@ impl Animation for ShockwaveAnimation {
|
||||
|
||||
#[cfg_attr(feature = "be-dyn-lib", export_name = "biped_large_shockwave")]
|
||||
#[allow(clippy::single_match)] // TODO: Pending review in #587
|
||||
fn update_skeleton_inner<'a>(
|
||||
fn update_skeleton_inner(
|
||||
skeleton: &Self::Skeleton,
|
||||
(
|
||||
(active_tool_kind, active_tool_spec),
|
||||
@ -34,7 +34,7 @@ impl Animation for ShockwaveAnimation {
|
||||
_global_time,
|
||||
velocity,
|
||||
stage_section,
|
||||
): Self::Dependency<'a>,
|
||||
): Self::Dependency<'_>,
|
||||
anim_time: f32,
|
||||
rate: &mut f32,
|
||||
s_a: &SkeletonAttr,
|
||||
@ -43,7 +43,7 @@ impl Animation for ShockwaveAnimation {
|
||||
let mut next = (*skeleton).clone();
|
||||
|
||||
let (move1, move1pow, move2, move3) = match stage_section {
|
||||
Some(StageSection::Buildup) => (anim_time, anim_time.powf(0.25) as f32, 0.0, 0.0),
|
||||
Some(StageSection::Buildup) => (anim_time, anim_time.powf(0.25), 0.0, 0.0),
|
||||
Some(StageSection::Action) => (1.0, 1.0, anim_time, 0.0),
|
||||
Some(StageSection::Recover) => (1.0, 1.0, 1.0, anim_time),
|
||||
_ => (0.0, 0.0, 0.0, 0.0),
|
||||
|
@ -28,7 +28,7 @@ impl Animation for ShootAnimation {
|
||||
const UPDATE_FN: &'static [u8] = b"biped_large_shoot\0";
|
||||
|
||||
#[cfg_attr(feature = "be-dyn-lib", export_name = "biped_large_shoot")]
|
||||
fn update_skeleton_inner<'a>(
|
||||
fn update_skeleton_inner(
|
||||
skeleton: &Self::Skeleton,
|
||||
(
|
||||
(active_tool_kind, active_tool_spec),
|
||||
@ -39,7 +39,7 @@ impl Animation for ShootAnimation {
|
||||
_global_time,
|
||||
stage_section,
|
||||
acc_vel,
|
||||
): Self::Dependency<'a>,
|
||||
): Self::Dependency<'_>,
|
||||
anim_time: f32,
|
||||
rate: &mut f32,
|
||||
s_a: &SkeletonAttr,
|
||||
|
@ -20,9 +20,9 @@ impl Animation for SpinAnimation {
|
||||
const UPDATE_FN: &'static [u8] = b"biped_large_spin\0";
|
||||
|
||||
#[cfg_attr(feature = "be-dyn-lib", export_name = "biped_large_spin")]
|
||||
fn update_skeleton_inner<'a>(
|
||||
fn update_skeleton_inner(
|
||||
skeleton: &Self::Skeleton,
|
||||
(active_tool_kind, _second_tool_kind, _global_time, stage_section): Self::Dependency<'a>,
|
||||
(active_tool_kind, _second_tool_kind, _global_time, stage_section): Self::Dependency<'_>,
|
||||
anim_time: f32,
|
||||
rate: &mut f32,
|
||||
s_a: &SkeletonAttr,
|
||||
|
@ -22,9 +22,9 @@ impl Animation for SpinMeleeAnimation {
|
||||
const UPDATE_FN: &'static [u8] = b"biped_large_spinmelee\0";
|
||||
|
||||
#[cfg_attr(feature = "be-dyn-lib", export_name = "biped_large_spinmelee")]
|
||||
fn update_skeleton_inner<'a>(
|
||||
fn update_skeleton_inner(
|
||||
skeleton: &Self::Skeleton,
|
||||
(active_tool_kind, _second_tool_kind, velocity, _global_time, stage_section, acc_vel): Self::Dependency<'a>,
|
||||
(active_tool_kind, _second_tool_kind, velocity, _global_time, stage_section, acc_vel): Self::Dependency<'_>,
|
||||
anim_time: f32,
|
||||
rate: &mut f32,
|
||||
s_a: &SkeletonAttr,
|
||||
|
@ -26,7 +26,7 @@ impl Animation for SpriteSummonAnimation {
|
||||
|
||||
#[cfg_attr(feature = "be-dyn-lib", export_name = "biped_large_sprite_summon")]
|
||||
#[allow(clippy::single_match)] // TODO: Pending review in #587
|
||||
fn update_skeleton_inner<'a>(
|
||||
fn update_skeleton_inner(
|
||||
skeleton: &Self::Skeleton,
|
||||
(
|
||||
(active_tool_kind, active_tool_spec),
|
||||
@ -34,7 +34,7 @@ impl Animation for SpriteSummonAnimation {
|
||||
_global_time,
|
||||
velocity,
|
||||
stage_section,
|
||||
): Self::Dependency<'a>,
|
||||
): Self::Dependency<'_>,
|
||||
anim_time: f32,
|
||||
rate: &mut f32,
|
||||
s_a: &SkeletonAttr,
|
||||
|
@ -23,10 +23,10 @@ impl Animation for StunnedAnimation {
|
||||
const UPDATE_FN: &'static [u8] = b"biped_large_stunned\0";
|
||||
|
||||
#[cfg_attr(feature = "be-dyn-lib", export_name = "biped_large_stunned")]
|
||||
fn update_skeleton_inner<'a>(
|
||||
fn update_skeleton_inner(
|
||||
skeleton: &Self::Skeleton,
|
||||
((active_tool_kind, active_tool_spec), velocity, acc_vel, stage_section): Self::Dependency<
|
||||
'a,
|
||||
'_,
|
||||
>,
|
||||
anim_time: f32,
|
||||
_rate: &mut f32,
|
||||
|
@ -25,7 +25,7 @@ impl Animation for SummonAnimation {
|
||||
const UPDATE_FN: &'static [u8] = b"biped_large_summon\0";
|
||||
|
||||
#[cfg_attr(feature = "be-dyn-lib", export_name = "biped_large_summon")]
|
||||
fn update_skeleton_inner<'a>(
|
||||
fn update_skeleton_inner(
|
||||
skeleton: &Self::Skeleton,
|
||||
(
|
||||
(active_tool_kind, active_tool_spec),
|
||||
@ -34,7 +34,7 @@ impl Animation for SummonAnimation {
|
||||
_global_time,
|
||||
stage_section,
|
||||
acc_vel,
|
||||
): Self::Dependency<'a>,
|
||||
): Self::Dependency<'_>,
|
||||
anim_time: f32,
|
||||
rate: &mut f32,
|
||||
s_a: &SkeletonAttr,
|
||||
|
@ -21,9 +21,9 @@ impl Animation for WieldAnimation {
|
||||
const UPDATE_FN: &'static [u8] = b"biped_large_wield\0";
|
||||
|
||||
#[cfg_attr(feature = "be-dyn-lib", export_name = "biped_large_wield")]
|
||||
fn update_skeleton_inner<'a>(
|
||||
fn update_skeleton_inner(
|
||||
skeleton: &Self::Skeleton,
|
||||
((active_tool_kind, active_tool_spec), _second_tool, velocity, global_time, acc_vel): Self::Dependency<'a>,
|
||||
((active_tool_kind, active_tool_spec), _second_tool, velocity, global_time, acc_vel): Self::Dependency<'_>,
|
||||
anim_time: f32,
|
||||
_rate: &mut f32,
|
||||
s_a: &SkeletonAttr,
|
||||
|
@ -28,7 +28,7 @@ impl Animation for AlphaAnimation {
|
||||
|
||||
#[cfg_attr(feature = "be-dyn-lib", export_name = "biped_small_alpha")]
|
||||
|
||||
fn update_skeleton_inner<'a>(
|
||||
fn update_skeleton_inner(
|
||||
skeleton: &Self::Skeleton,
|
||||
(
|
||||
active_tool_kind,
|
||||
@ -40,7 +40,7 @@ impl Animation for AlphaAnimation {
|
||||
_acc_vel,
|
||||
stage_section,
|
||||
timer,
|
||||
): Self::Dependency<'a>,
|
||||
): Self::Dependency<'_>,
|
||||
anim_time: f32,
|
||||
_rate: &mut f32,
|
||||
s_a: &SkeletonAttr,
|
||||
|
@ -28,7 +28,7 @@ impl Animation for BeamAnimation {
|
||||
|
||||
#[cfg_attr(feature = "be-dyn-lib", export_name = "biped_small_beam")]
|
||||
|
||||
fn update_skeleton_inner<'a>(
|
||||
fn update_skeleton_inner(
|
||||
skeleton: &Self::Skeleton,
|
||||
(
|
||||
_active_tool_kind,
|
||||
@ -40,7 +40,7 @@ impl Animation for BeamAnimation {
|
||||
_acc_vel,
|
||||
stage_section,
|
||||
_timer,
|
||||
): Self::Dependency<'a>,
|
||||
): Self::Dependency<'_>,
|
||||
anim_time: f32,
|
||||
_rate: &mut f32,
|
||||
s_a: &SkeletonAttr,
|
||||
|
@ -27,7 +27,7 @@ impl Animation for DashAnimation {
|
||||
|
||||
#[cfg_attr(feature = "be-dyn-lib", export_name = "biped_small_dash")]
|
||||
|
||||
fn update_skeleton_inner<'a>(
|
||||
fn update_skeleton_inner(
|
||||
skeleton: &Self::Skeleton,
|
||||
(
|
||||
velocity,
|
||||
@ -38,7 +38,7 @@ impl Animation for DashAnimation {
|
||||
_acc_vel,
|
||||
stage_section,
|
||||
_timer,
|
||||
): Self::Dependency<'a>,
|
||||
): Self::Dependency<'_>,
|
||||
anim_time: f32,
|
||||
_rate: &mut f32,
|
||||
s_a: &SkeletonAttr,
|
||||
|
@ -17,9 +17,9 @@ impl Animation for IdleAnimation {
|
||||
|
||||
#[cfg_attr(feature = "be-dyn-lib", export_name = "biped_small_idle")]
|
||||
|
||||
fn update_skeleton_inner<'a>(
|
||||
fn update_skeleton_inner(
|
||||
skeleton: &Self::Skeleton,
|
||||
(_velocity, _orientation, _last_ori, _global_time, _avg_vel): Self::Dependency<'a>,
|
||||
(_velocity, _orientation, _last_ori, _global_time, _avg_vel): Self::Dependency<'_>,
|
||||
anim_time: f32,
|
||||
_rate: &mut f32,
|
||||
s_a: &SkeletonAttr,
|
||||
|
@ -17,9 +17,9 @@ impl Animation for RunAnimation {
|
||||
|
||||
#[cfg_attr(feature = "be-dyn-lib", export_name = "biped_small_run")]
|
||||
|
||||
fn update_skeleton_inner<'a>(
|
||||
fn update_skeleton_inner(
|
||||
skeleton: &Self::Skeleton,
|
||||
(velocity, orientation, last_ori, global_time, _avg_vel, acc_vel): Self::Dependency<'a>,
|
||||
(velocity, orientation, last_ori, global_time, _avg_vel, acc_vel): Self::Dependency<'_>,
|
||||
anim_time: f32,
|
||||
rate: &mut f32,
|
||||
s_a: &SkeletonAttr,
|
||||
|
@ -28,7 +28,7 @@ impl Animation for ShockwaveAnimation {
|
||||
|
||||
#[cfg_attr(feature = "be-dyn-lib", export_name = "biped_small_shockwave")]
|
||||
|
||||
fn update_skeleton_inner<'a>(
|
||||
fn update_skeleton_inner(
|
||||
skeleton: &Self::Skeleton,
|
||||
(
|
||||
active_tool_kind,
|
||||
@ -40,7 +40,7 @@ impl Animation for ShockwaveAnimation {
|
||||
_acc_vel,
|
||||
stage_section,
|
||||
timer,
|
||||
): Self::Dependency<'a>,
|
||||
): Self::Dependency<'_>,
|
||||
anim_time: f32,
|
||||
_rate: &mut f32,
|
||||
s_a: &SkeletonAttr,
|
||||
|
@ -28,7 +28,7 @@ impl Animation for ShootAnimation {
|
||||
|
||||
#[cfg_attr(feature = "be-dyn-lib", export_name = "biped_small_shoot")]
|
||||
|
||||
fn update_skeleton_inner<'a>(
|
||||
fn update_skeleton_inner(
|
||||
skeleton: &Self::Skeleton,
|
||||
(
|
||||
active_tool_kind,
|
||||
@ -40,7 +40,7 @@ impl Animation for ShootAnimation {
|
||||
_acc_vel,
|
||||
stage_section,
|
||||
_timer,
|
||||
): Self::Dependency<'a>,
|
||||
): Self::Dependency<'_>,
|
||||
anim_time: f32,
|
||||
_rate: &mut f32,
|
||||
s_a: &SkeletonAttr,
|
||||
|
@ -27,7 +27,7 @@ impl Animation for SpinMeleeAnimation {
|
||||
|
||||
#[cfg_attr(feature = "be-dyn-lib", export_name = "biped_small_spinmelee")]
|
||||
|
||||
fn update_skeleton_inner<'a>(
|
||||
fn update_skeleton_inner(
|
||||
skeleton: &Self::Skeleton,
|
||||
(
|
||||
active_tool_kind,
|
||||
@ -39,7 +39,7 @@ impl Animation for SpinMeleeAnimation {
|
||||
_acc_vel,
|
||||
stage_section,
|
||||
_timer,
|
||||
): Self::Dependency<'a>,
|
||||
): Self::Dependency<'_>,
|
||||
anim_time: f32,
|
||||
_rate: &mut f32,
|
||||
s_a: &SkeletonAttr,
|
||||
|
@ -29,7 +29,7 @@ impl Animation for StunnedAnimation {
|
||||
|
||||
#[cfg_attr(feature = "be-dyn-lib", export_name = "biped_small_stunned")]
|
||||
|
||||
fn update_skeleton_inner<'a>(
|
||||
fn update_skeleton_inner(
|
||||
skeleton: &Self::Skeleton,
|
||||
(
|
||||
active_tool_kind,
|
||||
@ -42,7 +42,7 @@ impl Animation for StunnedAnimation {
|
||||
wield_status,
|
||||
stage_section,
|
||||
timer,
|
||||
): Self::Dependency<'a>,
|
||||
): Self::Dependency<'_>,
|
||||
anim_time: f32,
|
||||
_rate: &mut f32,
|
||||
s_a: &SkeletonAttr,
|
||||
|
@ -28,7 +28,7 @@ impl Animation for SummonAnimation {
|
||||
|
||||
#[cfg_attr(feature = "be-dyn-lib", export_name = "biped_small_summon")]
|
||||
|
||||
fn update_skeleton_inner<'a>(
|
||||
fn update_skeleton_inner(
|
||||
skeleton: &Self::Skeleton,
|
||||
(
|
||||
active_tool_kind,
|
||||
@ -40,7 +40,7 @@ impl Animation for SummonAnimation {
|
||||
_acc_vel,
|
||||
stage_section,
|
||||
timer,
|
||||
): Self::Dependency<'a>,
|
||||
): Self::Dependency<'_>,
|
||||
anim_time: f32,
|
||||
_rate: &mut f32,
|
||||
s_a: &SkeletonAttr,
|
||||
|
@ -26,9 +26,9 @@ impl Animation for WieldAnimation {
|
||||
|
||||
#[cfg_attr(feature = "be-dyn-lib", export_name = "biped_small_wield")]
|
||||
|
||||
fn update_skeleton_inner<'a>(
|
||||
fn update_skeleton_inner(
|
||||
skeleton: &Self::Skeleton,
|
||||
(active_tool_kind, velocity, _orientation, _last_ori, _global_time, _avg_vel, acc_vel): Self::Dependency<'a>,
|
||||
(active_tool_kind, velocity, _orientation, _last_ori, _global_time, _avg_vel, acc_vel): Self::Dependency<'_>,
|
||||
anim_time: f32,
|
||||
_rate: &mut f32,
|
||||
s_a: &SkeletonAttr,
|
||||
|
@ -14,9 +14,9 @@ impl Animation for AlphaAnimation {
|
||||
const UPDATE_FN: &'static [u8] = b"bird_large_alpha\0";
|
||||
|
||||
#[cfg_attr(feature = "be-dyn-lib", export_name = "bird_large_alpha")]
|
||||
fn update_skeleton_inner<'a>(
|
||||
fn update_skeleton_inner(
|
||||
skeleton: &Self::Skeleton,
|
||||
(stage_section, global_time, timer, orientation, last_ori, on_ground): Self::Dependency<'a>,
|
||||
(stage_section, global_time, timer, orientation, last_ori, on_ground): Self::Dependency<'_>,
|
||||
anim_time: f32,
|
||||
_rate: &mut f32,
|
||||
s_a: &SkeletonAttr,
|
||||
|
@ -25,9 +25,9 @@ impl Animation for BreatheAnimation {
|
||||
const UPDATE_FN: &'static [u8] = b"bird_large_breathe\0";
|
||||
|
||||
#[cfg_attr(feature = "be-dyn-lib", export_name = "bird_large_breathe")]
|
||||
fn update_skeleton_inner<'a>(
|
||||
fn update_skeleton_inner(
|
||||
skeleton: &Self::Skeleton,
|
||||
(velocity,global_time, _orientation, _last_ori, stage_section, timer, look_dir, on_ground): Self::Dependency<'a>,
|
||||
(velocity,global_time, _orientation, _last_ori, stage_section, timer, look_dir, on_ground): Self::Dependency<'_>,
|
||||
anim_time: f32,
|
||||
_rate: &mut f32,
|
||||
s_a: &SkeletonAttr,
|
||||
|
@ -24,9 +24,9 @@ impl Animation for DashAnimation {
|
||||
const UPDATE_FN: &'static [u8] = b"bird_large_dash\0";
|
||||
|
||||
#[cfg_attr(feature = "be-dyn-lib", export_name = "bird_large_dash")]
|
||||
fn update_skeleton_inner<'a>(
|
||||
fn update_skeleton_inner(
|
||||
skeleton: &Self::Skeleton,
|
||||
(velocity, orientation, last_ori, acc_vel, stage_section, global_time, timer): Self::Dependency<'a>,
|
||||
(velocity, orientation, last_ori, acc_vel, stage_section, global_time, timer): Self::Dependency<'_>,
|
||||
anim_time: f32,
|
||||
rate: &mut f32,
|
||||
s_a: &SkeletonAttr,
|
||||
|
@ -14,9 +14,9 @@ impl Animation for FeedAnimation {
|
||||
const UPDATE_FN: &'static [u8] = b"bird_large_feed\0";
|
||||
|
||||
#[cfg_attr(feature = "be-dyn-lib", export_name = "bird_large_feed")]
|
||||
fn update_skeleton_inner<'a>(
|
||||
fn update_skeleton_inner(
|
||||
skeleton: &Self::Skeleton,
|
||||
global_time: Self::Dependency<'a>,
|
||||
global_time: Self::Dependency<'_>,
|
||||
anim_time: f32,
|
||||
_rate: &mut f32,
|
||||
s_a: &SkeletonAttr,
|
||||
|
@ -13,9 +13,9 @@ impl Animation for FlyAnimation {
|
||||
const UPDATE_FN: &'static [u8] = b"bird_large_fly\0";
|
||||
|
||||
#[cfg_attr(feature = "be-dyn-lib", export_name = "bird_large_fly")]
|
||||
fn update_skeleton_inner<'a>(
|
||||
fn update_skeleton_inner(
|
||||
skeleton: &Self::Skeleton,
|
||||
(velocity, orientation, last_ori): Self::Dependency<'a>,
|
||||
(velocity, orientation, last_ori): Self::Dependency<'_>,
|
||||
anim_time: f32,
|
||||
_rate: &mut f32,
|
||||
s_a: &SkeletonAttr,
|
||||
|
@ -14,9 +14,9 @@ impl Animation for IdleAnimation {
|
||||
const UPDATE_FN: &'static [u8] = b"bird_large_idle\0";
|
||||
|
||||
#[cfg_attr(feature = "be-dyn-lib", export_name = "bird_large_idle")]
|
||||
fn update_skeleton_inner<'a>(
|
||||
fn update_skeleton_inner(
|
||||
skeleton: &Self::Skeleton,
|
||||
global_time: Self::Dependency<'a>,
|
||||
global_time: Self::Dependency<'_>,
|
||||
anim_time: f32,
|
||||
_rate: &mut f32,
|
||||
s_a: &SkeletonAttr,
|
||||
|
@ -14,9 +14,9 @@ impl Animation for RunAnimation {
|
||||
const UPDATE_FN: &'static [u8] = b"bird_large_run\0";
|
||||
|
||||
#[cfg_attr(feature = "be-dyn-lib", export_name = "bird_large_run")]
|
||||
fn update_skeleton_inner<'a>(
|
||||
fn update_skeleton_inner(
|
||||
skeleton: &Self::Skeleton,
|
||||
(velocity, orientation, last_ori, avg_vel, acc_vel): Self::Dependency<'a>,
|
||||
(velocity, orientation, last_ori, avg_vel, acc_vel): Self::Dependency<'_>,
|
||||
anim_time: f32,
|
||||
rate: &mut f32,
|
||||
s_a: &SkeletonAttr,
|
||||
|
@ -14,9 +14,9 @@ impl Animation for ShockwaveAnimation {
|
||||
const UPDATE_FN: &'static [u8] = b"bird_large_shockwave\0";
|
||||
|
||||
#[cfg_attr(feature = "be-dyn-lib", export_name = "bird_large_shockwave")]
|
||||
fn update_skeleton_inner<'a>(
|
||||
fn update_skeleton_inner(
|
||||
skeleton: &Self::Skeleton,
|
||||
(stage_section, on_ground): Self::Dependency<'a>,
|
||||
(stage_section, on_ground): Self::Dependency<'_>,
|
||||
anim_time: f32,
|
||||
_rate: &mut f32,
|
||||
s_a: &SkeletonAttr,
|
||||
|
@ -16,9 +16,9 @@ impl Animation for ShootAnimation {
|
||||
const UPDATE_FN: &'static [u8] = b"bird_large_shoot\0";
|
||||
|
||||
#[cfg_attr(feature = "be-dyn-lib", export_name = "bird_large_shoot")]
|
||||
fn update_skeleton_inner<'a>(
|
||||
fn update_skeleton_inner(
|
||||
skeleton: &Self::Skeleton,
|
||||
(velocity, global_time, stage_section, timer, look_dir, on_ground): Self::Dependency<'a>,
|
||||
(velocity, global_time, stage_section, timer, look_dir, on_ground): Self::Dependency<'_>,
|
||||
anim_time: f32,
|
||||
_rate: &mut f32,
|
||||
s_a: &SkeletonAttr,
|
||||
|
@ -14,9 +14,9 @@ impl Animation for StunnedAnimation {
|
||||
const UPDATE_FN: &'static [u8] = b"bird_large_stunned\0";
|
||||
|
||||
#[cfg_attr(feature = "be-dyn-lib", export_name = "bird_large_stunned")]
|
||||
fn update_skeleton_inner<'a>(
|
||||
fn update_skeleton_inner(
|
||||
skeleton: &Self::Skeleton,
|
||||
(global_time, stage_section, timer): Self::Dependency<'a>,
|
||||
(global_time, stage_section, timer): Self::Dependency<'_>,
|
||||
anim_time: f32,
|
||||
_rate: &mut f32,
|
||||
s_a: &SkeletonAttr,
|
||||
|
@ -16,9 +16,9 @@ impl Animation for SummonAnimation {
|
||||
const UPDATE_FN: &'static [u8] = b"bird_large_summon\0";
|
||||
|
||||
#[cfg_attr(feature = "be-dyn-lib", export_name = "bird_large_summon")]
|
||||
fn update_skeleton_inner<'a>(
|
||||
fn update_skeleton_inner(
|
||||
skeleton: &Self::Skeleton,
|
||||
(global_time, stage_section, timer, look_dir, on_ground): Self::Dependency<'a>,
|
||||
(global_time, stage_section, timer, look_dir, on_ground): Self::Dependency<'_>,
|
||||
anim_time: f32,
|
||||
rate: &mut f32,
|
||||
s_a: &SkeletonAttr,
|
||||
|
@ -14,9 +14,9 @@ impl Animation for SwimAnimation {
|
||||
const UPDATE_FN: &'static [u8] = b"bird_large_swim\0";
|
||||
|
||||
#[cfg_attr(feature = "be-dyn-lib", export_name = "bird_large_swim")]
|
||||
fn update_skeleton_inner<'a>(
|
||||
fn update_skeleton_inner(
|
||||
skeleton: &Self::Skeleton,
|
||||
global_time: Self::Dependency<'a>,
|
||||
global_time: Self::Dependency<'_>,
|
||||
anim_time: f32,
|
||||
_rate: &mut f32,
|
||||
s_a: &SkeletonAttr,
|
||||
|
@ -15,9 +15,9 @@ impl Animation for FeedAnimation {
|
||||
|
||||
#[cfg_attr(feature = "be-dyn-lib", export_name = "bird_medium_feed")]
|
||||
|
||||
fn update_skeleton_inner<'a>(
|
||||
fn update_skeleton_inner(
|
||||
skeleton: &Self::Skeleton,
|
||||
global_time: Self::Dependency<'a>,
|
||||
global_time: Self::Dependency<'_>,
|
||||
anim_time: f32,
|
||||
_rate: &mut f32,
|
||||
s_a: &SkeletonAttr,
|
||||
|
@ -14,9 +14,9 @@ impl Animation for FlyAnimation {
|
||||
const UPDATE_FN: &'static [u8] = b"bird_medium_fly\0";
|
||||
|
||||
#[cfg_attr(feature = "be-dyn-lib", export_name = "bird_medium_fly")]
|
||||
fn update_skeleton_inner<'a>(
|
||||
fn update_skeleton_inner(
|
||||
skeleton: &Self::Skeleton,
|
||||
_global_time: Self::Dependency<'a>,
|
||||
_global_time: Self::Dependency<'_>,
|
||||
anim_time: f32,
|
||||
_rate: &mut f32,
|
||||
s_a: &SkeletonAttr,
|
||||
|
@ -15,9 +15,9 @@ impl Animation for IdleAnimation {
|
||||
|
||||
#[cfg_attr(feature = "be-dyn-lib", export_name = "bird_medium_idle")]
|
||||
|
||||
fn update_skeleton_inner<'a>(
|
||||
fn update_skeleton_inner(
|
||||
skeleton: &Self::Skeleton,
|
||||
global_time: Self::Dependency<'a>,
|
||||
global_time: Self::Dependency<'_>,
|
||||
anim_time: f32,
|
||||
_rate: &mut f32,
|
||||
s_a: &SkeletonAttr,
|
||||
|
@ -14,9 +14,9 @@ impl Animation for RunAnimation {
|
||||
const UPDATE_FN: &'static [u8] = b"bird_medium_run\0";
|
||||
|
||||
#[cfg_attr(feature = "be-dyn-lib", export_name = "bird_medium_run")]
|
||||
fn update_skeleton_inner<'a>(
|
||||
fn update_skeleton_inner(
|
||||
skeleton: &Self::Skeleton,
|
||||
(_velocity, _global_time): Self::Dependency<'a>,
|
||||
(_velocity, _global_time): Self::Dependency<'_>,
|
||||
anim_time: f32,
|
||||
_rate: &mut f32,
|
||||
s_a: &SkeletonAttr,
|
||||
|
@ -23,9 +23,9 @@ impl Animation for AlphaAnimation {
|
||||
const UPDATE_FN: &'static [u8] = b"character_alpha\0";
|
||||
|
||||
#[cfg_attr(feature = "be-dyn-lib", export_name = "character_alpha")]
|
||||
fn update_skeleton_inner<'a>(
|
||||
fn update_skeleton_inner(
|
||||
skeleton: &Self::Skeleton,
|
||||
(hands, stage_section, ability_info): Self::Dependency<'a>,
|
||||
(hands, stage_section, ability_info): Self::Dependency<'_>,
|
||||
anim_time: f32,
|
||||
rate: &mut f32,
|
||||
s_a: &SkeletonAttr,
|
||||
|
@ -24,9 +24,9 @@ impl Animation for BeamAnimation {
|
||||
const UPDATE_FN: &'static [u8] = b"character_beam\0";
|
||||
|
||||
#[cfg_attr(feature = "be-dyn-lib", export_name = "character_beam")]
|
||||
fn update_skeleton_inner<'a>(
|
||||
fn update_skeleton_inner(
|
||||
skeleton: &Self::Skeleton,
|
||||
(ability_info, hands, _global_time, velocity, stage_section): Self::Dependency<'a>,
|
||||
(ability_info, hands, _global_time, velocity, stage_section): Self::Dependency<'_>,
|
||||
anim_time: f32,
|
||||
rate: &mut f32,
|
||||
s_a: &SkeletonAttr,
|
||||
|
@ -24,10 +24,10 @@ impl Animation for BetaAnimation {
|
||||
const UPDATE_FN: &'static [u8] = b"character_beta\0";
|
||||
|
||||
#[cfg_attr(feature = "be-dyn-lib", export_name = "character_beta")]
|
||||
fn update_skeleton_inner<'a>(
|
||||
fn update_skeleton_inner(
|
||||
skeleton: &Self::Skeleton,
|
||||
(hands, _ability_id, _velocity, _global_time, stage_section, ability_info): Self::Dependency<
|
||||
'a,
|
||||
'_,
|
||||
>,
|
||||
anim_time: f32,
|
||||
rate: &mut f32,
|
||||
|
@ -27,7 +27,7 @@ impl Animation for BlockAnimation {
|
||||
const UPDATE_FN: &'static [u8] = b"character_block\0";
|
||||
|
||||
#[cfg_attr(feature = "be-dyn-lib", export_name = "character_block")]
|
||||
fn update_skeleton_inner<'a>(
|
||||
fn update_skeleton_inner(
|
||||
skeleton: &Self::Skeleton,
|
||||
(
|
||||
hands,
|
||||
@ -37,7 +37,7 @@ impl Animation for BlockAnimation {
|
||||
ability_id,
|
||||
stage_section,
|
||||
_ability_info,
|
||||
): Self::Dependency<'a>,
|
||||
): Self::Dependency<'_>,
|
||||
anim_time: f32,
|
||||
rate: &mut f32,
|
||||
s_a: &SkeletonAttr,
|
||||
|
@ -25,9 +25,9 @@ impl Animation for ChargeswingAnimation {
|
||||
const UPDATE_FN: &'static [u8] = b"character_chargeswing\0";
|
||||
|
||||
#[cfg_attr(feature = "be-dyn-lib", export_name = "character_chargeswing")]
|
||||
fn update_skeleton_inner<'a>(
|
||||
fn update_skeleton_inner(
|
||||
skeleton: &Self::Skeleton,
|
||||
(hands, ability_id, stage_section, ability_info): Self::Dependency<'a>,
|
||||
(hands, ability_id, stage_section, ability_info): Self::Dependency<'_>,
|
||||
anim_time: f32,
|
||||
rate: &mut f32,
|
||||
s_a: &SkeletonAttr,
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user