diff options
author | metamuffin <metamuffin@disroot.org> | 2025-06-03 20:24:20 +0200 |
---|---|---|
committer | metamuffin <metamuffin@disroot.org> | 2025-06-03 20:24:20 +0200 |
commit | d279baccdbaf37ae4410af1875e98597fe0b5565 (patch) | |
tree | e42320d5c0433a6b0415305da0520dc035553cef /server/src/entity/mod.rs | |
parent | db4587d3ec64b7e28691b43f9d9701939eed94d1 (diff) | |
download | hurrycurry-d279baccdbaf37ae4410af1875e98597fe0b5565.tar hurrycurry-d279baccdbaf37ae4410af1875e98597fe0b5565.tar.bz2 hurrycurry-d279baccdbaf37ae4410af1875e98597fe0b5565.tar.zst |
use multiple ints for characters; close #294
Diffstat (limited to 'server/src/entity/mod.rs')
-rw-r--r-- | server/src/entity/mod.rs | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/server/src/entity/mod.rs b/server/src/entity/mod.rs index 75ea0e9b..2eadc0ff 100644 --- a/server/src/entity/mod.rs +++ b/server/src/entity/mod.rs @@ -42,7 +42,7 @@ use environment_effect::{EnvironmentController, EnvironmentEffect, EnvironmentEf use hurrycurry_client_lib::Game; use hurrycurry_protocol::{ glam::{IVec2, Vec2}, - PacketC, PacketS, PlayerID, + Character, PacketC, PacketS, PlayerID, }; use item_portal::ItemPortal; use player_portal::PlayerPortal; @@ -142,7 +142,7 @@ pub enum EntityDecl { }, Tram { length: usize, - character: Option<i32>, + color: Option<i32>, points: Vec<Vec2>, spacing: f32, smoothing: f32, @@ -219,13 +219,17 @@ pub fn construct_entity( EntityDecl::Environment(names) => Box::new(EnvironmentController(names)), EntityDecl::Tram { length, - character, + color, points, smoothing, spacing, } => Box::new(Tram { length, - character: character.unwrap_or(51), + character: Character { + color: color.unwrap_or_default(), + hairstyle: 0, + headwear: 0, + }, ids: Vec::new(), points, progress: 0., |