History

working on fixing action/constraint export/import

Seth Alves committed 9 years ago

Commit fd238f51 parent cfe118e6 files · +103 −51Browse files

Showing the changes to libraries/physics/src/ObjectDynamic.cpp (1 of 6 files). Show all

Unified · Split

libraries/physics/src/ObjectDynamic.cpp+8−5
@@ -24,14 +24,17 @@ ObjectDynamic::ObjectDynamic(EntityDynamicType type, const QUuid& id, EntityItem · 23 unmodified lines
2424 ObjectDynamic::~ObjectDynamic() {
2525 }
2626
27−void ObjectDynamic::remapIDs(QHash<EntityItemID, EntityItemID>* map) {
27+void ObjectDynamic::remapIDs(QHash<EntityItemID, EntityItemID>& map) {
2828 withWriteLock([&]{
29− if (map->contains(_id)) {
30− _id = (*map)[_id];
29+ if (!map.contains(_id)) {
30+ map[_id] = QUuid::createUuid();
3131 }
32− if (map->contains(_otherID)) {
33− _otherID = (*map)[_otherID];
32+ _id = map[_id];
33+
34+ if (!map.contains(_otherID)) {
35+ map[_otherID] = QUuid::createUuid();
3436 }
37+ _otherID = map[_otherID];
3538 });
3639 }
3740