From a8e792fe129901193258b8db298de9148426b45c Mon Sep 17 00:00:00 2001 From: metamuffin Date: Sun, 6 Apr 2025 18:06:47 +0200 Subject: improve tram smoothing --- server/src/entity/mod.rs | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'server/src/entity/mod.rs') 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, points: Vec, + 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, + }), }) } -- cgit v1.2.3-70-g09d2