aboutsummaryrefslogtreecommitdiff
path: root/server/src
diff options
context:
space:
mode:
Diffstat (limited to 'server/src')
-rw-r--r--server/src/entity/customers/demands.rs10
-rw-r--r--server/src/entity/customers/mod.rs4
2 files changed, 7 insertions, 7 deletions
diff --git a/server/src/entity/customers/demands.rs b/server/src/entity/customers/demands.rs
index 4f15f86f..33557b50 100644
--- a/server/src/entity/customers/demands.rs
+++ b/server/src/entity/customers/demands.rs
@@ -80,11 +80,11 @@ pub fn generate_demands(
.iter()
.filter_map(|(i, o, d)| {
producable.get(i).map(|cost| Demand {
- from: *i,
- to: *o,
- duration: *d,
- points: *cost as i64,
- })
+ from: *i,
+ to: *o,
+ duration: *d,
+ points: *cost as i64,
+ })
})
.collect()
}
diff --git a/server/src/entity/customers/mod.rs b/server/src/entity/customers/mod.rs
index 974ae686..06f99686 100644
--- a/server/src/entity/customers/mod.rs
+++ b/server/src/entity/customers/mod.rs
@@ -127,7 +127,7 @@ impl EntityT for Customers {
demand,
timeout,
} => {
- player.direction *= 0.;
+ player.direction = (chair.as_vec2() + 0.5) - player.position();
*timeout -= dt;
if *timeout <= 0. {
self.cpackets.push_back((
@@ -213,7 +213,7 @@ impl EntityT for Customers {
progress,
chair,
} => {
- player.direction *= 0.;
+ player.direction = (chair.as_vec2() + 0.5) - player.position();
let demand = &self.demands[demand.0];
*progress += dt / demand.duration;
if *progress >= 1. {