From 81de78c6de8adf57bb713ea396a94bcfdd8ad035 Mon Sep 17 00:00:00 2001 From: P. J. McDermott Date: Thu, 25 Mar 2021 19:13:34 -0400 Subject: map: Set random angle for spinning balls --- diff --git a/src/map.c b/src/map.c index 3f3a6f9..e4ee0b9 100644 --- a/src/map.c +++ b/src/map.c @@ -447,10 +447,12 @@ _db_tmx_object_property_start(void *pv, const char *name, const char **attr) db_dbg(" Object direction: " "random"); } else if (strcmp(dir, "cw") == 0) { + map->obj_a = rand() / (RAND_MAX / 360); map->obj_d = -1; db_dbg(" Object direction: " "clockwise"); } else if (strcmp(dir, "ccw") == 0) { + map->obj_a = rand() / (RAND_MAX / 360); map->obj_d = 1; db_dbg(" Object direction: " "counter-clockwise"); -- cgit v0.9.1