mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Remove instance from PoiseChange
This commit is contained in:
parent
da0baa674f
commit
6a355c58f2
@ -55,7 +55,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
- Fixed an issue where the hurt animation would "jump" whenever you lost/gained health.
|
- Fixed an issue where the hurt animation would "jump" whenever you lost/gained health.
|
||||||
- Fixed a bug where, if you dealt any extra damage, such as the extra damage from slashing weapons, the damage would be shown partially.
|
|
||||||
- Fixed a bug where multiple damage sources in the same tick would show up as a singular attack.
|
- Fixed a bug where multiple damage sources in the same tick would show up as a singular attack.
|
||||||
- Fixed an issue where, if the same amount of healing and damage was received in the same tick, nothing would be shown.
|
- Fixed an issue where, if the same amount of healing and damage was received in the same tick, nothing would be shown.
|
||||||
- Fixed bug that would sometimes cause taking a screenshot to panic because a buffer was mapped at the wrong time.
|
- Fixed bug that would sometimes cause taking a screenshot to panic because a buffer was mapped at the wrong time.
|
||||||
|
@ -287,7 +287,6 @@ impl Attack {
|
|||||||
by: attacker.map(|x| x.into()),
|
by: attacker.map(|x| x.into()),
|
||||||
cause: Some(damage.damage.source),
|
cause: Some(damage.damage.source),
|
||||||
time,
|
time,
|
||||||
instance: damage.instance,
|
|
||||||
};
|
};
|
||||||
if change.abs() > Poise::POISE_EPSILON {
|
if change.abs() > Poise::POISE_EPSILON {
|
||||||
// If target is in a stunned state, apply extra poise damage as health
|
// If target is in a stunned state, apply extra poise damage as health
|
||||||
@ -299,6 +298,8 @@ impl Attack {
|
|||||||
amount: health_change,
|
amount: health_change,
|
||||||
by: attacker.map(|x| x.into()),
|
by: attacker.map(|x| x.into()),
|
||||||
cause: Some(damage.damage.source),
|
cause: Some(damage.damage.source),
|
||||||
|
instance: damage.instance,
|
||||||
|
crit: false,
|
||||||
time,
|
time,
|
||||||
};
|
};
|
||||||
emit(ServerEvent::HealthChange {
|
emit(ServerEvent::HealthChange {
|
||||||
@ -379,7 +380,6 @@ impl Attack {
|
|||||||
by: attacker.map(|x| x.into()),
|
by: attacker.map(|x| x.into()),
|
||||||
cause: Some(damage.damage.source),
|
cause: Some(damage.damage.source),
|
||||||
time,
|
time,
|
||||||
instance: rand::random(),
|
|
||||||
};
|
};
|
||||||
emit(ServerEvent::PoiseChange {
|
emit(ServerEvent::PoiseChange {
|
||||||
entity: target.entity,
|
entity: target.entity,
|
||||||
@ -527,7 +527,6 @@ impl Attack {
|
|||||||
by: attacker.map(|x| x.into()),
|
by: attacker.map(|x| x.into()),
|
||||||
cause: Some(attack_source.into()),
|
cause: Some(attack_source.into()),
|
||||||
time,
|
time,
|
||||||
instance: rand::random(),
|
|
||||||
};
|
};
|
||||||
emit(ServerEvent::PoiseChange {
|
emit(ServerEvent::PoiseChange {
|
||||||
entity: target.entity,
|
entity: target.entity,
|
||||||
|
@ -29,8 +29,6 @@ pub struct PoiseChange {
|
|||||||
pub cause: Option<DamageSource>,
|
pub cause: Option<DamageSource>,
|
||||||
/// The time that the poise change occurred at
|
/// The time that the poise change occurred at
|
||||||
pub time: Time,
|
pub time: Time,
|
||||||
/// A random instance number used to group up attacks
|
|
||||||
pub instance: u64,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, Copy, Debug, Serialize, Deserialize)]
|
#[derive(Clone, Copy, Debug, Serialize, Deserialize)]
|
||||||
|
@ -173,7 +173,6 @@ impl<'a> System<'a> for Sys {
|
|||||||
by: None,
|
by: None,
|
||||||
cause: None,
|
cause: None,
|
||||||
time: *read_data.time,
|
time: *read_data.time,
|
||||||
instance: rand::random(),
|
|
||||||
};
|
};
|
||||||
poise.change(poise_change);
|
poise.change(poise_change);
|
||||||
poise.regen_rate = (poise.regen_rate + POISE_REGEN_ACCEL * dt).min(10.0);
|
poise.regen_rate = (poise.regen_rate + POISE_REGEN_ACCEL * dt).min(10.0);
|
||||||
|
@ -617,7 +617,6 @@ pub fn handle_land_on_ground(server: &Server, entity: EcsEntity, vel: Vec3<f32>)
|
|||||||
by: None,
|
by: None,
|
||||||
cause: None,
|
cause: None,
|
||||||
time: *time,
|
time: *time,
|
||||||
instance: rand::random(),
|
|
||||||
};
|
};
|
||||||
poise.change(poise_change);
|
poise.change(poise_change);
|
||||||
}
|
}
|
||||||
|
@ -189,7 +189,6 @@ impl StateExt for State {
|
|||||||
cause: None,
|
cause: None,
|
||||||
by: damage_contributor,
|
by: damage_contributor,
|
||||||
time: *time,
|
time: *time,
|
||||||
instance: rand::random(),
|
|
||||||
};
|
};
|
||||||
self.ecs()
|
self.ecs()
|
||||||
.write_storage::<comp::Poise>()
|
.write_storage::<comp::Poise>()
|
||||||
|
@ -1418,9 +1418,7 @@ impl Hud {
|
|||||||
};
|
};
|
||||||
|
|
||||||
fn calc_fade(floater: &HpFloater) -> f32 {
|
fn calc_fade(floater: &HpFloater) -> f32 {
|
||||||
((crate::ecs::sys::floater::MY_HP_SHOWTIME - floater.timer)
|
((crate::ecs::sys::floater::MY_HP_SHOWTIME - floater.timer) * 0.25) + 0.2
|
||||||
* 0.25)
|
|
||||||
+ 0.2
|
|
||||||
}
|
}
|
||||||
|
|
||||||
floaters.retain(|fl| calc_fade(fl) > 0.0);
|
floaters.retain(|fl| calc_fade(fl) > 0.0);
|
||||||
|
Loading…
Reference in New Issue
Block a user