diff options
Diffstat (limited to 'pixel-client/src')
| -rw-r--r-- | pixel-client/src/game.rs | 9 | ||||
| -rw-r--r-- | pixel-client/src/render/misc.rs | 6 | 
2 files changed, 12 insertions, 3 deletions
| diff --git a/pixel-client/src/game.rs b/pixel-client/src/game.rs index c129f991..f8feb1c8 100644 --- a/pixel-client/src/game.rs +++ b/pixel-client/src/game.rs @@ -360,7 +360,14 @@ impl Game {          }          for p in self.players.values() { -            ctx.draw_world(self.misc_textures.player.at(p.movement.position)); +            ctx.draw_world( +                if p._character >= 0 { +                    &self.misc_textures.chef +                } else { +                    &self.misc_textures.customer +                } +                .at(p.movement.position), +            );              if let Some(item) = &p.item {                  item.draw(ctx, &self.item_sprites, &self.misc_textures)              } diff --git a/pixel-client/src/render/misc.rs b/pixel-client/src/render/misc.rs index c1f1295e..05cde8e4 100644 --- a/pixel-client/src/render/misc.rs +++ b/pixel-client/src/render/misc.rs @@ -20,7 +20,8 @@ use hurrycurry_protocol::glam::Vec2;  use sdl2::rect::Rect;  pub struct MiscTextures { -    pub player: Sprite, +    pub chef: Sprite, +    pub customer: Sprite,      pub interact_target: Sprite,      pub solid: Rect,  } @@ -28,7 +29,8 @@ pub struct MiscTextures {  impl MiscTextures {      pub fn init(layout: &AtlasLayout) -> Self {          MiscTextures { -            player: Sprite::new(*layout.get("player+a").unwrap(), Vec2::Y * 0.3, 0.5 + 0.3), +            chef: Sprite::new(*layout.get("chef+a").unwrap(), Vec2::Y * 0.3, 0.5 + 0.3), +            customer: Sprite::new(*layout.get("customer+a").unwrap(), Vec2::Y * 0.3, 0.5 + 0.3),              interact_target: Sprite::new(                  *layout.get("interact-target-thick+a").unwrap(),                  Vec2::new(0.5, 1.0), | 
