summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcitrons <citrons@mondecitronne.com>2023-10-13 22:30:45 -0500
committercitrons <citrons@mondecitronne.com>2023-10-13 22:30:45 -0500
commitb0c5b73d9dc5c7e2ba4133a920fe142d6a23022e (patch)
treeefbb405e2298c93a74b0c7f9f8eb49001fd21460
parent82d5849bc9c357f62b66460bc3647cc941528e75 (diff)
start player with initial amount of light
-rw-r--r--world.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/world.c b/world.c
index c649d63..2ab924e 100644
--- a/world.c
+++ b/world.c
@@ -343,6 +343,9 @@ void tick_world(world *w) {
}
void init_world(world *w) {
- load_world(w);
+ if (!load_world(w)) {
+ w->player.pos.x += rand_int() % 50 - 25;
+ w->player.scores[TILE_LIGHT] = 5;
+ }
w->view_pos = w->player.pos;
}