From 13499eb84d624b2c94e415bab4b1304408cf0f92 Mon Sep 17 00:00:00 2001 From: P. J. McDermott Date: Thu, 25 Mar 2021 19:09:23 -0400 Subject: map: Initialize all object members --- diff --git a/src/map.c b/src/map.c index 78d5d05..3f3a6f9 100644 --- a/src/map.c +++ b/src/map.c @@ -583,9 +583,13 @@ _db_tmx_object_start(void *pv, const char *name, const char **attr) XML_StopParser(p, XML_FALSE); return; } - map->obj_x = x + w / 2; - map->obj_y = y - h / 2; /* Object origin is BOTTOM left */ - map->obj_r = w / 2; + map->obj_x = x + w / 2; + map->obj_y = y - h / 2; /* Object origin is BOTTOM left */ + map->obj_r = w / 2; + map->obj_a = 0; + map->obj_d = 0; + map->obj_sr = 0; + map->obj_s = 0.0; db_xml_node_push(p, map, _db_tmx_object_properties_start, _db_tmx_object_end, NULL); } else { -- cgit v0.9.1