diff options
-rw-r--r-- | data/maps/line.yaml | 15 | ||||
-rw-r--r-- | server/src/entity/customers/demands.rs | 10 | ||||
-rw-r--r-- | server/src/entity/customers/mod.rs | 4 |
3 files changed, 15 insertions, 14 deletions
diff --git a/data/maps/line.yaml b/data/maps/line.yaml index 0980b741..7d785d34 100644 --- a/data/maps/line.yaml +++ b/data/maps/line.yaml @@ -14,13 +14,14 @@ # along with this program. If not, see <https://www.gnu.org/licenses/>. # map: - - "'''''''''''''''''''''''''''" - - "''███████████████████████''" - - "''█ctc.ctc.ctc█pp█sSC#LR█''" - - "!_d...........d..d......d~'" - - "''█ctc.ctc.ctc█pp█oof#TF█X'" - - "''███████████████████████''" - - "'''''''''''''''''''''''''''" + - "''''''''''''''''''''''''''''" + - "''████████████████████████''" + - "''█ctc.ctc.ctc█pps█SSC#LR█''" + - "!_d...........d...d......d~'" + - "!_d...........d...d......d~'" + - "''█ctc.ctc.ctc█ppp█oof#TF█X'" + - "''████████████████████████''" + - "''''''''''''''''''''''''''''" tiles: "#": counter 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. { |