diff options
author | P. J. McDermott <pj@pehjota.net> | 2021-03-25 19:13:34 (EDT) |
---|---|---|
committer | P. J. McDermott <pj@pehjota.net> | 2021-03-25 19:13:34 (EDT) |
commit | 81de78c6de8adf57bb713ea396a94bcfdd8ad035 (patch) | |
tree | fd02481f597b85cca1c50775940964a5e4be689e | |
parent | 78aff7ae4b05b5a77931ac4e68c814f48ce22460 (diff) | |
download | dodge-balls-81de78c6de8adf57bb713ea396a94bcfdd8ad035.zip dodge-balls-81de78c6de8adf57bb713ea396a94bcfdd8ad035.tar.gz dodge-balls-81de78c6de8adf57bb713ea396a94bcfdd8ad035.tar.bz2 |
map: Set random angle for spinning balls
-rw-r--r-- | src/map.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -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"); |