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
24ObjectDynamic::~ObjectDynamic() {24ObjectDynamic::~ObjectDynamic() {
25}25}
26 26
27void ObjectDynamic::remapIDs(QHash<EntityItemID, EntityItemID>* map) {27void ObjectDynamic::remapIDs(QHash<EntityItemID, EntityItemID>& map) {
28 withWriteLock([&]{28 withWriteLock([&]{
29 if (map->contains(_id)) {29 if (!map.contains(_id)) {
30 _id = (*map)[_id];30 map[_id] = QUuid::createUuid();
31 }31 }
32 if (map->contains(_otherID)) {32 _id = map[_id];
33 _otherID = (*map)[_otherID];33
34 if (!map.contains(_otherID)) {
35 map[_otherID] = QUuid::createUuid();
34 }36 }
37 _otherID = map[_otherID];
35 });38 });
36}39}
37 40