summaryrefslogtreecommitdiff
path: root/web/web_control.c
diff options
context:
space:
mode:
Diffstat (limited to 'web/web_control.c')
-rw-r--r--web/web_control.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/web/web_control.c b/web/web_control.c
index b0dfd3b..0d8cd46 100644
--- a/web/web_control.c
+++ b/web/web_control.c
@@ -111,10 +111,14 @@ void boat_visit()
struct ccoords c = v->ccoords[i];
+ int delay = delay_ms * (i + 1);
+ if (delay_ms >= SVG_THROW_ANIM_MS)
+ delay -= SVG_THROW_ANIM_MS;
+
char *tmp = malloc(len_str + 1); // free in draw_boat_throwing
memcpy(tmp, str, len_str + 1);
EM_ASM({scheduleCCall($0, $1, $2, $3, $4, $5, $6)},
- "draw_boat_throwing", delay_ms * (i+1),
+ "draw_boat_throwing", delay,
pts, tmp, c.x, c.y, curr_match_id);
}