Showing the changes to libraries/physics/src/ObjectActionSpring.cpp (1 of 9 files). Show all
Unified · Split
| @@ -109,6 +109,9 @@ void ObjectActionSpring::updateActionWorker(btScalar deltaTimeStep) { · 108 unmodified lines | ||
| 109 | 109 | const float MIN_TIMESCALE = 0.1f; |
| 110 | 110 | |
| 111 | 111 | bool ObjectActionSpring::updateArguments(QVariantMap arguments) { |
| 112 | + if (!ObjectAction::updateArguments(arguments)) { | |
| 113 | + return false; | |
| 114 | + } | |
| 112 | 115 | // targets are required, spring-constants are optional |
| 113 | 116 | bool ok = true; |
| 114 | 117 | glm::vec3 positionalTarget = |
| @@ -155,7 +158,7 @@ bool ObjectActionSpring::updateArguments(QVariantMap arguments) { · 40 unmodified lines | ||
| 155 | 158 | } |
| 156 | 159 | |
| 157 | 160 | QVariantMap ObjectActionSpring::getArguments() { |
| 158 | − QVariantMap arguments; | |
| 161 | + QVariantMap arguments = ObjectAction::getArguments(); | |
| 159 | 162 | withReadLock([&] { |
| 160 | 163 | arguments["linearTimeScale"] = _linearTimeScale; |
| 161 | 164 | arguments["targetPosition"] = glmToQMap(_positionalTarget); |
| @@ -182,6 +185,9 @@ QByteArray ObjectActionSpring::serialize() const { · 20 unmodified lines | ||
| 182 | 185 | dataStream << _angularTimeScale; |
| 183 | 186 | dataStream << _rotationalTargetSet; |
| 184 | 187 | |
| 188 | + dataStream << _expires; | |
| 189 | + dataStream << _tag; | |
| 190 | + | |
| 185 | 191 | return serializedActionArguments; |
| 186 | 192 | } |
| 187 | 193 | |
| @@ -210,5 +216,8 @@ void ObjectActionSpring::deserialize(QByteArray serializedArguments) { · 22 unmodified lines | ||
| 210 | 216 | dataStream >> _angularTimeScale; |
| 211 | 217 | dataStream >> _rotationalTargetSet; |
| 212 | 218 | |
| 219 | + dataStream >> _expires; | |
| 220 | + dataStream >> _tag; | |
| 221 | + | |
| 213 | 222 | _active = true; |
| 214 | 223 | } |