summaryrefslogtreecommitdiffstats
path: root/src/map.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/map.c')
-rw-r--r--src/map.c2
1 files changed, 2 insertions, 0 deletions
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");