mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Add comments
Former-commit-id: 950c811256b8c20f58e4bb3c998acc746c4b929d
This commit is contained in:
parent
b9607ef405
commit
abf32d6229
@ -167,7 +167,7 @@ impl Client {
|
|||||||
_ => {},
|
_ => {},
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update the server about the player's currently playing animation
|
// Update the server about the player's currently playing animation and the previous one
|
||||||
if let Some(animationHistory) = self.state.read_storage::<comp::AnimationHistory>().get(self.player).cloned() {
|
if let Some(animationHistory) = self.state.read_storage::<comp::AnimationHistory>().get(self.player).cloned() {
|
||||||
if let Some(last) = animationHistory.last {
|
if let Some(last) = animationHistory.last {
|
||||||
if animationHistory.current != last {
|
if animationHistory.current != last {
|
||||||
|
@ -375,6 +375,7 @@ impl Server {
|
|||||||
&self.state.ecs().internal().read_storage::<comp::AnimationHistory>(),
|
&self.state.ecs().internal().read_storage::<comp::AnimationHistory>(),
|
||||||
).join() {
|
).join() {
|
||||||
if let Some(last) = animationHistory.last {
|
if let Some(last) = animationHistory.last {
|
||||||
|
// Check if we need to sync
|
||||||
if animationHistory.current == last {
|
if animationHistory.current == last {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user