Add comments

Former-commit-id: 950c811256b8c20f58e4bb3c998acc746c4b929d
This commit is contained in:
timokoesters 2019-04-17 19:41:20 +02:00
parent b9607ef405
commit abf32d6229
2 changed files with 2 additions and 1 deletions

View File

@ -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(last) = animationHistory.last {
if animationHistory.current != last {

View File

@ -375,6 +375,7 @@ impl Server {
&self.state.ecs().internal().read_storage::<comp::AnimationHistory>(),
).join() {
if let Some(last) = animationHistory.last {
// Check if we need to sync
if animationHistory.current == last {
continue;
}