From 1e4f2ccc801d94692c2f6cc793bfd909f2af239c Mon Sep 17 00:00:00 2001 From: ntr Date: Sat, 5 Jan 2019 16:51:25 +1100 Subject: [PATCH] sort cryps --- client/src/scenes/background.js | 2 +- server/src/account.rs | 5 +++-- server/src/game.rs | 1 + 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/client/src/scenes/background.js b/client/src/scenes/background.js index aeb88b2f..b60e4b94 100644 --- a/client/src/scenes/background.js +++ b/client/src/scenes/background.js @@ -134,7 +134,7 @@ const CustomPipeline = new Phaser.Class({ Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline.call(this, { game, renderer: game.renderer, - fragShader: PLASMA, + fragShader: STARS, }); }, }); diff --git a/server/src/account.rs b/server/src/account.rs index 1d3a365d..b2e8fd72 100644 --- a/server/src/account.rs +++ b/server/src/account.rs @@ -189,8 +189,9 @@ pub fn account_cryps(tx: &mut Transaction, account: &Account) -> Result Result, Error> { diff --git a/server/src/game.rs b/server/src/game.rs index 4e351697..2beeb97f 100644 --- a/server/src/game.rs +++ b/server/src/game.rs @@ -160,6 +160,7 @@ impl Game { let index = team.cryps.iter().position(|t| t.id == cryp.id).unwrap(); team.cryps.remove(index); team.cryps.push(cryp.clone()); + team.cryps.sort_unstable_by_key(|c| c.id); }, None => panic!("cryp not in game"), };