aboutsummaryrefslogtreecommitdiff
path: root/server
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2024-08-10 18:54:25 +0200
committermetamuffin <metamuffin@disroot.org>2024-08-10 18:54:25 +0200
commitc620403a86f7672cf48fb460f14b8f3979c9faa0 (patch)
tree7a2abac03f909cf72f9ac12eb45a377b5c340cf4 /server
parent6e091711245b1aa9773f1ebf3356d512bb5d66e7 (diff)
downloadhurrycurry-c620403a86f7672cf48fb460f14b8f3979c9faa0.tar
hurrycurry-c620403a86f7672cf48fb460f14b8f3979c9faa0.tar.bz2
hurrycurry-c620403a86f7672cf48fb460f14b8f3979c9faa0.tar.zst
freeform map shapes
Diffstat (limited to 'server')
-rw-r--r--server/src/data.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/server/src/data.rs b/server/src/data.rs
index 48540d72..522df916 100644
--- a/server/src/data.rs
+++ b/server/src/data.rs
@@ -238,7 +238,10 @@ impl Gamedata {
let mut tiles_used = HashSet::new();
let mut items_used = HashSet::new();
for (y, line) in map_in.map.iter().enumerate() {
- for (x, tile) in line.trim().chars().enumerate() {
+ for (x, tile) in line.chars().enumerate() {
+ if tile == ' ' {
+ continue; // space is empty space
+ }
let pos = IVec2::new(x as i32, y as i32);
if tile == map_in.chef_spawn {
chef_spawn = pos.as_vec2() + Vec2::splat(0.5);