diff options
author | metamuffin <metamuffin@disroot.org> | 2025-04-06 18:06:47 +0200 |
---|---|---|
committer | metamuffin <metamuffin@disroot.org> | 2025-04-06 18:06:47 +0200 |
commit | a8e792fe129901193258b8db298de9148426b45c (patch) | |
tree | da6e19079e164885fe5dae5b291038c1ac0605ad /server/src/entity/mod.rs | |
parent | b7a59798ea69b403b14de128bc505d9bcb29fa4c (diff) | |
download | hurrycurry-a8e792fe129901193258b8db298de9148426b45c.tar hurrycurry-a8e792fe129901193258b8db298de9148426b45c.tar.bz2 hurrycurry-a8e792fe129901193258b8db298de9148426b45c.tar.zst |
improve tram smoothing
Diffstat (limited to 'server/src/entity/mod.rs')
-rw-r--r-- | server/src/entity/mod.rs | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/server/src/entity/mod.rs b/server/src/entity/mod.rs index 60f02d2a..ddafc2f7 100644 --- a/server/src/entity/mod.rs +++ b/server/src/entity/mod.rs @@ -1,6 +1,6 @@ /* Hurry Curry! - a game about cooking - Copyright 2024 metamuffin + Copyright 2025 metamuffin This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by @@ -139,6 +139,8 @@ pub enum EntityDecl { length: usize, character: Option<i32>, points: Vec<Vec2>, + spacing: f32, + smoothing: f32, }, Book, } @@ -209,6 +211,16 @@ pub fn construct_entity( length, character, points, - } => Box::new(Tram::new(character.unwrap_or(51), length, points)), + smoothing, + spacing, + } => Box::new(Tram { + length, + character: character.unwrap_or(51), + ids: Vec::new(), + points, + progress: 0., + spacing, + smoothing, + }), }) } |