aboutsummaryrefslogtreecommitdiff
path: root/src/libsok/sok-ctx.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libsok/sok-ctx.c')
-rw-r--r--src/libsok/sok-ctx.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/libsok/sok-ctx.c b/src/libsok/sok-ctx.c
index 84fe8ed..e278af1 100644
--- a/src/libsok/sok-ctx.c
+++ b/src/libsok/sok-ctx.c
@@ -538,15 +538,6 @@ bool sok_ctx_walk(
}
}
- if (cbs->on_home) {
- const bool has_goal = tile_is_goal(ctx, ctx->home);
-
- // emit home
- if (!cbs->on_home(ctx, ctx->home, has_goal, data)) {
- return false;
- }
- }
-
if (cbs->on_walls_start && !cbs->on_walls_start(ctx, data)) {
return false;
}
@@ -597,6 +588,15 @@ bool sok_ctx_walk(
return false;
}
+ if (cbs->on_home) {
+ const bool has_goal = tile_is_goal(ctx, ctx->home);
+
+ // emit home
+ if (!cbs->on_home(ctx, ctx->home, has_goal, data)) {
+ return false;
+ }
+ }
+
if (cbs->on_box) {
// walk boxes
for (size_t i = 0; i < ctx->level.num_boxes; i++) {