Showing the changes to libraries/entities/src/EntityScriptingInterface.cpp (1 of 3 files). Show all
Unified · Split
| @@ -1924,9 +1924,7 @@ bool EntityScriptingInterface::restartSound(const QUuid& entityID) { · 1923 unmodified lines | ||
| 1924 | 1924 | auto soundEntity = std::dynamic_pointer_cast<SoundEntityItem>(entity); |
| 1925 | 1925 | bool isPlaying = soundEntity->getPlaying(); |
| 1926 | 1926 | if (isPlaying) { |
| 1927 | − soundEntity->withWriteLock([&] { | |
| 1928 | − soundEntity->restartSound(); | |
| 1929 | − }); | |
| 1927 | + soundEntity->restartSound(true); | |
| 1930 | 1928 | } |
| 1931 | 1929 | return isPlaying; |
| 1932 | 1930 | } |