summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorP. J. McDermott <pj@pehjota.net>2021-03-26 14:20:29 (EDT)
committer P. J. McDermott <pj@pehjota.net>2021-03-26 14:20:29 (EDT)
commit62262c68933d4137d1c72937b534b0c3b7b008d3 (patch)
tree85898285aa94da9cc05587b6bdedc7b448579785
parent0258f179c7583b764da2b69f5169879ce78080e8 (diff)
downloaddodge-balls-62262c68933d4137d1c72937b534b0c3b7b008d3.zip
dodge-balls-62262c68933d4137d1c72937b534b0c3b7b008d3.tar.gz
dodge-balls-62262c68933d4137d1c72937b534b0c3b7b008d3.tar.bz2
map: Convert object speed from px/s to px/f
-rw-r--r--src/map.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/map.c b/src/map.c
index 0beb2d5..9aaccaa 100644
--- a/src/map.c
+++ b/src/map.c
@@ -434,7 +434,9 @@ _db_tmx_object_property_start(void *pv, const char *name, const char **attr)
return;
}
free(p_type);
- db_dbg(" Object speed: %f", map->obj_s);
+ db_dbg(" Object speed: %f px/s",
+ map->obj_s);
+ map->obj_s /= map->fr; /* Convert px/s to px/f */
} else if (strcmp(p_name, "direction") == 0) {
db_xml_get_string_attr(p, attr, "value", &dir, 1);
if (strcmp(dir, "lr") == 0) {